summaryrefslogtreecommitdiff
blob: 33de2692f8385dc20533c948c934e9df9b800036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- pycairo-1.10.0/wscript
+++ pycairo-1.10.0/wscript
@@ -10,6 +10,7 @@
 APPNAME='pycairo'
 VERSION='1.10.0'
 cairo_version_required = '1.10.0'
+xpyb_version_required  = '1.3'    # optional
 
 
 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')
@@ -42,6 +54,12 @@
   ctx.check_cfg(package='cairo', atleast_version=cairo_version_required,
                 args='--cflags --libs')
 
+# xpyb for Python 3 is not available yet.
+# the Python 3 version should probably have a different name than 'xpyb'
+#  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':
     env.append_unique('CCFLAGS', ['-std=c99', '-Wall'])