[oe-commits] Ross Burton : binconfig: mangle ${base_libdir}

git at git.openembedded.org git at git.openembedded.org
Sat Feb 8 21:00:10 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: ccd9abdccb84d713427541b6ee29a0e217360e74
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ccd9abdccb84d713427541b6ee29a0e217360e74

Author: Ross Burton <ross.burton at intel.com>
Date:   Thu Feb  6 23:17:18 2014 +0000

binconfig: mangle ${base_libdir}

Some recipes are installing libraries into ${base_libdir} (typically /lib) and
also use a foo-config binary to identify compile paths, for example
libusb-compat.  Without mangling ${base_libdir} the ${base_libdir} path is
passed to the compiler, where it looks like a host path and results in
compile-host-path QA errors.

Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/binconfig.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index 4c42602..848c744 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -5,6 +5,7 @@ def get_binconfig_mangle(d):
 	s = "-e ''"
 	if not bb.data.inherits_class('native', d):
 		optional_quote = r"\(\"\?\)"
+		s += " -e 's:=%s${base_libdir}:=\\1OEBASELIBDIR:;'" % optional_quote
 		s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
 		s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
 		s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
@@ -12,6 +13,7 @@ def get_binconfig_mangle(d):
 		s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
 		s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
 		s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+		s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
 		s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
 		s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
 		s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
@@ -31,7 +33,8 @@ PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess"
 binconfig_package_preprocess () {
 	for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
 		sed -i \
-		    -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ 
+		    -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
+		    -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
 		    -e 's:${STAGING_INCDIR}:${includedir}:g;' \
 		    -e 's:${STAGING_DATADIR}:${datadir}:' \
 		    -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \
@@ -39,6 +42,7 @@ binconfig_package_preprocess () {
 	done
 	for lafile in `find ${PKGD} -name "*.la"` ; do
 		sed -i \
+		    -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \
 		    -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
 		    -e 's:${STAGING_INCDIR}:${includedir}:g;' \
 		    -e 's:${STAGING_DATADIR}:${datadir}:' \



More information about the Openembedded-commits mailing list