lbry-fdroid/p4a/pythonforandroid/recipes/python2legacy/patches/fix-setup-flags.patch

17 lines
618 B
Diff
Raw Normal View History

2017-08-13 03:24:00 +02:00
--- Python-2.7.2/setup.py.orig 2012-01-08 15:10:39.867332119 +0100
+++ Python-2.7.2/setup.py 2012-01-08 15:10:45.723331911 +0100
@@ -445,6 +445,13 @@
'/lib', '/usr/lib',
]
inc_dirs += ['/usr/include']
+ else:
+ cflags = os.environ.get('CFLAGS')
+ if cflags:
+ inc_dirs += [x[2:] for x in cflags.split() if x.startswith('-I')]
+ ldflags = os.environ.get('LDFLAGS')
+ if ldflags:
+ lib_dirs += [x[2:] for x in ldflags.split() if x.startswith('-L')]
exts = []
missing = []