summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-02 15:05:57 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-02 15:05:57 +0100
commitd93b039644847733687d1d30c09d6861fb57e8e4 (patch)
tree7693a1dd5aa5c974657ad1386c1cc630739e0b45 /package
parentd88086dcd2cb3c1a742b87a9aaa58ec3ec39f30d (diff)
fix python breakage after STAGING_HOST_DIR renaming
Diffstat (limited to 'package')
-rw-r--r--package/python2/Makefile13
-rw-r--r--package/python2/files/patch-Lib_distutils_sysconfig_py10
-rw-r--r--package/python2/files/python-config.patch4
-rw-r--r--package/python2/patches/patch-Lib_distutils_sysconfig_py10
4 files changed, 23 insertions, 14 deletions
diff --git a/package/python2/Makefile b/package/python2/Makefile
index 25378bd52..fe284da9d 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= python2
PKG_VERSION:= 2.7.5
-PKG_RELEASE:= 10
+PKG_RELEASE:= 11
PKG_MD5SUM:= b4f01a1d0ba0b46b05c73b2ac909b1df
PKG_DESCR:= Python scripting language (Version 2)
PKG_SECTION:= lang
@@ -103,11 +103,20 @@ HOST_CONFIGURE_ARGS:= --with-threads \
--without-cxx-main
CFLAGS_FOR_BUILD+= -fPIC
+post-extract:
+ $(CP) $(TOPDIR)/package/python2/files/patch-Lib_distutils_sysconfig_py $(WRKBUILD)
+ $(SED) "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
+ $(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" $(WRKBUILD)/patch-Lib_distutils_sysconfig_py
+ (cd $(WRKBUILD) && patch -p0 <$(WRKBUILD)/patch-Lib_distutils_sysconfig_py)
+
hostpost-install:
$(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \
$(STAGING_HOST_DIR)/usr/bin/pgen
+ $(CP) $(TOPDIR)/package/python2/files/python-config.patch $(WRKBUILD)/
+ $(SED) "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" $(WRKBUILD)/python-config.patch
+ $(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" $(WRKBUILD)/python-config.patch
(cd $(STAGING_HOST_DIR)/usr/bin && \
- patch -p0 < $(TOPDIR)/package/python2/files/python-config.patch)
+ patch -p0 < $(WRKBUILD)/python-config.patch)
pre-configure:
$(SED) "s#@EXENAME@#$(STAGING_HOST_DIR)/usr/bin/python#" \
diff --git a/package/python2/files/patch-Lib_distutils_sysconfig_py b/package/python2/files/patch-Lib_distutils_sysconfig_py
new file mode 100644
index 000000000..cbd51020d
--- /dev/null
+++ b/package/python2/files/patch-Lib_distutils_sysconfig_py
@@ -0,0 +1,10 @@
+--- Lib.orig/distutils/sysconfig.py 2013-05-12 05:32:42.000000000 +0200
++++ Lib/distutils/sysconfig.py 2013-11-03 18:03:53.000000000 +0100
+@@ -76,6 +76,7 @@ def get_python_inc(plat_specific=0, pref
+ """
+ if prefix is None:
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
++ prefix = re.sub('@@STAGING_HOST_DIR@@', '@@STAGING_TARGET_DIR@@', prefix)
+
+ if os.name == "posix":
+ if python_build:
diff --git a/package/python2/files/python-config.patch b/package/python2/files/python-config.patch
index 9478835d5..0a6ff7145 100644
--- a/package/python2/files/python-config.patch
+++ b/package/python2/files/python-config.patch
@@ -14,8 +14,8 @@
elif opt in ('--includes', '--cflags'):
- flags = ['-I' + sysconfig.get_python_inc(),
- '-I' + sysconfig.get_python_inc(plat_specific=True)]
-+ flags = ['-I' + re.sub('target_', 'host_', sysconfig.get_python_inc()),
-+ '-I' + re.sub('target_', 'host_', sysconfig.get_python_inc(plat_specific=True))]
++ flags = ['-I' + re.sub('@@STAGING_TARGET_DIR@@', '@@STAGING_HOST_DIR@@', sysconfig.get_python_inc()),
++ '-I' + re.sub('@@STAGING_TARGET_DIR@@', '@@STAGING_HOST_DIR@@', sysconfig.get_python_inc(plat_specific=True))]
if opt == '--cflags':
flags.extend(getvar('CFLAGS').split())
print ' '.join(flags)
diff --git a/package/python2/patches/patch-Lib_distutils_sysconfig_py b/package/python2/patches/patch-Lib_distutils_sysconfig_py
deleted file mode 100644
index 30aae0816..000000000
--- a/package/python2/patches/patch-Lib_distutils_sysconfig_py
+++ /dev/null
@@ -1,10 +0,0 @@
---- Python-2.7.5.orig/Lib/distutils/sysconfig.py 2013-05-12 05:32:42.000000000 +0200
-+++ Python-2.7.5/Lib/distutils/sysconfig.py 2013-11-03 18:03:53.000000000 +0100
-@@ -76,6 +76,7 @@ def get_python_inc(plat_specific=0, pref
- """
- if prefix is None:
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ prefix = re.sub('host_', 'target_', prefix)
-
- if os.name == "posix":
- if python_build: