aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTuan Hoang <tuanhoanganh.dev@gmail.com>2019-02-23 11:24:51 +0700
committerKhem Raj <raj.khem@gmail.com>2019-02-22 21:30:39 -0800
commit1a2d6ee5e7882c0a47191c5e120bfcd229296289 (patch)
treeafa0cff026795a579828715defe64ffb546a28b4
parent479951ee994e25d8a03704b4186bce42e6684ac5 (diff)
downloadmeta-openembedded-contrib-1a2d6ee5e7882c0a47191c5e120bfcd229296289.tar.gz
tk_8.6.9: Add tkConfig.sh in crossscript
Signed-off-by: Hoang Anh Tuan <tuanha@viosoft.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb b/meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb
index 9eec4bba73..459ae8253b 100644
--- a/meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb
+++ b/meta-oe/recipes-devtools/tcltk/tk_8.6.9.bb
@@ -50,6 +50,11 @@ do_install_append() {
ln -sf libtk${VER}.so ${D}${libdir}/libtk${VER}.so.0
oe_libinstall -so libtk${VER} ${D}${libdir}
ln -sf wish${VER} ${D}${bindir}/wish
+
+ sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tkConfig.sh
+ sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tkConfig.sh
+ install -d ${D}${bindir_crossscripts}
+ install -m 0755 tkConfig.sh ${D}${bindir_crossscripts}
}
PACKAGECONFIG ??= "xft"
@@ -69,3 +74,23 @@ BBCLASSEXTEND = "native nativesdk"
# Fix the path in sstate
SSTATE_SCAN_FILES += "*Config.sh"
+
+inherit binconfig
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*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}/tkConfig.sh
+
+ rm -f ${PKGD}${bindir_crossscripts}/tkConfig.sh
+}