summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass5
-rw-r--r--meta/classes/binconfig.bbclass10
-rw-r--r--meta/classes/pkgconfig_stage.bbclass8
3 files changed, 16 insertions, 7 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 9e78ce2927..45adeb9e6e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -996,6 +996,9 @@ do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGE
996# Could be compile but populate_staging and do_install shouldn't run at the same time 996# Could be compile but populate_staging and do_install shouldn't run at the same time
997addtask populate_staging after do_install 997addtask populate_staging after do_install
998 998
999SYSROOT_PREPROCESS_FUNCS ?= ""
1000SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
1001
999python do_populate_staging () { 1002python do_populate_staging () {
1000 # 1003 #
1001 # Only run do_stage if its not the empty default above 1004 # Only run do_stage if its not the empty default above
@@ -1003,6 +1006,8 @@ python do_populate_staging () {
1003 stagefunc = bb.data.getVar('do_stage', d, 1).strip() 1006 stagefunc = bb.data.getVar('do_stage', d, 1).strip()
1004 if stagefunc != "base_do_stage": 1007 if stagefunc != "base_do_stage":
1005 bb.build.exec_func('do_stage', d) 1008 bb.build.exec_func('do_stage', d)
1009 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
1010 bb.build.exec_func(f, d)
1006} 1011}
1007 1012
1008addtask install after do_compile 1013addtask install after do_compile
diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index 55a0b039f2..31e5cc5172 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -43,11 +43,13 @@ binconfig_package_preprocess () {
43 done 43 done
44} 44}
45 45
46do_stage_append() { 46SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
47
48binconfig_sysroot_preprocess () {
47 for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do 49 for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
48 configname=`basename $config` 50 configname=`basename $config`
49 install -d ${STAGING_BINDIR_CROSS} 51 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
50 cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR_CROSS}/$configname 52 cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
51 chmod u+x ${STAGING_BINDIR_CROSS}/$configname 53 chmod u+x ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
52 done 54 done
53} 55}
diff --git a/meta/classes/pkgconfig_stage.bbclass b/meta/classes/pkgconfig_stage.bbclass
index fae2ee024e..bd5bd81670 100644
--- a/meta/classes/pkgconfig_stage.bbclass
+++ b/meta/classes/pkgconfig_stage.bbclass
@@ -1,7 +1,9 @@
1do_stage_append () { 1SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
2 install -d ${PKG_CONFIG_DIR} 2
3pkgconfig_sysroot_preprocess () {
4 install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
3 for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do 5 for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
4 pcname=`basename $pc` 6 pcname=`basename $pc`
5 cat $pc > ${PKG_CONFIG_DIR}/$pcname 7 cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
6 done 8 done
7} 9}