Disable .pc mangling in the pkgconfig oeclass for -native packages.
authorChris Larson <clarson@kergoth.com>
Tue, 13 Jul 2004 22:51:53 +0000 (22:51 +0000)
committerChris Larson <clarson@kergoth.com>
Tue, 13 Jul 2004 22:51:53 +0000 (22:51 +0000)
BKrev: 40f46789czH7gyhkC6mn53wgivtupQ

classes/pkgconfig.oeclass

index e69de29..83f3a3d 100644 (file)
@@ -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
+}