aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-cairo/APKBUILD
blob: 3fb4f6d6e1c4533d91b98dfdcdd63d3384e23411 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-cairo
pkgver=1.10.0
pkgrel=0
pkgdesc="Python bindings for the cairo graphics library"
url="http://cairographics.org/pycairo/"
arch="all"
license="LGPL2+"
depends=""
makedepends="python3-dev cairo-dev"
install=""
subpackages="$pkgname-dev"
source="http://cairographics.org/releases/pycairo-$pkgver.tar.bz2
	pycairo-1.10.0-waf-py3_4.patch
	pycairo-1.10.0-waf-py3_5.patch	
	"
builddir="$srcdir"/pycairo-$pkgver

prepare() {
	cd "$builddir"
	# this waf stuff is insane.
	python3 waf --version 1>&2 > /dev/null
	cd .waf3-*
	patch -p1 -i "$srcdir"/pycairo-1.10.0-waf-py3_4.patch
	patch -p1 -i "$srcdir"/pycairo-1.10.0-waf-py3_5.patch
}

build() {
	cd "$builddir"
	export PYTHON=python3
	python3 waf configure --prefix=/usr || return 1
	python3 waf build || return 1
}

package() {
	cd "$builddir"
	export PYTHON=python3
	python3 waf install --destdir="${pkgdir}" || return 1
}

sha512sums="a03db6f04cea504985f390b0734042390f491f32ae2bee1299dabbafd369fde36bb506ebb941d22bbc11b0d008c4f758baeacf309a7336880529455092db829f  pycairo-1.10.0.tar.bz2
bd27bbb649565ed7aa21bbf6fa01907793fcfbd228640c76a38b632f77004d9770a6a2b0807c7492e6b53aa5254f55771b4e7247d8e656758e3ed84bf28bf625  pycairo-1.10.0-waf-py3_4.patch
a8257a8725e7d2a0ca443661a9802f8a028d2960be3012e761adb7642508924ff02a307e71c06c8b302cee3c12d256186959580817dc1a080a6d58393be0121a  pycairo-1.10.0-waf-py3_5.patch"