summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-02 17:30:32 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-10 13:46:37 +0000
commitbf755f0c721a91a3067fdac9f936a72e11f99cbc (patch)
treed80ec5970f5c01e10b76445c4dada54f5bb20f6d /classes
parentb66fa6b32686ef5a750de1bb2fb317448c682863 (diff)
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 'classes')
-rw-r--r--classes/base.bbclass5
-rw-r--r--classes/binconfig.bbclass10
-rw-r--r--classes/pkgconfig.bbclass8
3 files changed, 16 insertions, 7 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 8404a07025..024f8227bc 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1051,8 +1051,13 @@ 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 () {
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/classes/binconfig.bbclass b/classes/binconfig.bbclass
index 69374528dd..dad54a5f56 100644
--- a/classes/binconfig.bbclass
+++ b/classes/binconfig.bbclass
@@ -47,11 +47,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/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
index 2a8199d135..de892b5413 100644
--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -9,10 +9,12 @@ for i in `find ${S}/ -name "*.pc" -type f` ; do \
done
}
-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
}