summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 9e78ce292..45adeb9e6 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
# Could be compile but populate_staging and do_install shouldn't run at the same time
addtask populate_staging after do_install
+SYSROOT_PREPROCESS_FUNCS ?= ""
+SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
+
python do_populate_staging () {
#
# Only run do_stage if its not the empty default above
@@ -1003,6 +1006,8 @@ python do_populate_staging () {
stagefunc = bb.data.getVar('do_stage', d, 1).strip()
if stagefunc != "base_do_stage":
bb.build.exec_func('do_stage', d)
+ for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
+ bb.build.exec_func(f, d)
}
addtask install after do_compile
diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index 55a0b039f..31e5cc517 100644
--- a/meta/classes/binconfig.bbclass
+++ b/meta/classes/binconfig.bbclass
@@ -43,11 +43,13 @@ binconfig_package_preprocess () {
done
}
-do_stage_append() {
+SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
+
+binconfig_sysroot_preprocess () {
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
configname=`basename $config`
- install -d ${STAGING_BINDIR_CROSS}
- cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR_CROSS}/$configname
- chmod u+x ${STAGING_BINDIR_CROSS}/$configname
+ install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
+ cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
+ chmod u+x ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
done
}
diff --git a/meta/classes/pkgconfig_stage.bbclass b/meta/classes/pkgconfig_stage.bbclass
index fae2ee024..bd5bd8167 100644
--- a/meta/classes/pkgconfig_stage.bbclass
+++ b/meta/classes/pkgconfig_stage.bbclass
@@ -1,7 +1,9 @@
-do_stage_append () {
- install -d ${PKG_CONFIG_DIR}
+SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
+
+pkgconfig_sysroot_preprocess () {
+ install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
pcname=`basename $pc`
- cat $pc > ${PKG_CONFIG_DIR}/$pcname
+ cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
done
}