1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
5 pkgname=(freetype2 freetype2-demos freetype2-docs)
8 pkgdesc="Font rasterization library"
9 url="https://www.freetype.org/"
12 # adding harfbuzz for improved OpenType features auto-hinting
13 # introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
14 depends=(zlib bzip2 sh libpng harfbuzz brotli)
15 makedepends=(libx11 qt5-base meson)
16 source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig}
17 https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-$pkgver.tar.xz{,.sig}
18 https://download-mirror.savannah.gnu.org/releases/freetype/ft2demos-$pkgver.tar.xz{,.sig}
19 0001-Enable-table-validation-modules.patch
20 0002-Enable-subpixel-rendering.patch
21 0003-Enable-infinality-subpixel-hinting.patch
22 0004-Enable-long-PCF-family-names.patch
24 sha256sums=('3333ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8'
26 '755e29908093c19138a38775784b0accf7e838ffa28a25b8722b3dfe651d80fa'
28 'c60620d49d0f16d95586eb868c01b129569409e6cfdcb87a78e0482a12604672'
30 '663310ef70f7830de462fb8964ee4fa1d49ad4aeb1a6eae5857707e161039a53'
31 '17cd4bd0c650b9bdd3bc30581ad6457524db14ec34b56f98e243357c3ab4bc05'
32 '0607ac8176d4f08bcfb78d07bdc2c66fcbe7dfde6c82a0e98d6e625597442fd0'
33 '6e5192dc08119e32992eee5a15595e131adcc9d2411066ca8691bfe2af14d97e'
34 'f7f8e09c44f7552c883846e9a6a1efc50377c4932234e74adc4a8ff750606467')
35 validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg <wl@gnu.org>
38 ln -sr freetype-$pkgver ft2demos-$pkgver/subprojects/freetype2
41 patch -Np1 -i ../0001-Enable-table-validation-modules.patch
42 patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
43 patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
44 patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
48 arch-meson ft2demos-$pkgver build \
49 -D freetype2:default_library=shared
50 meson compile -C build
54 meson test -C build --print-errorlogs
58 local p="$1" f d; shift
60 d="$srcdir/$p/${f#$pkgdir/}"
61 mkdir -p "$(dirname "$d")"
63 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
68 provides=(libfreetype.so)
69 install=freetype2.install
70 backup=(etc/profile.d/freetype2.sh)
72 meson install -C build --destdir="$pkgdir"
73 install -Dt "$pkgdir/etc/profile.d" -m644 freetype2.sh
74 install -Dt "$pkgdir/usr/share/aclocal" -m644 \
75 freetype-$pkgver/builds/unix/freetype2.m4
77 _pick demos "$pkgdir"/usr/bin
78 _pick demos "$pkgdir"/usr/share/man/man1
81 package_freetype2-demos() {
82 pkgdesc="Freetype tools and demos"
83 depends=(freetype2 libx11)
84 optdepends=('qt5-base: ftinspect')
88 package_freetype2-docs() {
89 pkgdesc="Freetype documentation"
92 mkdir -p "${pkgdir}/usr/share/doc"
93 cp -r freetype-$pkgver/docs "$pkgdir/usr/share/doc/freetype2"