diff options
author | Chris Larson <clarson@kergoth.com> | 2004-07-13 22:51:53 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-07-13 22:51:53 +0000 |
commit | 0adf29152a4f258f8e94851c1975587bd918b2d2 (patch) | |
tree | 436d0b2773dcd5751054ecc4ab3ec10bd7efb1a6 /classes/pkgconfig.oeclass | |
parent | 904052ecd3942ad3cd41305c13c03ae50957c526 (diff) |
Disable .pc mangling in the pkgconfig oeclass for -native packages.
BKrev: 40f46789czH7gyhkC6mn53wgivtupQ
Diffstat (limited to 'classes/pkgconfig.oeclass')
-rw-r--r-- | classes/pkgconfig.oeclass | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/pkgconfig.oeclass b/classes/pkgconfig.oeclass index e69de29bb2..83f3a3d9f2 100644 --- a/classes/pkgconfig.oeclass +++ b/classes/pkgconfig.oeclass @@ -0,0 +1,22 @@ +inherit base + +DEPENDS_prepend = "pkgconfig-native " + +def get_pkgconfig_mangle(d): + import oe.data + s = "-e ''" + if not oe.data.inherits_class('native', d): + s += " -e 's:${libdir}:${STAGING_LIBDIR}:;'" + s += " -e 's:${includedir}:${STAGING_INCDIR}:;'" + s += " -e 's:${datadir}:${STAGING_DATADIR}:'" + s += " -e 's:${prefix}:${STAGING_LIBDIR}/..:'" + s += " -e 's:${exec_prefix}:${STAGING_LIBDIR}/..:'" + return s + +do_stage_append () { + for pc in `find ${S} -name '*.pc'`; do + pcname=`basename $pc` + install -d ${PKG_CONFIG_PATH} + cat $pc | sed ${@get_pkgconfig_mangle(d)} > ${PKG_CONFIG_PATH}/$pcname + done +} |