APKBUILD 3.08 KB
Newer Older
Mika Havela's avatar
Mika Havela committed
1
# Contributor: Mika Havela <mika.havela@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Mika Havela's avatar
Mika Havela committed
3
pkgname=fontconfig
4
pkgver=2.11.1
5
pkgrel=2
Mika Havela's avatar
Mika Havela committed
6 7
pkgdesc="The Fontconfig package is a library for configuring and customizing font access."
url="http://fontconfig.org"
8
arch="all"
Mika Havela's avatar
Mika Havela committed
9
license="GPL"
10
depends=
11
depends_dev="freetype-dev expat-dev"
12
makedepends="$depends_dev zlib-dev autoconf automake libtool py-lxml gperf"
Mika Havela's avatar
Mika Havela committed
13
install=
14
triggers="$pkgname.trigger=/usr/share/fonts/*"
15 16 17 18 19
subpackages="$pkgname-doc $pkgname-dev infinality-presets:infinality_presets"
# fontconfig-ultimate https://github.com/bohoomil/fontconfig-ultimate
_ultver="2015-06-09"
source="http://fontconfig.org/release/${pkgname}-${pkgver}.tar.gz
	fontconfig-ultimate-$_ultver.tar.gz::https://github.com/bohoomil/fontconfig-ultimate/archive/$_ultver.tar.gz"
Mika Havela's avatar
Mika Havela committed
20

21 22 23 24 25 26 27 28 29
_builddir="$srcdir/$pkgname-$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
30 31 32 33 34 35
        # infinality
        for j in "$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/*.patch; do
                msg "Applying ${j}"
                patch -p1 -i $j || return 1
        done
	cp -r "$srcdir"/fontconfig-ultimate-$_ultver/conf.d.infinality . || return 1
36 37
}

Mika Havela's avatar
Mika Havela committed
38
build() {
39
	cd "$_builddir"
Mika Havela's avatar
Mika Havela committed
40

41
	autoreconf -vif || return 1
42 43 44 45
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Mika Havela's avatar
Mika Havela committed
46
		--sysconfdir=/etc \
47
		--localstatedir=/var \
48 49
		--disable-docs \
		|| return 1
50
	make || return 1
51 52 53
}

package() {
54
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
55 56
	make -j1 DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la
Mika Havela's avatar
Mika Havela committed
57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
	install -m644 -D COPYING \
		"$pkgdir"/usr/share/licenses/"${pkgname}"/COPYING || return 1

	# infinality
	mkdir -p "$pkgdir"/etc/fonts/conf.avail.infinality || return 1
	cp -r "$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/combi \
		"$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/free \
		"$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/ms \
		"$pkgdir"/etc/fonts/conf.avail.infinality/ || return 1
	mkdir -p "$pkgdir"/usr/share/doc/fontconfig/fonts-settings
	cp -r "$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/fonts-settings \
		"$pkgdir"/usr/share/doc/fontconfig/ || return 1
}

infinality_presets() {
	pkgdesc="infinality presets script"
	depends="bash"
	arch="noarch"
	install -Dm755 "$srcdir"/fontconfig-ultimate-$_ultver/fontconfig_patches/fc-presets \
		"$subpkgdir"/usr/bin/fc-presets || return 1
Mika Havela's avatar
Mika Havela committed
78 79
}

80 81 82 83 84 85
md5sums="e75e303b4f7756c2b16203a57ac87eba  fontconfig-2.11.1.tar.gz
70a971a34af0974bb61201925aab6929  fontconfig-ultimate-2015-06-09.tar.gz"
sha256sums="b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d  fontconfig-2.11.1.tar.gz
0195e8bff84ab973c001f04b9f5e9d59711444bfeebbed57ef76518975c91394  fontconfig-ultimate-2015-06-09.tar.gz"
sha512sums="a3eecb35a59c2f83e7fec1238ff288978643a1b2a2a7bff7b07bb62b2ccd48aa7a6b5b164472f019efd390e9eea5391313c070dcbd680a2e1227ea8ec125e28b  fontconfig-2.11.1.tar.gz
766562cb90651936edb43c206b30653a50fc401c2b9affe7cad73d69adfba3aaa6362830153eda6631dc3b8f5d0fd9b02934326ff1c4a68d136555bd6a48db86  fontconfig-ultimate-2015-06-09.tar.gz"