Patchwork [RFC] qt-mobility: fix installation path of header files

mail settings
Submitter Martin Jansa
Date Oct. 31, 2013, 7:10 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/60915/
State New
Headers show


Martin Jansa - Oct. 31, 2013, 7:10 p.m.
* RFC only as heads-up, this patch doesn't work yet, it triggers
  different kinds of issues, but qt-mobility seems to be broken
  like this for quite long time, so I'm surprised nobody reported
  it sooner
* since this commit
  commit f7409a9fe83ba2535a43f39ed57cd78242a88557
  Author: Roy.Li <>
  Date:   Mon Jun 24 13:08:03 2013 +0800
  Subject: qt-mobility: remove /usr/lib from ld rpath-link option

  header files are partially installed in ${includedir} and partially
  in ${includedir}/qt4

  $ ls 1.2.0-r8-default/image/usr/include/
    QtBearer    QtFeedback  QtLocation  QtMultimediaKit  QtPublishSubscribe  QtSystemInfo  QtVersitOrganizer
    QtContacts  QtGallery   QtMobility  QtOrganizer      QtServiceFramework  QtVersit      qt4

  before we had them all in ${includedir}/qt4
  $ ls 1.2.0-r8-rpath-reverted/image/usr/include/
  $ ls 1.2.0-r8-rpath-reverted/image/usr/include/qt4/
    QtBearer        QtContacts  QtGallery   QtMobility       QtOrganizer         QtSensors           QtSystemInfo  QtVersitOrganizer
    QtConnectivity  QtFeedback  QtLocation  QtMultimediaKit  QtPublishSubscribe  QtServiceFramework  QtVersit

  it's not caused by the patch itself (it seems to trigger some
  reconfiguration which breaks it, it can be broken also by running
  configure again in the same directory).

* moved haders are broken, because include paths in applications using
  e.g. QtLocation point only to ${includedir}/qt4/QtLocation and files
  there want to include headers now in ${includedir}/qt4/, e.g. monav
    fatal error: qgeopositioninfosource.h: No such file or directory
    #include "qgeopositioninfosource.h"
  and qgeopositioninfosource.h is in

* use configure parameters to set paths, because config.pri contains
  every path twice, first from configure script without qt4 prefix and
  then appended from do_configure, I was suspecting that that's the
  reason why some headers get installed to includedir without qt4 prefix

Signed-off-by: Martin Jansa <>
 meta/recipes-qt/qt4/ | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)


diff --git a/meta/recipes-qt/qt4/ b/meta/recipes-qt/qt4/
index 062702f..9390a75 100644
--- a/meta/recipes-qt/qt4/
+++ b/meta/recipes-qt/qt4/
@@ -40,6 +40,9 @@  qtm_imports	:= "/usr/lib/${qtm_dir}/imports"
 QTM_MODULES_LIST ?= "bearer contacts gallery location publishsubscribe messaging multimedia \
 systeminfo serviceframework sensors versit organizer feedback connectivity"
+#EXTRA_QMAKEVARS_PRE += "QT_CONFIG ${qtm_glflags}"
+#EXTRA_QMAKEVARS_PRE += "CONFIG += ${qtm_embedded}"
 do_configure_prepend() {
 	sed -e 's@...QT_INSTALL_DATA.@${qtm_data}@' < >
@@ -79,13 +82,19 @@  gypsy_enabled = no
-	./configure -qmake-exec qmake2 -prefix /usr -staticconfig oe -examples -demos -modules "${QTM_MODULES_LIST}"
-	echo QT_MOBILITY_BIN = ${qtm_bin} >>./config.pri
-	echo QT_MOBILITY_LIB = ${qtm_lib} >>./config.pri
-	echo QT_MOBILITY_INCLUDE = ${qtm_include} >>./config.pri
-	echo QT_MOBILITY_PLUGINS = ${qtm_plugins} >>./config.pri
-	echo QT_MOBILITY_EXAMPLES = ${qtm_examples} >>./config.pri
-	echo QT_MOBILITY_DEMOS = ${qtm_demos} >>./config.pri
+	./configure \
+		-bindir ${qtm_bin} \
+		-libdir ${qtm_lib} \
+		-headerdir ${qtm_include} \
+		-plugindir ${qtm_plugins} \
+		-examplesdir ${qtm_examples} \
+		-demosdir ${qtm_demos} \
+		-qmake-exec qmake2 \
+		-prefix /usr \
+		-staticconfig oe \
+		-examples \
+		-demos \
+		-modules "${QTM_MODULES_LIST}"
 	echo QT_CONFIG ${qtm_glflags} >>./config.pri
 	echo CONFIG += ${qtm_embedded} >>./config.pri