aboutsummaryrefslogtreecommitdiffstats
path: root/main/freetype/APKBUILD
blob: b17786d4f5968d491c8e41eb65ace4697a0746f5 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=freetype
pkgver=2.6.3
pkgrel=0
pkgdesc="TrueType font rendering library"
url="http://freetype.sourceforge.net"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev zlib-dev libpng-dev"
subpackages="$pkgname-dev $pkgname-doc"
# fontconfig-ultimate https://github.com/bohoomil/fontconfig-ultimate
_ultver="2016-02-12"
source="http://download.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.bz2
	fontconfig-ultimate-$_ultver.tar.gz::https://github.com/renatoaguiar/fontconfig-ultimate/archive/$_ultver.tar.gz
	40-memcpy-fix.patch"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	for i in "$srcdir"/*.patch; do
		msg "Applying ${i}"
		patch -p0 -i $i || return 1
	done
	# apply infinality
	for j in "$srcdir"/fontconfig-ultimate-$_ultver/$pkgname/*.patch; do
		case $j in
			*/gperf-for-infinality.patch)
				msg "Skipping ${j}"
			;;
			*)
				msg "Applying ${j}"
				patch -p1 -i $j || return 1
			;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1

	# for compat. This should be removed once all apps are properly using
	# pkg-config
	ln -s freetype2 "$pkgdir"/usr/include/freetype

	# install infinality profile settings
	install -Dm755 "$srcdir"/fontconfig-ultimate-$_ultver/$pkgname/infinality-settings.sh \
		"$pkgdir"/etc/X11/xinit/xinitrc.d/infinality-settings.sh || return 1
	sed -i "1i #!/bin/sh" \
		"$pkgdir"/etc/X11/xinit/xinitrc.d/infinality-settings.sh || return 1
}

md5sums="0037b25a8c090bc8a1218e867b32beb1  freetype-2.6.3.tar.bz2
d5d9467394b73baf4e830b3f6fc944cd  fontconfig-ultimate-2016-02-12.tar.gz
bd2d808a0c00dcf9f1d1c0a9a8227ad9  40-memcpy-fix.patch"
sha256sums="371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2  freetype-2.6.3.tar.bz2
c67e3a8c5cdb19636e936a822df862e59f84b468e3d70d0991b23bb37099d356  fontconfig-ultimate-2016-02-12.tar.gz
574c265c7a7032c5afb32a9807e5d04354ad0def656194cfcfff1ccca6a5540e  40-memcpy-fix.patch"
sha512sums="e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d  freetype-2.6.3.tar.bz2
b6d7a59c4a26b3b99a817e27eead2ca58538770b48af935100262223d5422c835c48590736cedb59ad220be3d7af6a7933e3137da99fdc8603f8fc8d81b8e4b9  fontconfig-ultimate-2016-02-12.tar.gz
1553f7f0514238012e300bc8d0b1e260145db17fb56f13e4aa667435e98c3749c00e150caa0e318289b84bca33b9a06a68b8342575e10ac3bf5af3d5cc861537  40-memcpy-fix.patch"