~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to debian/patches/missing_cflags

  • Committer: Package Import Robot
  • Author(s): Michael Hanke
  • Date: 2012-03-30 12:40:01 UTC
  • mfrom: (9.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120330124001-ze0lhxm5uwq2e3mo
Tags: 3.4.2-2
Added patch to handle a missing CFLAGS variable in Python's sysconfig
report (Closes: #661658).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Michael Hanke <michael.hanke@gmail.com>
 
2
Subject: Gracefully handle missing CFLAGS variable in sysconfig on kfreebsd
 
3
 
 
4
Bug-Debian: http://bugs.debian.org/661658
 
5
 
 
6
diff --git a/configure b/configure
 
7
index cafe008..62c64ec 100755
 
8
--- a/configure
 
9
+++ b/configure
 
10
@@ -776,7 +776,9 @@ then
 
11
 from distutils import sysconfig
 
12
 flags = ['-I' + sysconfig.get_python_inc(),
 
13
         '-I' + sysconfig.get_python_inc(plat_specific=True)]
 
14
-flags.extend(sysconfig.get_config_var('CFLAGS').split())
 
15
+syscfgflags = sysconfig.get_config_var('CFLAGS')
 
16
+if not syscfgflags is None:
 
17
+       flags.extend(syscfgflags.split())
 
18
 print ' '.join(flags)
 
19
 EOF
 
20
                                ${python} > $python_ldflags_file <<EOF