|
root / base / xrdb / build.sh
build.sh Bash 30 lines 1.1 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# Build script for xrdb (autotools, Template A + runtime cpp pin).
set -e
cd "$SRCDIR"

# MANDATORY libtool fix (Task 4a, 2026-07-22): see libXau/build.sh for the
# full explanation. Piggyback hammerhead onto the kopensolaris arm.
if [ -f configure ]; then
    sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure
fi

export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib"

# xrdb pipes resource files through cpp at RUNTIME, not just build time.
# configure's AC_PATH_PROG probe would find Hammerhead's /usr/bin/cpp via
# PATH anyway, but pin it explicitly so the result doesn't depend on PATH
# search order across build hosts.
./configure \
    --prefix="$PREFIX" \
    --build="$BUILD_TRIPLE" \
    --host="$BUILD_TRIPLE" \
    --sysconfdir="$SYSCONFDIR" \
    --disable-static \
    --with-cpp=/usr/bin/cpp

gmake -j${JOBS:-1}
gmake install DESTDIR="$PKGDIR"