summaryrefslogtreecommitdiffstats
path: root/meta
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 /meta
parent99498a127e405e9fc066aae3c7bb1d43d14e2967 (diff)
downloadpoky-4015d48fcfec627821e9dd420b6c37fa1c60369e.tar.gz
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
Diffstat (limited to 'meta')
-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 bf15ebcdf9..317e080fc5 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -5,11 +5,12 @@ def get_binconfig_mangle(d):
5 import bb.data 5 import bb.data
6 s = "-e ''" 6 s = "-e ''"
7 if not bb.data.inherits_class('native', d): 7 if not bb.data.inherits_class('native', d):
8 s += " -e 's:=${libdir}:=OELIBDIR:;'" 8 optional_quote = r"\(\"\?\)"
9 s += " -e 's:=${includedir}:=OEINCDIR:;'" 9 s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
10 s += " -e 's:=${datadir}:=OEDATADIR:'" 10 s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
11 s += " -e 's:=${prefix}:=OEPREFIX:'" 11 s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
12 s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'" 12 s += " -e 's:=%s${prefix}:=\\1OEPREFIX:'" % optional_quote
13 s += " -e 's:=%s${exec_prefix}:=\\1OEEXECPREFIX:'" % optional_quote
13 s += " -e 's:-L${libdir}:-LOELIBDIR:;'" 14 s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
14 s += " -e 's:-I${includedir}:-IOEINCDIR:;'" 15 s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
15 s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" 16 s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
@@ -26,6 +27,29 @@ def is_native(d):
26 27
27BINCONFIG_GLOB ?= "*-config" 28BINCONFIG_GLOB ?= "*-config"
28 29
30do_install_append() {
31
32 #the 'if' protects native packages, since we can't easily check for bb.data.inherits_class('native', d) in shell
33 if [ -e ${D}${bindir} ] ; then
34 for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
35 cat $config | sed \
36 -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
37 -e 's:${STAGING_INCDIR}:${includedir}:g;' \
38 -e 's:${STAGING_DATADIR}:${datadir}:' \
39 -e 's:${STAGING_LIBDIR}/..:${prefix}:' > ${D}${bindir}/`basename $config`
40 done
41 fi
42
43 for lafile in `find ${D} -name *.la` ; do
44 sed -i \
45 -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
46 -e 's:${STAGING_INCDIR}:${includedir}:g;' \
47 -e 's:${STAGING_DATADIR}:${datadir}:' \
48 -e 's:${STAGING_LIBDIR}/..:${prefix}:' \
49 $lafile
50 done
51}
52
29do_stage_append() { 53do_stage_append() {
30 for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do 54 for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
31 configname=`basename $config`${@is_native(d)} 55 configname=`basename $config`${@is_native(d)}