summaryrefslogtreecommitdiff
path: root/openembedded/classes/pkgconfig.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
committerRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
commit4b46c1f6e891b1ddd5968536440b888661fade3e (patch)
treee0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/classes/pkgconfig.bbclass
downloadopenembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.bz2
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.xz
openembedded-core-4b46c1f6e891b1ddd5968536440b888661fade3e.zip
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/pkgconfig.bbclass')
-rw-r--r--openembedded/classes/pkgconfig.bbclass28
1 files changed, 28 insertions, 0 deletions
diff --git a/openembedded/classes/pkgconfig.bbclass b/openembedded/classes/pkgconfig.bbclass
new file mode 100644
index 000000000..e89e827fc
--- /dev/null
+++ b/openembedded/classes/pkgconfig.bbclass
@@ -0,0 +1,28 @@
+inherit base
+
+DEPENDS_prepend = "pkgconfig-native "
+
+# The namespaces can clash here hence the two step replace
+def get_pkgconfig_mangle(d):
+ import bb.data
+ s = "-e ''"
+ if not bb.data.inherits_class('native', d):
+ s += " -e 's:=${libdir}:=OELIBDIR:;'"
+ s += " -e 's:=${includedir}:=OEINCDIR:;'"
+ s += " -e 's:=${datadir}:=OEDATADIR:'"
+ s += " -e 's:=${prefix}:=OEPREFIX:'"
+ s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'"
+ s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
+ s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
+ s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
+ s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'"
+ s += " -e 's:OEEXECPREFIX:${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
+}