summaryrefslogtreecommitdiffstats
path: root/testing/graphite2/APKBUILD
blob: ace7953a8ee5f33346756654a22cd73a9be6801c (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=graphite2
pkgver=1.2.4
pkgrel=0
pkgdesc="reimplementation of the SIL Graphite text processing engine"
url="http://projects.palaso.org/projects/graphitedev/"
arch="all"
license="LGPL"
depends=""
depends_dev="freetype-dev"
makedepends="$depends_dev python cmake"
install=""
subpackages="$pkgname-dev"
source="http://downloads.sourceforge.net/project/silgraphite/graphite2/graphite2-$pkgver.tgz"

_builddir="$srcdir"/graphite2-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	mkdir build && cd build
	cmake -G "Unix Makefiles" .. \
		-DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE:STRING=Release \
		-DGRAPHITE2_COMPARE_RENDERER=OFF || return 1
	# fix unwanted -O3 cflag (taken form Debian)
	find . -type f ! -name "rules" ! -name "changelog" -exec sed -i -e 's/\-O3//g' {} \;
	make || return 1
}

package() {
	cd "$_builddir"/build
	make DESTDIR="$pkgdir/" install
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="2ef839348fe28e3b923bf8cced440227  graphite2-1.2.4.tgz"
sha256sums="4bc3d5168029bcc0aa00eb2c973269d29407be2796ff56f9c80e10736bd8b003  graphite2-1.2.4.tgz"
sha512sums="fb4a7bfd5656233975ce339e4e155ccb4fd401b87e30440edab98739355596e41abf5dccf6487d53f6353840a7c87b8270ee33e79c6630cf13a25ac2cb2114de  graphite2-1.2.4.tgz"