qt4: fix incorrect pkg-config files
PATCH 1/1 qt4: fix incorrect pkg-config files
* Previously, include statements were generated like this:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qt4-embedded/QtCoreE -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qtopia
* The sed rules ignored QT_LIBINFIX.
* The sed rules incorrectly used QT_BASE_NAME instead of QT_DIR_NAME.
* Now, they look like this, which is what an application expects:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia
* Tested with qt4-embedded on mipsel
--- recipes/qt4/qt4.inc | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
recipes/qt4/qt4.inc +5 -7
@@ -285,15 +285,13 @@ do_install() { ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc + if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then + sed -i -e /^includedir=/s#"/${name}"## \ + -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \ + ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc + fi 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):prefix}/include:" \ - -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 }
Signature · 1 line
1.7.2.3
2011/1/5 Andreas Oberritter <[email protected]>:
Quoted 34 lines
* Previously, include statements were generated like this:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qt4-embedded/QtCoreE -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qtopia* The sed rules ignored
QT_LIBINFIX.
* The sed rules incorrectly usedQT_BASE_NAMEinstead ofQT_DIR_NAME.* Now, they look like this, which is what an application expects:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia* Tested with qt4-embedded on mipsel
Signed-off-by Andreas Oberritter <[email protected]>---
recipes/qt4/qt4.inc | 12 +++++-------1 files changed, 5 insertions(+), 7 deletions(-)recipes/qt4/qt4.inc +0
-0@@ -285,15 +285,13 @@ do_install() {${D}${libdir}/pkgconfig/*.pc
for name in ${QT_LIB_NAMES}; do
sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
+ if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then
+ sed -i -e /^includedir=/s#"/${name}"## \
+ -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \
+ ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc
+ fi
done
Quoted 14 lines
- # 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):prefix}/include:" \
- -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
}
--
1.7.2.3
wouldn't this need an INCPR bump or so?
Frans
That will need a INC_PR bump in qt4-x11-free.inc and qt4-embedded.inc to take effect. Other than that, looks OK to me.
Op 5 jan 2011, om 13:48 heeft Andreas Oberritter het volgende geschreven:
Quoted 48 lines
* Previously, include statements were generated like this:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qt4-embedded/QtCoreE -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qtopia* The sed rules ignored
QT_LIBINFIX.
* The sed rules incorrectly usedQT_BASE_NAMEinstead ofQT_DIR_NAME.* Now, they look like this, which is what an application expects:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia* Tested with qt4-embedded on mipsel
Signed-off-by Andreas Oberritter <[email protected]>---
recipes/qt4/qt4.inc | 12 +++++-------1 files changed, 5 insertions(+), 7 deletions(-)recipes/qt4/qt4.inc +5
-7@@ -285,15 +285,13 @@ do_install() { ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc + if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then + sed -i -e /^includedir=/s#"/${name}"## \ + -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \ + ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc + fi 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):prefix}/include:" \ - -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 }Signature · 1 line
1.7.2.3
PATCH v2 1/1 qt4: fix incorrect pkg-config files
* Previously, include statements were generated like this:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qt4-embedded/QtCoreE -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qtopia
* The sed rules ignored QT_LIBINFIX.
* The sed rules incorrectly used QT_BASE_NAME instead of QT_DIR_NAME.
* Now, they look like this, which is what an application expects:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia
* Tested with qt4-embedded on mipsel
---
* v2: bumped INC_PR
recipes/qt4/qt4-embedded.inc | 2 +- recipes/qt4/qt4-x11-free.inc | 2 +- recipes/qt4/qt4.inc | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-)
recipes/qt4/qt4-embedded.inc +1 -1
@@ -4,7 +4,7 @@ LICENSE = "GPL QPL" PRIORITY = "optional" HOMEPAGE = "http://www.trolltech.com" DEPENDS += "directfb tslib" -INC_PR = "r26" +INC_PR = "r27" QT_BASE_NAME ?= "qt4-embedded" QT_BASE_LIB ?= "libqt-embedded"
recipes/qt4/qt4-x11-free.inc +1 -1
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.trolltech.com" LICENSE = "GPL QPL" DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" -INC_PR = "r22" +INC_PR = "r23" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \ file://0001-cross-compile.patch \
recipes/qt4/qt4.inc +5 -7
@@ -285,15 +285,13 @@ do_install() { ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc + if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then + sed -i -e /^includedir=/s#"/${name}"## \ + -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \ + ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc + fi 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):prefix}/include:" \ - -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 }
Signature · 1 line
1.7.2.3
Op 5 jan 2011, om 17:17 heeft Andreas Oberritter het volgende geschreven:
Quoted 8 lines
* Previously, include statements were generated like this:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qt4-embedded/QtCoreE -I.../mipsel-oe-linux/usr/include/qtopia/QtCore/qtopia* The sed rules ignored
QT_LIBINFIX.
* The sed rules incorrectly usedQT_BASE_NAMEinstead ofQT_DIR_NAME.
Quoted 8 lines
* Now, they look like this, which is what an application expects:
-I.../mipsel-oe-linux/usr/include/qtopia/QtCore -I.../mipsel-oe-linux/usr/include/qtopia* Tested with qt4-embedded on mipsel
Signed-off-by Andreas Oberritter <[email protected]>CC Koen Kooi <[email protected]>
Quoted 63 lines
---
* v2: bumpedINC_PRrecipes/qt4/qt4-embedded.inc | 2 +- recipes/qt4/qt4-x11-free.inc | 2 +- recipes/qt4/qt4.inc | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-)recipes/qt4/qt4-embedded.inc +0
-0@@ -4,7 +4,7 @@ LICENSE = "GPL QPL"PRIORITY = "optional"
HOMEPAGE = "http://www.trolltech.com"
DEPENDS += "directfb tslib"recipes/qt4/qt4-embedded.inc +1
-1-INC_PR = "r26" +INC_PR = "r27"
QT_BASE_NAME?= "qt4-embedded"QT_BASE_LIB?= "libqt-embedded"recipes/qt4/qt4-x11-free.inc +0
-0@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.trolltech.com"LICENSE = "GPL QPL"
DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"recipes/qt4/qt4-x11-free.inc +1
-1-INC_PR = "r22" +INC_PR = "r23"SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \ file://0001-cross-compile.patch \recipes/qt4/qt4.inc +5
-7@@ -285,15 +285,13 @@ do_install() { ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc + if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then + sed -i -e /^includedir=/s#"/${name}"## \ + -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \ + ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc + fi 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):prefix}/include:" \ - -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 }Signature · 1 line
1.7.2.3