New package: python3-cairo-1.10.0 (replaces python3.4-cairo)

Fix build with Python 3.5.
This commit is contained in:
Alessio Sergi 2016-10-16 19:06:45 +02:00
parent 16c3cb8021
commit 1ed7b0f318
5 changed files with 58 additions and 0 deletions

1
srcpkgs/python3-cairo-devel Symbolic link
View file

@ -0,0 +1 @@
python3-cairo

View file

@ -0,0 +1,11 @@
--- 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

@ -0,0 +1,10 @@
--- 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)

View file

@ -0,0 +1,35 @@
# Template file for 'python3-cairo'
pkgname=python3-cairo
version=1.10.0
revision=8
nocross=yes
wrksrc="pycairo-${version}"
build_style=waf3
hostmakedepends="pkg-config python3"
makedepends="cairo-devel python3-devel"
short_desc="Python3 bindings for the cairo graphics library"
homepage="http://cairographics.org/pycairo/"
license="LGPL-3"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
distfiles="http://cairographics.org/releases/pycairo-${version}.tar.bz2"
checksum=9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be
replaces="python3.4-cairo>=0"
post_extract() {
# We need to call waf to extract waflib before patching files
python3 waf --version 1>&2 > /dev/null
ln -s .waf3-* waf3
cd waf3
patch -Np1 -i ${FILESDIR}/pycairo-1.10.0-waf-py3_4.patch
patch -Np1 -i ${FILESDIR}/pycairo-1.10.0-waf-py3_5.patch
}
python3-cairo-devel_package() {
replaces="python3.4-cairo-devel>=0"
depends="python3-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
}
}

View file

@ -0,0 +1 @@
pkgname=pycairo