|
root / base / libxcvt / build.sh
build.sh Bash 23 lines 886 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# Build script for libxcvt (Meson, Template B). Dependency of
# xlibre-xserver-xorg. Pure C library + `cvt` binary; no patches needed.
set -e
cd "$SRCDIR"

export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
# __EXTENSIONS__ + _POSIX_PTHREAD_SEMANTICS: unlock hidden POSIX/SysV prototypes
# on illumos headers (meson has_function() falsely reports them present).
export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
# rpath: Meson strips rpath on install and /usr/local/lib is not on the default
# ld.so path; bake -R$PREFIX/lib so installed artifacts are self-contained.
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib"

meson setup build \
    --prefix="$PREFIX" \
    --libdir=lib \
    --buildtype=release \
    -Ddefault_library=shared

ninja -C build -j${JOBS:-1}
DESTDIR="$PKGDIR" ninja -C build install