From 373b02e5a722414aa9e25e19c1563f245c1d49ea Mon Sep 17 00:00:00 2001
From: George McCollister <george.mccollister@gmail.com>
Date: Thu, 16 Dec 2010 07:56:48 -0600
Subject: [PATCH] python: Add SYSROOT to path in python2.6-config

Add SYSROOT to python path in python2.6-config so it works correctly.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 .../0020-python-add-sysroot-to-EXENAME-path.patch  | 38 ++++++++++++++++++++++
 patches/Python-2.6.6/series                        |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch

diff --git a/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch b/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch
new file mode 100644
index 0000000..af52bdb
--- /dev/null
+++ b/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch
@@ -0,0 +1,38 @@
+From 2229c9e1a3e657b7b3fadf9b2487caef3c501d08 Mon Sep 17 00:00:00 2001
+From: George McCollister <george.mccollister@gmail.com>
+Date: Wed, 15 Dec 2010 17:35:24 -0600
+Subject: [PATCH 20/20] python: add sysroot to EXENAME path.
+
+python2.6-config points to the wrong location for the host python
+binary.
+
+Signed-off-by: George McCollister <george.mccollister@gmail.com>
+---
+ Makefile.pre.in |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 99ca8be..085fff1 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -77,6 +77,8 @@ ifndef DESTDIR
+ sysroot=	@SYSROOT@
+ endif
+ 
++SYSROOTFORCONFIG=@SYSROOT@
++
+ # Machine-dependent subdirectories
+ MACHDEP=	@MACHDEP@
+ 
+@@ -974,7 +976,7 @@ libainstall:	all
+ 	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
+ 	# Substitution happens here, as the completely-expanded BINDIR
+ 	# is not available in configure
+-	sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
++	sed -e "s,@EXENAME@,$(SYSROOTFORCONFIG)$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
+ 	$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
+ 	rm python-config
+ 	@if [ -s Modules/python.exp -a \
+-- 
+1.7.1
+
diff --git a/patches/Python-2.6.6/series b/patches/Python-2.6.6/series
index 3b95370..ab88a34 100644
--- a/patches/Python-2.6.6/series
+++ b/patches/Python-2.6.6/series
@@ -19,4 +19,5 @@
 0017-python-don-t-add-rpaths-in-setup.py.patch
 0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
 0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch
+0020-python-add-sysroot-to-EXENAME-path.patch
 # 31950c9abe57324bafb77406b67f36fb  - git-ptx-patches magic
-- 
1.8.0

