diff options
Diffstat (limited to 'classes/pkgconfig.bbclass')
-rw-r--r-- | classes/pkgconfig.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index f2054b0b07..3256977517 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -17,12 +17,21 @@ def get_pkgconfig_mangle(d): s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:-L${WORKDIR}\S*: :g'" + s += " -e 's:-I${WORKDIR}\S*: :g'" + return s +do_install_append () { + for pc in `find ${D} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do + sed -i ${@get_pkgconfig_mangle(d)} -e 's:${D}::g' ${pc} + done +} + do_stage_append () { for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do pcname=`basename $pc` install -d ${PKG_CONFIG_PATH} - cat $pc | sed ${@get_pkgconfig_mangle(d)} > ${PKG_CONFIG_PATH}/$pcname + cat $pc | sed ${@get_pkgconfig_mangle(d)} -e 's:${D}${libdir}\S*:${STAGING_LIBDIR}:g' -e 's:${D}${prefix}/include\S*:${STAGING_INCDIR}:g' > ${PKG_CONFIG_PATH}/$pcname done } |