# Contributor: Jan Alexander Steffens (heftig) # Contributor: Jan de Groot _pkgname=harfbuzz pkgname=static-compat-$_pkgname pkgver=8.4.0 pkgrel=1 pkgdesc="OpenType text shaping engine" url="https://harfbuzz.github.io/" arch=(x86_64) license=(MIT) depends=(static-compat-glib2 static-compat-freetype2 static-compat-graphite) makedepends=(gobject-introspection ragel git python static-compat-meson) checkdepends=(python-fonttools python-setuptools) options=(!emptydirs !docs staticlibs) source=("git+https://github.com/harfbuzz/harfbuzz?signed#tag=$pkgver") b2sums=('19f25dbf2ba6d90fdbb4ecb1039c8d0d72c55cff3dc3b30d6b75b626c15bf28a2118495837d80b7f622f0929dd7d4a07b5526963e1204bb9c90bc9f976c26977') validpgpkeys=( 053D20F17CCCA9651B2C6FCB9AB24930C0B997A2 # Khaled Hosny (@khaledhosny) 9F377DDB6D3153A48EB3EB1E63CC496475267693 # Caleb Maclennan (@alerque) 2277650A4E8BDFE4B7F6BE419FEE04E5D3531115 # Ebrahim Byagowi (@ebraminio) EACF64F53455E2771BA661A4803B21859F015E4E # Behdad Esfahbod (@behdad) ) pkgver() { cd harfbuzz git describe --tags | sed 's/-/+/g' } prepare() { cd harfbuzz } build() { source static-compat-environment export PATH=$PWD:$PATH printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config chmod +x pkg-config # disable tools and tests that would run into linker errors echo '' > harfbuzz/util/meson.build echo '' > harfbuzz/test/api/meson.build echo '' > harfbuzz/test/fuzzing/meson.build echo '' > harfbuzz/test/threads/meson.build echo '' > harfbuzz/test/shape/meson.build echo '' > harfbuzz/test/subset/meson.build static-compat-meson harfbuzz build \ -Dgraphite=enabled \ -Dcairo=disabled \ -Dintrospection=disabled \ -Dicu=disabled \ -Ddocs=disabled meson compile -C build } check() { source static-compat-environment mkdir -p tmp TMPDIR="$PWD/tmp" meson test -C build --print-errorlogs rm -r tmp } package() { source static-compat-environment DESTDIR="$pkgdir" meson install -C build # remove CMake config as it is broken for a static build (the pkgconfig file alone should be good enough) rm -r "$pkgdir/$static_compat_prefix"/lib/cmake/harfbuzz/harfbuzz-config.cmake install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING }