summaryrefslogtreecommitdiff
path: root/dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch')
-rw-r--r--dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch b/dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch
new file mode 100644
index 00000000000..c136cb0c39a
--- /dev/null
+++ b/dev-python/pycairo/files/py2cairo-1.10.0-xpyb.patch
@@ -0,0 +1,38 @@
+--- py2cairo-1.10.0/wscript
++++ py2cairo-1.10.0/wscript
+@@ -10,6 +10,7 @@
+ APPNAME='py2cairo'
+ VERSION='1.10.0'
+ cairo_version_required = '1.10.0'
++xpyb_version_required = '1.3'
+
+
+ def check_svg():
+@@ -23,6 +24,17 @@
+ return False
+
+
++def check_xpyb():
++ if os.environ.get('PYCAIRO_DISABLE_XPYB', None) is None:
++ return_code = subprocess.call(['pkg-config', '--exists', 'xpyb'])
++ if return_code == 0:
++ return True
++ else:
++ return False
++ else:
++ return False
++
++
+ def options(ctx):
+ print(' %s/options()' %d)
+ ctx.tool_options('gnu_dirs')
+@@ -41,6 +53,9 @@
+ ctx.check_python_headers()
+ ctx.check_cfg(package='cairo', atleast_version=cairo_version_required,
+ args='--cflags --libs')
++ if check_xpyb():
++ ctx.check_cfg(package='xpyb', atleast_version=xpyb_version_required,
++ args='--cflags --libs', mandatory=False)
+
+ # add gcc options
+ if env['CC_NAME'] == 'gcc':