]> code.ossystems Code Review - openembedded-core.git/commitdiff
tcl: remove host path from tclConfig.sh
authorWenzong Fan <wenzong.fan@windriver.com>
Wed, 11 Oct 2017 09:07:03 +0000 (02:07 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Nov 2017 13:44:56 +0000 (13:44 +0000)
The tclConfig.sh is also used by other packages (such as expect) for
cross-compiling, the host path from it can't be removed directly in
the do_install step.

With PACKAGE_PREPROCESS_FUNCS to remove host path and avoid the
crossscripts installed to target.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/tcltk/tcl_8.6.7.bb

index d00d2dc62b8e9ddfbc46bffab9a8087385c2642b..dac73be6e7f5e019c69f8267b62c9f7d9cbba2da 100644 (file)
@@ -86,3 +86,16 @@ BINCONFIG_GLOB = "*Config.sh"
 
 # Fix the path in sstate
 SSTATE_SCAN_FILES += "*Config.sh"
+
+# Cleanup host path from ${libdir}/tclConfig.sh and remove the
+# ${bindir_crossscripts}/tclConfig.sh from target
+PACKAGE_PREPROCESS_FUNCS += "tcl_package_preprocess"
+tcl_package_preprocess() {
+       sed -i -e "s;${DEBUG_PREFIX_MAP};;g" \
+              -e "s;-L${STAGING_LIBDIR};-L${libdir};g" \
+              -e "s;${STAGING_INCDIR};${includedir};g" \
+              -e "s;--sysroot=${RECIPE_SYSROOT};;g" \
+              ${PKGD}${libdir}/tclConfig.sh
+
+       rm -f ${PKGD}${bindir_crossscripts}/tclConfig.sh
+}