summaryrefslogtreecommitdiff
path: root/classes/pkgconfig.oeclass
blob: 83f3a3d9f27c695eb560f565e4cf69cfc148ff53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}