#!/bin/sh # Build script for openbox (autotools, Template A). # Deps: glib2, pango, cairo, libxml2 (BASE - /usr/lib), libX11, libXext, # libXrender, libXrandr, libXinerama, libXcursor, libSM, libICE. # Optionals disabled to stay minimal (no imlib2/librsvg/startup-notification # ports exist). set -e cd "$SRCDIR" # GOTCHA (Template A, standard): this release's libtool-generated `configure` # has no solaris/illumos/hammerhead arm in its dynamic-linker detection # `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # libxml2 ships in base (/usr/lib), not under $PREFIX - make sure its .pc # is on the search path alongside the usual $PREFIX locations. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib -lsocket -lnsl" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --disable-nls \ --disable-imlib2 \ --disable-librsvg \ --disable-startup-notification gmake -j${JOBS:-1} # GOTCHA: openbox's automake-generated install-recursive races under a # parallel MAKEFLAGS inherited from the environment - two subdirectory # installs both `install-sh -c -d .../libexec` at once and the loser's # mkdir sees EEXIST as a hard error (not the usual -p tolerant case). # Force the install step serial regardless of inherited -j. gmake -j1 install DESTDIR="$PKGDIR" # openbox - lightweight, standards-compliant X11 window manager # https://openbox.org/ [package] name = "openbox" version = "3.6.1" release = 1 description = "Lightweight X11 window manager" url = "http://openbox.org/" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["glib2", "pango", "cairo", "libxml2", "libX11", "libXext", "libXrender", "libXrandr", "libXinerama", "libXcursor", "libSM", "libICE"] build = ["glib2", "pango", "cairo", "libxml2", "libX11", "libXext", "libXrender", "libXrandr", "libXinerama", "libXcursor", "libSM", "libICE", "xorgproto", "util-macros"] [[source]] file = "openbox-3.6.1.tar.gz" urls = ["http://openbox.org/dist/openbox/openbox-3.6.1.tar.gz"] checksum = "8b4ac0760018c77c0044fab06a4f0c510ba87eae934d9983b10878483bde7ef7" [build] parallel = true