Update drivers
[vuplus_openembedded] / classes / pkgconfig.bbclass
index 4192a04..f3d9371 100644 (file)
@@ -1,20 +1,18 @@
-inherit base
-
 DEPENDS_prepend = "pkgconfig-native "
 
-FILES_${PN}-dev += "${libdir}/pkgconfig"
-
-do_install_append () {
+do_install_prepend () {
 
-for i in `find ${D}/ -name "*.pc"` ; do \
-            sed -i -e 's:-L${STAGING_LIBDIR}::g' $i
+for i in `find ${S}/ -name "*.pc" -type f` ; do \
+            sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
         done
 }
 
-do_stage_append () {
-       install -d ${PKG_CONFIG_DIR}
-       for pc in `find ${D} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
+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`
-               cat $pc > ${PKG_CONFIG_DIR}/$pcname
+               cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
        done
 }