|
root / base / xnedit / build.sh
build.sh Bash 27 lines 934 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
#!/bin/sh
# Build script for XNEdit 1.6.3 (classic NEdit-style, target-keyed plain
# Makefile - NOT Template A/autotools). The top-level Makefile has no
# uname-autodetect: it dispatches on an explicit `make <target>` name to
# `makefiles/Makefile.<target>`, so we add our own
# makefiles/Makefile.hammerhead (patches/0001-add-makefile-hammerhead.patch)
# rather than adapting an existing OS's file in place.
set -e

PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)

cd "$SRCDIR"

for p in "$PORTDIR"/patches/*.patch; do
    [ -f "$p" ] || continue
    echo "==> Applying patch: $(basename "$p")"
    patch -p1 < "$p"
done

export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH"

gmake -j${JOBS:-1} hammerhead

# `install:` target respects PREFIX/DESTDIR as make ARGs (not env) -
# see the openssl-vendor-wrapper DESTDIR gotcha.
gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR"