qt4: make .pc files work with sysroot support
authorKoen Kooi <koen@openembedded.org>
Thu, 18 Mar 2010 20:16:24 +0000 (21:16 +0100)
committerKoen Kooi <koen@openembedded.org>
Thu, 18 Mar 2010 20:17:36 +0000 (21:17 +0100)
recipes/qt4/qt4.inc

index b6d575d..14b0a96 100644 (file)
@@ -260,6 +260,13 @@ do_install() {
            sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
     done
 
+       # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here:
+       for pc in ${D}${libdir}/pkgconfig/*.pc ; do
+               sed -i -e "s:prefix}include/${QT_BASE_NAME}/$(basename $pc .pc):includedir}:" \
+                      -e "s,Cflags: ,Cflags: -IP{includedir}/${QT_BASE_NAME}/$(basename $pc .pc) ," \
+                      -e 's:IP{:I${:g' $pc
+       done
+
     install -d ${D}/${libdir}/fonts
     touch ${D}/${libdir}/fonts/fontdir
 }