aboutsummaryrefslogtreecommitdiffstats
path: root/main/cairo/APKBUILD
blob: 7ad2f6573d3f7df97d663ba20809c3f46d7bdb08 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cairo
pkgver=1.12.2
pkgrel=0
pkgdesc="Cairo vector graphics library"
url="http://cairographics.org/"
arch="all"
license="LGPL MPL"
depends=
depends_dev="fontconfig-dev freetype-dev libpng-dev libxrender-dev pixman-dev
	xcb-util-dev glib-dev"
makedepends="$depends_dev zlib-dev expat-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-gobject $pkgname-tools"
source="http://cairographics.org/releases/$pkgname-$pkgver.tar.xz"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$_builddir"
  	sed -i -e 's/libpng13/libpng14/g' configure || return 1
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-xcb \
		--enable-gobject \
		--enable-tee \
		--disable-static || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la "$pkgdir"/usr/lib/*/*.la
}

gobject() {
	pkgdesc="GObject bindings for cairo"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libcairo-gobject.so.* "$subpkgdir"/usr/lib/
}

tools() {
	pkgdesc="Development tools for cairo"
	mkdir -p "$subpkgdir"/usr/lib/cairo
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ || return 1
	mv "$pkgdir"/usr/lib/cairo/libcairo-trace.* \
		"$subpkgdir"/usr/lib/cairo/
}

md5sums="87649eb75789739d517c743e94879e51  cairo-1.12.2.tar.xz"