aboutsummaryrefslogtreecommitdiffstats
path: root/classes/pkgconfig.bbclass
blob: d96b708c97eae56495db33a9cdda24b0a1173a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
DEPENDS_prepend = "pkgconfig-native "

do_install_prepend () {
	for i in `find ${S}/ -name "*.pc" -type f` ; do \
		sed -i -e 's:-L${STAGING_LIBDIR}::g' \
			-e 's:-R${STAGING_LIBDIR}::g' \
			-e 's:-I${STAGING_INCDIR}::g' \
			-e 's:-isystem${STAGING_INCDIR}::g' \
			$i
        done
}

SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"

pkgconfig_sysroot_preprocess () {
	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
		pcname=`basename $pc`
		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
			oenote "$pcname was not installed."
		fi
	done
}