1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: 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
29 https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig}
30 https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-$pkgver.tar.xz{,.sig}
31 https://download-mirror.savannah.gnu.org/releases/freetype/ft2demos-$pkgver.tar.xz{,.sig}
32 0001-Enable-table-validation-modules.patch
33 0002-Enable-subpixel-rendering.patch
34 0003-Enable-infinality-subpixel-hinting.patch
35 0004-Enable-long-PCF-family-names.patch
36 0005-builds-meson-parse_modules_cfg.py-Handle-gxvalid-and.patch
39 sha256sums=('5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c'
41 'f6421803442beb5fc74435eb570bea427c8ca763dbf14b4f36caf3145534e9eb'
43 '4ce8367f9cb9468413c0ea9b3df00c3bb92801418d92a25d157a1ff56e927fcc'
45 'd279a9d4b2c146722dbc03f9a33009846efe8bbbe3ada52beb4a1aa4d4dfaa38'
46 'f2e8a16126723458b413e58da267fb30332d0b42fef972f951e3e9fc081fa492'
47 '8e61d12ebdbbcb764a38d4798ee728074bac0aa20978d538b6e7045a63949ab8'
48 'cc364cc0ca21b8b30f29d90ab394d82f3303ca7d9813d866e6bf14f9bccd9564'
49 '08cf087d7d612b4228e24d74df95cf1f397f7c41054c42837c63c1f33ffaee09'
50 'f7f8e09c44f7552c883846e9a6a1efc50377c4932234e74adc4a8ff750606467')
51 validpgpkeys=(E30674707856409FF1948010BE6C3AAC63AD8E3F) # Werner Lemberg <wl@gnu.org>
54 ln -sr freetype-$pkgver ft2demos-$pkgver/subprojects/freetype2
57 patch -Np1 -i ../0001-Enable-table-validation-modules.patch
58 patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
59 patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
60 patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
61 patch -Np1 -i ../0005-builds-meson-parse_modules_cfg.py-Handle-gxvalid-and.patch
66 -D freetype2:default_library=shared
69 arch-meson ft2demos-$pkgver build "${meson_options[@]}"
70 meson compile -C build
74 meson test -C build --print-errorlogs
78 local p="$1" f d; shift
80 d="$srcdir/$p/${f#$pkgdir/}"
81 mkdir -p "$(dirname "$d")"
83 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
88 provides=(libfreetype.so)
89 install=freetype2.install
90 backup=(etc/profile.d/freetype2.sh)
92 meson install -C build --destdir="$pkgdir"
93 install -Dt "$pkgdir/etc/profile.d" -m644 freetype2.sh
94 install -Dt "$pkgdir/usr/share/aclocal" -m644 \
95 freetype-$pkgver/builds/unix/freetype2.m4
97 _pick demos "$pkgdir"/usr/bin
98 _pick demos "$pkgdir"/usr/share/man/man1
101 package_freetype2-demos() {
102 pkgdesc="Freetype tools and demos"
103 depends=(freetype2 libx11 librsvg)
104 optdepends=('qt5-base: ftinspect')
108 package_freetype2-docs() {
109 pkgdesc="Freetype documentation"
112 mkdir -p "${pkgdir}/usr/share/doc"
113 cp -r freetype-$pkgver/docs "$pkgdir/usr/share/doc/$pkgbase"
116 # vim:set sw=2 sts=-1 et: