db-move: moved seahorse from [testing] to [extra] (x86_64)
[arch-packages.git] / harfbuzz / trunk / PKGBUILD
blobed8a06e4664b07d9a1539b9af1a8797844e5b508
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.2.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=a321c4fee56b15247c10f9aa3db7e7ccb3b8173b  # tags/7.2.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   )
53   # Harfbuzz wants no exceptions
54   CFLAGS="${CFLAGS/-fexceptions/}"
55   CXXFLAGS="${CXXFLAGS/-fexceptions/}"
57   arch-meson harfbuzz build "${meson_options[@]}"
58   meson compile -C build
61 check() {
62   mkdir -p tmp
63   TMPDIR="$PWD/tmp" meson test -C build --print-errorlogs
64   rm -r tmp
67 _pick() {
68   local p="$1" f d; shift
69   for f; do
70     d="$srcdir/$p/${f#$pkgdir/}"
71     mkdir -p "$(dirname "$d")"
72     mv "$f" "$d"
73     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
74   done
77 package_harfbuzz() {
78   depends=(
79     libfreetype.so
80     libglib-2.0.so
81     libgobject-2.0.so
82     libgraphite2.so
83   )
84   optdepends=('harfbuzz-utils: utilities')
85   provides=(libharfbuzz{,-subset,-gobject}.so)
87   meson install -C build --destdir "$pkgdir"
89   ( cd "$pkgdir"
91     _pick hb-cairo usr/lib/libharfbuzz-cairo*
92     _pick hb-cairo usr/lib/pkgconfig/harfbuzz-cairo.pc
93     _pick hb-cairo usr/include/harfbuzz/hb-cairo.h
95     _pick hb-icu usr/lib/libharfbuzz-icu*
96     _pick hb-icu usr/lib/pkgconfig/harfbuzz-icu.pc
97     _pick hb-icu usr/include/harfbuzz/hb-icu.h
99     _pick hb-utils usr/bin
101     _pick hb-docs usr/share/gtk-doc
102   )
104   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
107 package_harfbuzz-cairo() {
108   pkgdesc+=" - Cairo integration"
109   depends=(
110     libcairo.so
111     libharfbuzz.so
112   )
113   provides=(libharfbuzz-cairo.so)
115   mv hb-cairo/* "$pkgdir"
117   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
120 package_harfbuzz-icu() {
121   pkgdesc+=" - ICU integration"
122   depends=(
123     libharfbuzz.so
124     libicuuc.so
125   )
126   provides=(libharfbuzz-icu.so)
128   mv hb-icu/* "$pkgdir"
130   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
133 package_harfbuzz-utils() {
134   pkgdesc+=" - Utilities"
135   depends=(
136     harfbuzz
137     harfbuzz-cairo
138     libcairo.so
139     libchafa.so
140     libfreetype.so
141     libglib-2.0.so
142     libgobject-2.0.so
143     libharfbuzz-cairo.so
144     libharfbuzz-gobject.so
145     libharfbuzz-subset.so
146     libharfbuzz.so
147   )
149   mv hb-utils/* "$pkgdir"
151   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
154 package_harfbuzz-docs() {
155   pkgdesc+=" - Documentation"
156   depends=()
158   mv hb-docs/* "$pkgdir"
160   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 harfbuzz/COPYING
163 # vim:set sw=2 sts=-1 et: