summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-02 17:27:05 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-13 12:15:22 +0000
commit7c975383279291a314e95301e8cf2a4ead17c856 (patch)
treec6d258c48f51ecc647692117548b4549f8aa6adb /meta/classes
parent6ea78d648951e5bbe9669412c0863daaf7f49ca5 (diff)
downloadopenembedded-core-7c975383279291a314e95301e8cf2a4ead17c856.tar.gz
openembedded-core-7c975383279291a314e95301e8cf2a4ead17c856.tar.bz2
openembedded-core-7c975383279291a314e95301e8cf2a4ead17c856.zip
binconfig/pkgconfig.bbclass: Convert staging functions into SYSROOT_PREPROCESS_FUNCS operating on SYSROOT_DESTDIR
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-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
# 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 55a0b039f2..31e5cc5172 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 fae2ee024e..bd5bd81670 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
}