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

Submitted by Martin Jansa on Oct. 31, 2013, 7:10 p.m. | Patch ID: 60915


Message ID 1383246625-32068-1-git-send-email-Martin.Jansa@gmail.com
State New
Headers show

Commit Message

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 <rongqing.li@windriver.com>
  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 <Martin.Jansa@gmail.com>
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
index 062702f..9390a75 100644
--- a/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
+++ b/meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
@@ -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() {
 	cp qtmobility.pro qtmobility.pro.old
 	sed -e 's@...QT_INSTALL_DATA.@${qtm_data}@' <qtmobility.pro.old >qtmobility.pro
@@ -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