2012-07-31 08:49:37 +00:00
|
|
|
inherit chrpath
|
2010-04-08 15:35:16 +00:00
|
|
|
|
2017-01-30 23:08:38 +00:00
|
|
|
SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess relocatable_native_pcfiles"
|
2010-04-01 10:42:50 +00:00
|
|
|
|
2010-02-12 14:55:32 +00:00
|
|
|
python relocatable_binaries_preprocess() {
|
2012-03-03 11:21:22 +00:00
|
|
|
rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
|
2010-02-11 16:11:01 +00:00
|
|
|
}
|
2017-01-30 23:08:38 +00:00
|
|
|
|
|
|
|
relocatable_native_pcfiles () {
|
|
|
|
if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
|
|
|
|
rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")}
|
|
|
|
sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
|
|
|
|
fi
|
|
|
|
if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
|
|
|
|
rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")}
|
|
|
|
sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
|
|
|
|
fi
|
|
|
|
}
|