#!/bin/sh # Build script for fox-toolkit / FOX 1.6.59 (autotools, Template A + C++). # Older C++ codebase (pre-C++11 idioms) - watch illumos __EXTENSIONS__ / # socket-header issues same as any client-stack C port, but this time also # apply the flags to CXXFLAGS since FOX is a C++ library. set -e cd "$SRCDIR" # MANDATORY libtool fix - see Template A. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # GOTCHA #1: FOX's configure.ac does `CXXFLAGS=""` unconditionally near the # top and rebuilds it from scratch with its own hardcoded flag set - any # CXXFLAGS/CFLAGS we export before running configure is silently discarded # (confirmed by inspecting configure.ac: "CXXFLAGS=\"\"" then a chain of # CXXFLAGS="${CXXFLAGS} ..." appends, never re-adding a user value). # GOTCHA #2: within that rebuild, `XFTCFLAGS="-I/usr/include/freetype2"` is # hardcoded (no pkg-config/freetype-config probe), so is never # found under our $PREFIX=/usr/local. # WORKAROUND: src/Makefile.am declares `CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@` # with no explicit CPPFLAGS reference, but automake's generated compile # rule ALWAYS appends $(CPPFLAGS) regardless (it's a standard AC_SUBST'd # variable automake wires in implicitly) - and configure.ac never touches # CPPFLAGS at all. So route our include path through CPPFLAGS instead of # CXXFLAGS/CFLAGS - it survives the configure.ac reset untouched. # GOTCHA #3: FOX's include/xincs.h has a ready-made # `#ifdef HAVE_SYS_FILIO_H #include #endif` (for FIONREAD on # Solaris/illumos) but configure.ac never actually probes for # sys/filio.h/AC_DEFINE's HAVE_SYS_FILIO_H - it's a dead branch upstream. # illumos DOES have (confirmed present on Hammerhead) so just # define the macro ourselves; FXGUISignal.cpp otherwise fails with # "'FIONREAD' was not declared in this scope". export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CPPFLAGS="${CPPFLAGS} -I$PREFIX/include -I$PREFIX/include/freetype2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -DHAVE_SYS_FILIO_H" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # No GL in this build (kernel has no DRM/KMS/GPU accel - see graphics # capability baseline memory); tiff not ported, so disabled explicitly. ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-opengl=no \ --with-xft=yes \ --with-xrandr=yes \ --with-xcursor=yes \ --with-xrender=yes \ --with-xfixes=yes \ --with-xshm=yes \ --disable-tiff gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # fox-toolkit (FOX) - C++ GUI toolkit, backs the Xfe file manager # https://fox-toolkit.org/ [package] name = "fox-toolkit" version = "1.6.59" release = 1 description = "FOX C++ GUI toolkit" url = "https://fox-toolkit.org/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXft", "freetype", "fontconfig", "libXext", "libXrandr", "libXcursor", "libpng", "libjpeg-turbo"] build = ["libX11", "libXft", "freetype", "fontconfig", "libXext", "libXrandr", "libXcursor", "libpng", "libjpeg-turbo"] [[source]] file = "fox-1.6.59.tar.gz" urls = ["http://fox-toolkit.org/ftp/fox-1.6.59.tar.gz"] checksum = "48f33d2dd5371c2d48f6518297f0ef5bbf3fcd37719e99f815dc6fc6e0f928ae" [build] parallel = true