upgpkg: ocaml-topkg 1.0.5-2
[arch-packages.git] / harfbuzz / trunk / PKGBUILD
blobdf78fec37da37a3adb5eb173ba81a3d49afc3a16
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
4 pkgbase=harfbuzz
5 pkgname=(
6   harfbuzz
7   harfbuzz-cairo
8   harfbuzz-icu
9   harfbuzz-utils
10   harfbuzz-docs
12 pkgver=7.3.0
13 pkgrel=1
14 pkgdesc="OpenType text shaping engine"
15 url="https://www.freedesktop.org/wiki/Software/HarfBuzz"
16 arch=(x86_64)
17 license=(MIT)
18 makedepends=(
19   cairo
20   chafa
21   freetype2
22   git
23   glib2
24   gobject-introspection
25   graphite
26   gtk-doc
27   icu
28   meson
29   python
30   ragel
32 checkdepends=(
33   python-fonttools
34   python-setuptools
36 _commit=4584bcdc326564829d3cee3572386c90e4fd1974  # tags/7.3.0^0
37 source=("git+https://github.com/harfbuzz/harfbuzz#commit=$_commit")
38 b2sums=('SKIP')
40 pkgver() {
41   cd harfbuzz
42   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
45 prepare() {
46   cd harfbuzz
49 build() {
50   local meson_options=(
51     -D graphite2=enabled
52   )
54   # Harfbuzz wants no exceptions
55   CFLAGS="${CFLAGS/-fexceptions/}"
56   CXXFLAGS="${CXXFLAGS/-fexceptions/}"
58   arch-meson harfbuzz build "${meson_options[@]}"
59   meson compile -C build
62 check() {
63   mkdir -p tmp
64   TMPDIR="$PWD/tmp" meson test -C build --print-errorlogs
65   rm -r tmp
68 _pick() {
69   local p="$1" f d; shift
70   for f; do
71     d="$srcdir/$p/${f#$pkgdir/}"
72     mkdir -p "$(dirname "$d")"
73     mv "$f" "$d"
74     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
75   done
78 package_harfbuzz() {
79   depends=(
80     libfreetype.so
81     libglib-2.0.so
82     libgobject-2.0.so
83     libgraphite2.so
84   )
85   optdepends=('harfbuzz-utils: utilities')
86   provides=(libharfbuzz{,-subset,-gobject}.so)
88   meson install -C build --destdir "$pkgdir"
90   ( cd "$pkgdir"
92     _pick hb-cairo usr/lib/libharfbuzz-cairo*
93     _pick hb-cairo usr/lib/pkgconfig/harfbuzz-cairo.pc
94     _pick hb-cairo usr/include/harfbuzz/hb-cairo.h
96     _pick hb-icu usr/lib/libharfbuzz-icu*
97     _pick hb-icu usr/lib/pkgconfig/harfbuzz-icu.pc
98     _pick hb-icu usr/include/harfbuzz/hb-icu.h
100     _pick hb-utils usr/bin
102     _pick hb-docs usr/share/gtk-doc
103   )
105   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
108 package_harfbuzz-cairo() {
109   pkgdesc+=" - Cairo integration"
110   depends=(
111     libcairo.so
112     libharfbuzz.so
113   )
114   provides=(libharfbuzz-cairo.so)
116   mv hb-cairo/* "$pkgdir"
118   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
121 package_harfbuzz-icu() {
122   pkgdesc+=" - ICU integration"
123   depends=(
124     libharfbuzz.so
125     libicuuc.so
126   )
127   provides=(libharfbuzz-icu.so)
129   mv hb-icu/* "$pkgdir"
131   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
134 package_harfbuzz-utils() {
135   pkgdesc+=" - Utilities"
136   depends=(
137     harfbuzz
138     harfbuzz-cairo
139     libcairo.so
140     libchafa.so
141     libfreetype.so
142     libglib-2.0.so
143     libgobject-2.0.so
144     libharfbuzz-cairo.so
145     libharfbuzz-gobject.so
146     libharfbuzz-subset.so
147     libharfbuzz.so
148   )
150   mv hb-utils/* "$pkgdir"
152   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
155 package_harfbuzz-docs() {
156   pkgdesc+=" - Documentation"
157   depends=()
159   mv hb-docs/* "$pkgdir"
161   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
164 # vim:set sw=2 sts=-1 et: