|
root / base / feh / build.sh
build.sh Bash 27 lines 1.3 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
#!/bin/sh
# Build script for feh (plain Makefile - no configure, no pkg-config use).
# Deps: imlib2, libX11, libXinerama, libpng - all under $PREFIX.
# feh's config.mk hardcodes LDLIBS (-lm -lpng -lX11 -lImlib2) with no -I/-L
# of its own, relying on the compiler's default search paths - which does
# NOT include $PREFIX/include or $PREFIX/lib on Hammerhead. Supply those
# via CFLAGS/LDFLAGS in the environment (config.mk's CFLAGS uses `?=`/`+=`
# so an exported CFLAGS is picked up as the base and appended to).
# curl=0 exif=0 per the task brief (no libcurl/libexif ports); xinerama=1
# (libXinerama is ported).
#
# verscmp=0: feh defaults verscmp=1 (assumes glibc's GNU strverscmp()),
# but illumos libc has no strverscmp() at all (not even hidden behind
# __EXTENSIONS__ - it's a pure GNU extension). With verscmp=0 feh's own
# Makefile pulls in its bundled strverscmp.c fallback implementation
# instead, avoiding the "implicit declaration of function 'strverscmp'"
# build failure.
set -e
cd "$SRCDIR"

export CFLAGS="-I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
export LDFLAGS="-L$PREFIX/lib -R$PREFIX/lib"

gmake CC=gcc PREFIX="$PREFIX" curl=0 exif=0 xinerama=1 verscmp=0

gmake PREFIX="$PREFIX" DESTDIR="$PKGDIR" curl=0 exif=0 xinerama=1 verscmp=0 install