Patchwork [CONSOLIDATED,PULL,02/21] qt4-x11-free: bring back pkg-config fixups

login
register
mail settings
Submitter Saul Wold
Date Nov. 14, 2011, 4:27 a.m.
Message ID <acc91df6d61da03bbb8ef05238ffde48a656894f.1321244755.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/14893/
State New
Headers show

Comments

Saul Wold - Nov. 14, 2011, 4:27 a.m.
From: Simon Busch <morphis@gravedo.de>

* With b40b9c024be5e1ec81a31961158b3e6b529acfe0 some pkg-config fixups where removed from
  qt4.inc which breaks the pkg-config files for qt4-embedded. Without that the pkg-config
  files for qt4-x11-free are broken. So this patch puts the fixes into the qt4-x11-free.inc
  file to be used by qt4-x11-free and not qt4-embedded.

* Resending because nobody replied on
  http://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg10609.html

Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-qt/qt4/qt4-x11-free.inc |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/recipes-qt/qt4/qt4-x11-free.inc b/meta/recipes-qt/qt4/qt4-x11-free.inc
index f391028..04b7885 100644
--- a/meta/recipes-qt/qt4/qt4-x11-free.inc
+++ b/meta/recipes-qt/qt4/qt4-x11-free.inc
@@ -5,7 +5,7 @@  HOMEPAGE = "http://qt.nokia.com"
 SECTION = "x11/libs"
 DEPENDS += "virtual/libgl virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
 
-INC_PR = "r32"
+INC_PR = "r33"
 
 QT_GLFLAGS ?= "${@base_contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} "
 QT_GLFLAGS_qemux86 = "-opengl"
@@ -16,3 +16,17 @@  QT_BASE_LIB  ?= "libqt"
 
 inherit qt4x11
 
+do_install_append() {
+  # fix pkgconfig, libtool and prl files
+  sed -i -e 's#I/usr/include#Iincludedir}#g' \ 
+    -e 's#Iin#I${in#g' \
+    ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc
+
+  # 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
+}