aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fontforge/APKBUILD
blob: e675a28537f6642c9d307d47e6e81e1625d87af3 (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
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=20201107
pkgrel=0
pkgdesc="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="cf9666395405ab02943f0160959f04251bd2a80e279a8f60431089ad19a4c5a232efd42097050ed9f6c1fb39d01488176262949fd81f5f0960fe853b497437dc  fontforge-20201107.tar.xz
8cb3fb00fa537eab2d4b194916343a0e2aab85c2415a1944c0d0e648d62a7748d5d4465fb99cb92385b749e73abfcaa429f4c9d2bb4c2edea8febeb227add93a  fix-select.patch"