summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-20 15:19:01 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-20 15:19:01 +0000
commit4015d48fcfec627821e9dd420b6c37fa1c60369e (patch)
treede840ffab7ba318d815488094f26608ca9c4497f
parent99498a127e405e9fc066aae3c7bb1d43d14e2967 (diff)
downloadopenembedded-core-4015d48fcfec627821e9dd420b6c37fa1c60369e.tar.gz
openembedded-core-4015d48fcfec627821e9dd420b6c37fa1c60369e.tar.bz2
openembedded-core-4015d48fcfec627821e9dd420b6c37fa1c60369e.tar.xz
openembedded-core-4015d48fcfec627821e9dd420b6c37fa1c60369e.zip
binconfig.bbclass: Sync with OE to benefit from improved .la file handling
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@884 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/classes/binconfig.bbclass34
1 files changed, 29 insertions, 5 deletions
diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index bf15ebcdf..317e080fc 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -5,11 +5,12 @@ def get_binconfig_mangle(d):
import bb.data
s = "-e ''"
if not bb.data.inherits_class('native', d):
- s += " -e 's:=${libdir}:=OELIBDIR:;'"
- s += " -e 's:=${includedir}:=OEINCDIR:;'"
- s += " -e 's:=${datadir}:=OEDATADIR:'"
- s += " -e 's:=${prefix}:=OEPREFIX:'"
- s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'"
+ optional_quote = r"\(\"\?\)"
+ s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
+ s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
+ s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
+ s += " -e 's:=%s${prefix}:=\\1OEPREFIX:'" % optional_quote
+ s += " -e 's:=%s${exec_prefix}:=\\1OEEXECPREFIX:'" % optional_quote
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
@@ -26,6 +27,29 @@ def is_native(d):
BINCONFIG_GLOB ?= "*-config"
+do_install_append() {
+
+ #the 'if' protects native packages, since we can't easily check for bb.data.inherits_class('native', d) in shell
+ if [ -e ${D}${bindir} ] ; then
+ for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
+ cat $config | sed \
+ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
+ -e 's:${STAGING_INCDIR}:${includedir}:g;' \
+ -e 's:${STAGING_DATADIR}:${datadir}:' \
+ -e 's:${STAGING_LIBDIR}/..:${prefix}:' > ${D}${bindir}/`basename $config`
+ done
+ fi
+
+ for lafile in `find ${D} -name *.la` ; do
+ sed -i \
+ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
+ -e 's:${STAGING_INCDIR}:${includedir}:g;' \
+ -e 's:${STAGING_DATADIR}:${datadir}:' \
+ -e 's:${STAGING_LIBDIR}/..:${prefix}:' \
+ $lafile
+ done
+}
+
do_stage_append() {
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
configname=`basename $config`${@is_native(d)}