Patchwork qt4: fix incorrect pkg-config files

login
register
mail settings
Submitter Andreas Oberritter
Date Jan. 5, 2011, 12:48 p.m.
Message ID <1294231700-27043-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/176/
State Superseded
Headers show

Comments

Andreas Oberritter - Jan. 5, 2011, 12:48 p.m.
* 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

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 recipes/qt4/qt4.inc |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
Frans Meulenbroeks - Jan. 5, 2011, 1:04 p.m.
2011/1/5 Andreas Oberritter <obi@opendreambox.org>:
> * 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
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
>  recipes/qt4/qt4.inc |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc
> index ac1fc83..52fa146 100644
> --- a/recipes/qt4/qt4.inc
> +++ b/recipes/qt4/qt4.inc
> @@ -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
>  }
> --
> 1.7.2.3
>
>
wouldn't this need an INCPR bump or so?

Frans
Koen Kooi - Jan. 5, 2011, 1:04 p.m.
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:

> * 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
> 
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
> recipes/qt4/qt4.inc |   12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc
> index ac1fc83..52fa146 100644
> --- a/recipes/qt4/qt4.inc
> +++ b/recipes/qt4/qt4.inc
> @@ -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
> }
> -- 
> 1.7.2.3
> 
>

Patch

diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc
index ac1fc83..52fa146 100644
--- a/recipes/qt4/qt4.inc
+++ b/recipes/qt4/qt4.inc
@@ -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
 }