diff --git a/srcpkgs/python3-cairo-devel b/srcpkgs/python3-cairo-devel new file mode 120000 index 00000000000..ca29e9581bc --- /dev/null +++ b/srcpkgs/python3-cairo-devel @@ -0,0 +1 @@ +python3-cairo \ No newline at end of file diff --git a/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_4.patch b/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_4.patch new file mode 100644 index 00000000000..29a4d8b6a11 --- /dev/null +++ b/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_4.patch @@ -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: diff --git a/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_5.patch b/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_5.patch new file mode 100644 index 00000000000..48d38ee806b --- /dev/null +++ b/srcpkgs/python3-cairo/files/pycairo-1.10.0-waf-py3_5.patch @@ -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) diff --git a/srcpkgs/python3-cairo/template b/srcpkgs/python3-cairo/template new file mode 100644 index 00000000000..5ced40885a9 --- /dev/null +++ b/srcpkgs/python3-cairo/template @@ -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 " +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 + } +} diff --git a/srcpkgs/python3-cairo/update b/srcpkgs/python3-cairo/update new file mode 100644 index 00000000000..c909e11c361 --- /dev/null +++ b/srcpkgs/python3-cairo/update @@ -0,0 +1 @@ +pkgname=pycairo