aboutsummaryrefslogtreecommitdiffstats
path: root/main/harfbuzz/APKBUILD
blob: 5f7f19d35c24fb5594663e141e2a08dce5942d3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Contributor: Sören Tempel <soeren+alpinelinux@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=harfbuzz
pkgver=2.9.1
pkgrel=0
pkgdesc="Text shaping library"
url="https://freedesktop.org/wiki/Software/HarfBuzz"
arch="all"
license="MIT"
# tests depend on certain freetype behaviours
options="!check"
makedepends="freetype-dev glib-dev gobject-introspection-dev cairo-dev icu-dev
	graphite2-dev meson gtk-doc"
checkdepends="python3"
subpackages="$pkgname-static $pkgname-dev $pkgname-icu $pkgname-utils $pkgname-doc"
source="harfbuzz-$pkgver.tar.gz::https://github.com/harfbuzz/harfbuzz/archive/$pkgver.tar.gz"

build() {
	abuild-meson \
		--default-library=both \
		-Dglib=enabled \
		-Dgobject=enabled \
		-Dgraphite=enabled \
		-Dicu=enabled \
		-Dfreetype=enabled \
		-Dcairo=enabled \
		-Ddocs=enabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

static() {
	pkgdesc="$pkgdesc (static libraries)"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

icu() {
	pkgdesc="Harfbuzz ICU support library"
	replaces="harfbuzz"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*icu.so.* "$subpkgdir"/usr/lib/
}

utils() {
	pkgdesc="$pkgdesc (utilities)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="
f8bb1d75b498d1581e76c57e5a15999e2c0d745d7d73dad17bfc91daf000f96d17c4924e6fb31270c90c26693dd504a7e7b2add152a013acca2491a86256b07b  harfbuzz-2.9.1.tar.gz
"