[OE-core] [PATCH] guile: Remove bashisms
zhe.he at windriver.com
zhe.he at windriver.com
Mon Sep 26 06:51:45 UTC 2016
From: He Zhe <zhe.he at windriver.com>
Remove bashisms from do_populate_sysroot task
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: He Zhe <zhe.he at windriver.com>
---
meta/recipes-devtools/guile/guile_2.0.12.bb | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/meta/recipes-devtools/guile/guile_2.0.12.bb b/meta/recipes-devtools/guile/guile_2.0.12.bb
index d2fe511..751a035 100644
--- a/meta/recipes-devtools/guile/guile_2.0.12.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.12.bb
@@ -87,22 +87,27 @@ SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
guile_cross_config() {
# this is only for target recipe
- if [ "${PN}" = "guile" ]
- then
- # Create guile-config returning target values instead of native values
- install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
- echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
- > ${B}/guile-config.cross
- sed -n -e 's:^[ \t]*{[ \t]*": (:' \
+ [ "${PN}" = "${BPN}" ] || return 0
+
+ vars=$(sed -n -e 's:^[ \t]*{[ \t]*": (:' \
-e 's:",[ \t]*": . ":' \
-e 's:" *}, *\\:"):' \
-e 's:^.*cachedir.*$::' \
-e '/^ (/p' \
- < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
- echo '))' >> ${B}/guile-config.cross
- cat ${B}/meta/guile-config >> ${B}/guile-config.cross
- install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
- fi
+ < ${B}/libguile/libpath.h)
+
+ # Create guile-config returning target values instead of native values
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ cat <<EOF >${B}/guile-config.cross
+#!$(which ${BUILD_SYS}-guile) \\
+--no-auto-compile -e main -s
+!#
+(define %guile-build-info '(
+$vars
+))
+EOF
+ cat ${B}/meta/guile-config >> ${B}/guile-config.cross
+ install ${B}/guile-config.cross ${SYSROOT_DESTDIR}${bindir_crossscripts}/guile-config
}
# Guile needs the compiled files to be newer than the source, and it won't
--
2.8.3
More information about the Openembedded-core
mailing list