main/py-cairo: uprade to 1.16.3 and replace py{2,3}-cairo

This commit is contained in:
Natanael Copa 2018-04-26 12:38:52 +00:00
parent 90055357d3
commit efa22b5b63
5 changed files with 50 additions and 95 deletions

50
main/py-cairo/APKBUILD Normal file
View File

@ -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"

View File

@ -1,31 +0,0 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py2-cairo
_pkgname=py2cairo
pkgver=1.10.0
pkgrel=0
pkgdesc="Python bindings for the cairo graphics library"
url="http://cairographics.org/pycairo/"
arch="all"
license="LGPL-2.0-or-later"
options="!check"
depends=""
makedepends="python2-dev cairo-dev"
replaces=py-cairo
install=""
subpackages="$pkgname-dev"
source="http://cairographics.org/releases/$_pkgname-$pkgver.tar.bz2"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
cd "$builddir"
./waf configure --prefix=/usr || return 1
./waf build || return 1
}
package() {
cd "$builddir"
./waf install --destdir="${pkgdir}" || return 1
}
sha512sums="cb3d54de9af4134460ce731da8166a3127a642c8a2e6184109437ddec115cd55b8dd2413a5c81700277bfe2f22fcfe268db4f3ba0f7649751e85bb34295f79fc py2cairo-1.10.0.tar.bz2"

View File

@ -1,43 +0,0 @@
# 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="LGPL-2.0-or-later"
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"

View File

@ -1,11 +0,0 @@
--- a/waflib/Tools/python.py.orig
+++ b/waflib/Tools/python.py
@@ -169,7 +169,7 @@
conf.find_program('python-config-%s'%num,var='PYTHON_CONFIG',mandatory=False)
includes=[]
if conf.env.PYTHON_CONFIG:
- for incstr in conf.cmd_and_log(conf.env.PYTHON+[conf.env.PYTHON_CONFIG,'--includes']).strip().split():
+ for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG,'--includes']).strip().split():
if(incstr.startswith('-I')or incstr.startswith('/I')):
incstr=incstr[2:]
if incstr not in includes:

View File

@ -1,10 +0,0 @@
--- a/waflib/Build.py.orig
+++ b/waflib/Build.py
@@ -151,6 +151,7 @@ class BuildContext(Context.Context):
f.close()
self.init_dirs()
def store(self):
+ return
data={}
for x in SAVED_ATTRS:
data[x]=getattr(self,x)