diff options
Diffstat (limited to 'dev-lang/python/files/python-2.7.6-includeflags.patch')
-rw-r--r-- | dev-lang/python/files/python-2.7.6-includeflags.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-lang/python/files/python-2.7.6-includeflags.patch b/dev-lang/python/files/python-2.7.6-includeflags.patch new file mode 100644 index 0000000..a76dcdd --- /dev/null +++ b/dev-lang/python/files/python-2.7.6-includeflags.patch @@ -0,0 +1,33 @@ +diff -urpN Python-2.7.6.orig/Misc/python-config.in Python-2.7.6/Misc/python-config.in +--- Python-2.7.6.orig/Misc/python-config.in 2014-01-02 05:59:02.832703535 -0800 ++++ Python-2.7.6/Misc/python-config.in 2014-01-02 06:57:36.856587292 -0800 +@@ -37,8 +37,18 @@ for opt in opt_flags: + print sysconfig.EXEC_PREFIX + + elif opt in ('--includes', '--cflags'): ++ pyi = sysconfig.get_python_inc(plat_specific=True) + flags = ['-I' + sysconfig.get_python_inc(), +- '-I' + sysconfig.get_python_inc(plat_specific=True)] ++ '-I' + pyi] ++ ++ # gentoo multilib header de-wrappification ++ chost = os.getenv('CTARGET') ++ if not chost: ++ chost = os.getenv('CHOST') ++ if chost: ++ if pyi.endswith('/python%s' % pyver): ++ flags.insert(0, '-I' + pyi.rsplit('/python%s' % pyver, 1)[0] + '/%s/python%s' % (chost, pyver)) ++ + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print ' '.join(flags) +diff -urpN Python-2.7.6.orig/Misc/python.pc.in Python-2.7.6/Misc/python.pc.in +--- Python-2.7.6.orig/Misc/python.pc.in 2013-11-09 23:36:41.000000000 -0800 ++++ Python-2.7.6/Misc/python.pc.in 2014-01-02 07:24:35.488961005 -0800 +@@ -9,5 +9,5 @@ Requires: + Version: @VERSION@ + Libs.private: @LIBS@ + Libs: -L${libdir} -lpython@VERSION@ +-Cflags: -I${includedir}/python@VERSION@ ++Cflags: -I${includedir}/@host_alias@/python@VERSION@ -I${includedir}/python@VERSION@ + |