aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fontforge/APKBUILD
blob: b09b3e7c9dcf4c04f26d00c80f489535191efe97 (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
# Contributor: Ed Robinson <ed@reevoo.com>
# Maintainer: Ed Robinson <ed@reevoo.com>
pkgname=fontforge
pkgver=20200314
pkgrel=1
pkgdesc="FontForge is a free (libre) font editor for Windows, Mac OS X and GNU+Linux."
url="https://fontforge.org"
arch="all !s390x !x86 !mips !mips64" # test139_ff hangs on x86
license="GPL-3.0-or-later"
makedepends="
	cmake
	pango-dev
	giflib-dev
	tiff-dev
	libxml2-dev
	libspiro-dev
	python3-dev
	potrace
	woff2-dev
	gtk+3.0-dev
	libuninameslist-dev
	readline-dev
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-python3:_py3
	"
source="https://github.com/fontforge/fontforge/releases/download/$pkgver/fontforge-$pkgver.tar.xz
	fix-select.patch
	"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DENABLE_GUI=ON \
		-DENABLE_X11=OFF \
		-DENABLE_PYTHON_SCRIPTING=ON \
		-DENABLE_PYTHON_EXTENSION=ON \
		-DENABLE_LIBSPIRO=ON \
		-DENABLE_LIBUNINAMESLIST=ON \
		-DENABLE_LIBGIF=ON \
		-DENABLE_LIBJPEG=ON \
		-DENABLE_LIBPNG=ON \
		-DENABLE_LIBREADLINE=ON \
		-DENABLE_LIBTIFF=ON \
		-DENABLE_WOFF2=ON \
		-DENABLE_DOCS=OFF \
		$CMAKE_CROSSOPTS .
	make -C build
}

check() {
	make -C build check
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

_py3() {
	pkgdesc="python3 bindings for $pkgname"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib

	mkdir -p "$subpkgdir"/usr/share/fontforge/python
	mv "$pkgdir"/usr/share/fontforge/python/excepthook.py "$subpkgdir"/usr/share/fontforge/python
}

sha512sums="09f5dc93f87ca63668d72d108690604489d6b3cec7eedff1c07ad6d1ce5eae442ab60e79e71ae8b99e9808f3551011788025a86ffc3a9738518d99761d849975  fontforge-20200314.tar.xz
8cb3fb00fa537eab2d4b194916343a0e2aab85c2415a1944c0d0e648d62a7748d5d4465fb99cb92385b749e73abfcaa429f4c9d2bb4c2edea8febeb227add93a  fix-select.patch"