summaryrefslogtreecommitdiff
path: root/main/harfbuzz/APKBUILD
blob: 09c2657ca7c328e2cd5485f2e7ecec4cdd059532 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Contributor: Sören Tempel <soeren+alpinelinux@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=harfbuzz
pkgver=7.3.0
pkgrel=1
pkgdesc="Text shaping library"
url="https://harfbuzz.github.io/"
arch="all"
license="MIT"
makedepends="
	cairo-dev
	freetype-dev
	glib-dev
	gobject-introspection-dev
	graphite2-dev
	gtk-doc
	icu-dev
	meson
	"
checkdepends="python3"
subpackages="
	$pkgname-static
	$pkgname-dev
	$pkgname-cairo
	$pkgname-doc
	$pkgname-gobject
	$pkgname-icu
	$pkgname-subset
	$pkgname-utils
	"
source="https://github.com/harfbuzz/harfbuzz/releases/download/$pkgver/harfbuzz-$pkgver.tar.xz"

# secfixes:
#   4.4.1-r0:
#     - CVE-2022-33068

build() {
	CFLAGS="$CFLAGS -O2 -flto=auto -ffat-lto-objects" \
	CXXFLAGS="$CXXFLAGS -O2 -flto=auto -ffat-lto-objects" \
	CPPFLAGS="$CPPFLAGS -O2 -flto=auto -ffat-lto-objects" \
	abuild-meson \
		--default-library=both \
		-Dglib=enabled \
		-Dgobject=enabled \
		-Dgraphite=enabled \
		-Dicu=enabled \
		-Dfreetype=enabled \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		-Dcairo=enabled \
		-Ddocs=enabled \
		. output
	meson compile -C output
}

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

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

icu() {
	pkgdesc="Harfbuzz ICU support library"
	replaces="harfbuzz"

	amove usr/lib/lib*icu.so.*
}

gobject() {
	pkgdesc="Harfbuzz gobject library"
	amove usr/lib/lib*gobject.so.*
}

cairo() {
	pkgdesc="Harfbuzz cairo library"
	amove usr/lib/lib*cairo.so.*
}

subset() {
	pkgdesc="Harfbuzz subset library"
	amove usr/lib/lib*subset.so.*
}

utils() {
	pkgdesc="$pkgdesc (utilities)"

	amove usr/bin
}

dev() {
	default_dev
	provides="harfbuzz-bootstrap-dev"
	provider_priority=2
}

sha512sums="
e1fb484e4117cedc72bd473ee91b2f6143533fb467ec9a64361f0c7ffd8b5a44ad2ea42daa948a2d5d85297ace4b640fcd24a8291b0d75a1d4ee468c629febe9  harfbuzz-7.3.0.tar.xz
"