diff options
| -rw-r--r-- | meta/classes/relocatable.bbclass | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass index 4ca9981f44..582812c1cf 100644 --- a/meta/classes/relocatable.bbclass +++ b/meta/classes/relocatable.bbclass | |||
| @@ -1,7 +1,18 @@ | |||
| 1 | inherit chrpath | 1 | inherit chrpath |
| 2 | 2 | ||
| 3 | SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess" | 3 | SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess relocatable_native_pcfiles" |
| 4 | 4 | ||
| 5 | python relocatable_binaries_preprocess() { | 5 | python relocatable_binaries_preprocess() { |
| 6 | rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d) | 6 | rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d) |
| 7 | } | 7 | } |
| 8 | |||
| 9 | relocatable_native_pcfiles () { | ||
| 10 | if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then | ||
| 11 | rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")} | ||
| 12 | sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc | ||
| 13 | fi | ||
| 14 | if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then | ||
| 15 | rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")} | ||
| 16 | sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc | ||
| 17 | fi | ||
| 18 | } | ||
