#!/bin/sh # Build script for fontconfig (Meson, Template B). # Uses libxml2 as the XML backend (PRESENT in base, /usr/lib) rather than # expat, per the manifest's dependency line. gperf (devel/gperf) must be # built/installed first - fontconfig's build uses it to generate perfect # hash tables. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" # GOTCHA (Task 5): Meson does not set an rpath on the fc-cache/fc-list/ # fc-match consumer binaries by default, and /usr/local/lib is NOT on # Hammerhead's default runtime ld.so search path (only /lib:/usr/lib - # confirmed via `crle`). Without this, every installed binary fails at # runtime with "libfontconfig.so.1: open failed". Force -R via LDFLAGS so # meson's link step picks it up for all targets (libs + executables). export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --sysconfdir="$SYSCONFDIR" \ --buildtype=release \ -Ddefault_library=shared \ -Ddoc=disabled \ -Dtests=disabled \ -Dnls=disabled \ -Dxml-backend=libxml2 ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # fontconfig - font discovery and matching # https://www.freedesktop.org/wiki/Software/fontconfig/ [package] name = "fontconfig" version = "2.16.0" release = 1 description = "Font discovery and configuration library" url = "https://www.freedesktop.org/wiki/Software/fontconfig/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["freetype"] build = ["freetype", "gperf"] [[source]] file = "fontconfig-2.16.0.tar.xz" urls = ["https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.16.0.tar.xz"] checksum = "6a33dc555cc9ba8b10caf7695878ef134eeb36d0af366041f639b1da9b6ed220" [build] parallel = true