binconfig/pkgconfig.bbclass: Convert staging functions into SYSROOT_PREPROCESS_FUNCS operating on SYSROOT_DESTDIR
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
6ea78d6489
commit
7c97538327
|
@ -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
|
# Could be compile but populate_staging and do_install shouldn't run at the same time
|
||||||
addtask populate_staging after do_install
|
addtask populate_staging after do_install
|
||||||
|
|
||||||
|
SYSROOT_PREPROCESS_FUNCS ?= ""
|
||||||
|
SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
|
||||||
|
|
||||||
python do_populate_staging () {
|
python do_populate_staging () {
|
||||||
#
|
#
|
||||||
# Only run do_stage if its not the empty default above
|
# 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()
|
stagefunc = bb.data.getVar('do_stage', d, 1).strip()
|
||||||
if stagefunc != "base_do_stage":
|
if stagefunc != "base_do_stage":
|
||||||
bb.build.exec_func('do_stage', d)
|
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
|
addtask install after do_compile
|
||||||
|
|
|
@ -43,11 +43,13 @@ binconfig_package_preprocess () {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
do_stage_append() {
|
SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
|
||||||
|
|
||||||
|
binconfig_sysroot_preprocess () {
|
||||||
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
|
for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
|
||||||
configname=`basename $config`
|
configname=`basename $config`
|
||||||
install -d ${STAGING_BINDIR_CROSS}
|
install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
|
||||||
cat $config | sed ${@get_binconfig_mangle(d)} > ${STAGING_BINDIR_CROSS}/$configname
|
cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
|
||||||
chmod u+x ${STAGING_BINDIR_CROSS}/$configname
|
chmod u+x ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
do_stage_append () {
|
SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
|
||||||
install -d ${PKG_CONFIG_DIR}
|
|
||||||
|
pkgconfig_sysroot_preprocess () {
|
||||||
|
install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
|
||||||
for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
|
for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
|
||||||
pcname=`basename $pc`
|
pcname=`basename $pc`
|
||||||
cat $pc > ${PKG_CONFIG_DIR}/$pcname
|
cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue