1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(harfbuzz harfbuzz-icu)
8 pkgdesc="OpenType text shaping engine"
9 url="https://www.freedesktop.org/wiki/Software/HarfBuzz"
12 makedepends=(glib2 freetype2 graphite cairo icu gobject-introspection gtk-doc
13 ragel git python meson chafa)
14 checkdepends=(python-fonttools python-setuptools)
16 _commit=f1f2be776bcd994fa9262622e1a7098a066e5cf7 # tags/5.1.0^0
17 source=("git+https://github.com/harfbuzz/harfbuzz#commit=$_commit")
22 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
30 # Harfbuzz wants no exceptions
31 CFLAGS="${CFLAGS/-fexceptions/}"
32 CXXFLAGS="${CXXFLAGS/-fexceptions/}"
34 arch-meson harfbuzz build \
36 meson compile -C build
41 TMPDIR="$PWD/tmp" meson test -C build --print-errorlogs
46 local p="$1" f d; shift
48 d="$srcdir/$p/${f#$pkgdir/}"
49 mkdir -p "$(dirname "$d")"
51 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
56 depends=(glib2 freetype2 graphite libglib-2.0.so libfreetype.so
58 provides=(libharfbuzz.so libharfbuzz-subset.so libharfbuzz-gobject.so)
59 optdepends=('cairo: hb-view program'
60 'chafa: hb-view program')
62 meson install -C build --destdir "$pkgdir"
66 _pick hb-icu usr/lib/libharfbuzz-icu*
67 _pick hb-icu usr/lib/pkgconfig/harfbuzz-icu.pc
68 _pick hb-icu usr/include/harfbuzz/hb-icu.h
71 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
74 package_harfbuzz-icu() {
75 pkgdesc+=" - ICU integration"
76 depends=("harfbuzz=$pkgver-$pkgrel" libicuuc.so libharfbuzz.so)
77 provides=(libharfbuzz-icu.so)
81 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING