Skip to contentSkip to conversation

qt4: Added support for QtMobility 1.2

PATCH In review Dmitry Cherukhin 2 participants 3 messages Sep 28, 2011 – Oct 14, 2011 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 qt4: Added support for QtMobility 1.2

In reply to a message not in the archive

The QtMobility is a Qt add-on which allows to include standard mobile functionality to Qt applications. For details, see
http://qt.nokia.com/products/qt-addons/mobility/
The patch is intended to add support for the QtMobility 1.2 package to OE.

Added two recipes:
1) qt-mobility-x11 builds the QtMobility 1.2 package on the basis of Qt/X11 using the qt4-x11-free package;
2) qt-mobility-embedded builds the QtMobility 1.2 package on the basis of Qt/Embedded using the qt4-embedded package.

---
 meta/recipes-qt/qt4/files/qtm_qtmobility_pro.patch |   36 +++++++++++
 meta/recipes-qt/qt4/files/qtme_gstreamer_pro.patch |   23 ++++++
 meta/recipes-qt/qt4/qt-mobility-embedded_1.2.0.bb  |   13 +++++
 meta/recipes-qt/qt4/qt-mobility-x11_1.2.0.bb       |   11 ++++
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc          |   51 ++++++++++++++++++++
 5 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/files/qtm_qtmobility_pro.patch
 create mode 100644 meta/recipes-qt/qt4/files/qtme_gstreamer_pro.patch
 create mode 100644 meta/recipes-qt/qt4/qt-mobility-embedded_1.2.0.bb
 create mode 100644 meta/recipes-qt/qt4/qt-mobility-x11_1.2.0.bb
 create mode 100644 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc
meta/recipes-qt/qt4/files/qtm_qtmobility_pro.patch new file +36 -0
new file mode 100644
index 0000000..689c224
@@ -0,0 +1,36 @@
+qt-mobility: skip checking of the Qt version in the configure script
+
+The configure script fails with the following message:
+   Project ERROR: Qt Mobility requires Qt 4.6 or higher. Qt was found.
+The version of Qt is already 4.7.3, so there are some configuration problems
+in the Qt4 subsystem of OE. This patch is a workaround for this issue,
+it simply removes checking of Qt presence from the configure script.
+
+The origin of this patch is: 
+   http://neophysis.git.sourceforge.net/git/gitweb.cgi?p=neophysis/openembedded;
+   a=blob;f=recipes/neophysis/qt-mobility-1.0.0/qtmobility_pro.patch;
+   h=fc5e1691aed47bc50d87e5c33497354182cacda4;hb=refs/heads/neophysis-testing-0.3
+
+Upstream-Status: Inappropriate configuration
+
+Signed-off-by: Dmitry Cherukhin <[email protected]>
+
+--- qt-mobility-opensource-src-1.0.0/qtmobility.pro.orig	2010-05-21 14:20:19.547363661 +0200
++++ qt-mobility-opensource-src-1.0.0/qtmobility.pro	2010-05-21 14:22:01.967353682 +0200
+@@ -53,15 +53,6 @@ win32:!contains(CONFIG_WIN32,build_all) 
+    }
+ }
+ 
+-lessThan(QT_MAJOR_VERSION, 4) {
+-    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
+-}
+-
+-contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
+-    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
+-}
+-
+-
+ # MCL builds for Symbian do not run configure and require some manual setup steps.
+ # This test permits SD builds to skip installation of mobility.prf from within qmake.
+ # It is installed in a separate step. MCL builds for SD must set the
+
meta/recipes-qt/qt4/files/qtme_gstreamer_pro.patch new file +23 -0
new file mode 100644
index 0000000..0cba1d6
@@ -0,0 +1,23 @@
+qt-mobility-embedded: disable the code which depends on X11
+
+There is no support for X11 when using Qt/Embedded.
+The patch disables the section of the Qt project file `gstreamer.pro` which depends on X11.
+This section is already conditional on `!embedded`, so it should be disabled for an embedded platform.
+However, we can't force the symbol `embedded` be true, so we insroduce another configuration variable
+`qt_embedded` and disable this section manually then compiling the qt-mobility-embedded recipe.
+
+Upstream-Status: Inappropriate configuration
+
+Signed-off-by: Dmitry Cherukhin <[email protected]>
+
+--- qt-mobility-opensource-src-1.2.0/plugins/multimedia/gstreamer/gstreamer.pro.orig	2011-09-13 09:19:05.000000000 +0200
++++ qt-mobility-opensource-src-1.2.0/plugins/multimedia/gstreamer/gstreamer.pro	2011-09-13 09:37:58.609252481 +0200
+@@ -81,7 +81,7 @@
+     qgstutils.cpp
+ 
+ 
+-!win32:!embedded:!mac:!symbian:!simulator:!contains(QT_CONFIG, qpa) {
++!win32:!embedded:!mac:!symbian:!simulator:!contains(QT_CONFIG, qpa):!contains(qt_embedded,yes) {
+     LIBS += -lXv -lX11 -lXext
+ 
+     HEADERS += \
meta/recipes-qt/qt4/qt-mobility-embedded_1.2.0.bb new file +13 -0
new file mode 100644
index 0000000..c31b1d2
@@ -0,0 +1,13 @@
+DESCRIPTION = "Qt Mobility 1.2.0 - version for Qt/Embedded"
+DEPENDS = "qt4-embedded"
+SECTION = "libs"
+qtm_embedded := "yes"
+qtm_libinfix := "E"
+qtm_dir = "qtopia"
+qtm_glflags := "-=opengl"
+qtm_extra_config := "gstreamer-photography_enabled = no"
+
+inherit qt4e
+require qt-mobility_${PV}.inc
+
+SRC_URI += "file://qtme_gstreamer_pro.patch;patch=1"
meta/recipes-qt/qt4/qt-mobility-x11_1.2.0.bb new file +11 -0
new file mode 100644
index 0000000..3020953
@@ -0,0 +1,11 @@
+DESCRIPTION = "Qt Mobility 1.2.0 - version for Qt/X11"
+DEPENDS = "qt4-x11-free"
+SECTION = "x11/libs"
+qtm_embedded := "no"
+qtm_libinfix := ""
+qtm_dir = "qt4"
+qtm_glflags := "${@base_contains('DISTRO_FEATURES', 'opengl', '+=opengl', '-=opengl', d)} "
+qtm_extra_config := ""
+
+inherit qt4x11
+require qt-mobility_${PV}.inc
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
1.7.6
#2 lore raw
Quoted 4 lines · On Wednesday 28 September 2011 10:35:59 Dmitry Cherukhin wrote:

The QtMobility is a Qt add-on which allows to include standard mobile functionality to Qt applications. For details, see
http://qt.nokia.com/products/qt-addons/mobility/
The patch is intended to add support for the QtMobility 1.2 package to OE.

So apart from adding Qt Mobility this attempts to work around two issues by removing the checks rather than fixing the underlying cause of the checks failing. These checks look fine to me, so why are they not working?

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 10 lines · Paul Eggleton
Quoted 4 lines · On Wednesday 28 September 2011 10:35:59 Dmitry Cherukhin wrote:

The QtMobility is a Qt add-on which allows to include standard mobile functionality to Qt applications. For details, see
http://qt.nokia.com/products/qt-addons/mobility/
The patch is intended to add support for the QtMobility 1.2 package to OE.

So apart from adding Qt Mobility this attempts to work around two issues by removing the checks rather than fixing the underlying cause of the checks failing. These checks look fine to me, so why are they not working?

These checks was not working because the file .../mkspecs/qconfig.pri was not included to the main QtMobility project file. I include it manually. Also I removed all .patch files because they deal with the configuration, not with the code. You can find new version of the patch here:
http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/8708

Thanks,
Dima