|
root / base / xz / build.sh
build.sh Bash 29 lines 710 B
 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
#!/bin/bash
# Build script for XZ Utils

set -e
cd "$SRCDIR"

# Fix illumos gnulib compatibility issues (if present)
for f in lib/localename-unsafe.c lib/localename.c; do
    if [ -f "$f" ]; then
        sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f"
    fi
done

./configure \
    --prefix=$PREFIX \
    --build=$BUILD_TRIPLE \
    --host=$BUILD_TRIPLE \
    --disable-nls

# Fix illumos memset_s false detection if present
for config in lib/config.h config.h; do
    if [ -f "$config" ]; then
        sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config"
    fi
done

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