summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-12-28 00:34:02 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2015-12-28 02:15:35 +0100
commit0d1005ce15f0b9a8f13e46d70f9f510e8e40ffce (patch)
treecad04f75cba26a2640f74149e04ce12f606aa80d
parent041aa661e323c6b75d0bac0e01e35042934afd88 (diff)
downloadptxdist-0d1005ce15f0b9a8f13e46d70f9f510e8e40ffce.tar.gz
ptxdist-0d1005ce15f0b9a8f13e46d70f9f510e8e40ffce.tar.xz
python3: improve python-config
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/host-python3.make7
-rw-r--r--rules/python3.make4
2 files changed, 11 insertions, 0 deletions
diff --git a/rules/host-python3.make b/rules/host-python3.make
index 76cc84cc9..b13fddc2f 100644
--- a/rules/host-python3.make
+++ b/rules/host-python3.make
@@ -63,4 +63,11 @@ $(STATEDIR)/host-python3.install:
"$(HOST_PYTHON3_PKGDIR)/bin/python3-config"
@$(call touch)
+$(STATEDIR)/host-python3.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, HOST_PYTHON3)
+ @sed -i 's;prefix_build="";prefix_build="$(PTXDIST_SYSROOT_HOST)";' \
+ $(PTXDIST_SYSROOT_HOST)/bin/python3*-config
+ @$(call touch)
+
# vim: syntax=make
diff --git a/rules/python3.make b/rules/python3.make
index 1eefbc4f7..8294bbead 100644
--- a/rules/python3.make
+++ b/rules/python3.make
@@ -108,6 +108,10 @@ $(STATEDIR)/python3.install.post:
@chmod a+x "$(CROSS_PYTHON3)"
@ln -sf "python$(PYTHON3_MAJORMINOR)" \
"$(PTXCONF_SYSROOT_CROSS)/bin/python3"
+ sed -e 's;prefix_real=.*;prefix_real=$(SYSROOT)/usr;' \
+ "$(PTXCONF_SYSROOT_HOST)/bin/python$(PYTHON3_MAJORMINOR)-config" \
+ > "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)-config"
+ @chmod +x "$(PTXCONF_SYSROOT_CROSS)/bin/python$(PYTHON3_MAJORMINOR)-config"
@$(call touch)