diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-04-26 12:38:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-04-26 12:53:00 +0000 |
commit | efa22b5b632283ee120bbd840006a51af3cb3416 (patch) | |
tree | f46d432722e19ee19376e9814732a1b31fe787e5 /main/py-cairo | |
parent | 90055357d339e419552f8a1bf4c5aca75ddd58b9 (diff) | |
download | aports-efa22b5b632283ee120bbd840006a51af3cb3416.tar.bz2 aports-efa22b5b632283ee120bbd840006a51af3cb3416.tar.xz |
main/py-cairo: uprade to 1.16.3 and replace py{2,3}-cairo
Diffstat (limited to 'main/py-cairo')
-rw-r--r-- | main/py-cairo/APKBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/main/py-cairo/APKBUILD b/main/py-cairo/APKBUILD new file mode 100644 index 0000000000..e4da9517f9 --- /dev/null +++ b/main/py-cairo/APKBUILD @@ -0,0 +1,50 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=py-cairo +pkgver=1.16.3 +pkgrel=0 +pkgdesc="Python bindings for the cairo graphics library" +url="http://cairographics.org/pycairo/" +arch="all" +license="LGPL-2.0-or-later" +depends="" +makedepends="python2-dev python3-dev cairo-dev" +install="" +subpackages="$pkgname-dev py2-cairo:_py py3-cairo:_py" +source="https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz + " +builddir="$srcdir"/pycairo-$pkgver + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check +} + +package() { + cd "$builddir" + python2 setup.py install --prefix=/usr --root="$pkgdir" + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +_py() { + local py=${subpkgname%-*} + local pyver=${py#py} + local python="python$pyver" + pkgdesc="$pkgdesc (for $python)" + install_if="$pkgname=$pkgver-r$pkgrel $python" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/$python* "$subpkgdir"/usr/lib/ +} + +dev() { + default_dev + replaces="py2-cairo-dev py3-cairo-dev" +} + +sha512sums="d60978f85eb0430f2038b0e7d0bce23602e8c180a7611eea424fd8bc3cdd8ce249af364abd0e77ab3b7ab439761721cba5c2398f51af2a89add3fb7fda8aa5db pycairo-1.16.3.tar.gz" |