Skip to contentSkip to conversation

qt-mobility: improved recipe

PATCH Superseded [email protected] 2 participants 5 messages Mar 13, 2013 – Mar 16, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover qt-mobility: improved recipe

From: "Felipe F. Tonello" <[email protected]>

Removed bluez and pulseaudio forced dependency.
Also extended functionality by enabling the user to choose which qt mobility module to build. By default, all modules supported will be build.

Felipe F. Tonello (3):
qt-mobility: Add bluez dependency if DISTRO_FEATURES has bluetooth
qt-mobility: Add pulseaudio dependency if DISTRO_FEATURES has
pulseaudio
qt-mobility: added list of modules to be compiled

 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/3 qt-mobility: Add bluez dependency if DISTRO_FEATURES has bluetooth

From: "Felipe F. Tonello" <[email protected]>

Some modules doesn't requires bluez4 to compile. So it's unnecessary to have it as dependency.

---
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +5 -2
index 7778630..e5e671e 100644
@@ -1,5 +1,6 @@
 HOMEPAGE = "http://qt.nokia.com"
-DEPENDS += "pulseaudio bluez4"
+DEPENDS += "pulseaudio"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluez4', '', d)}"
 
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
@@ -30,6 +31,8 @@ qtm_plugins	:= "/usr/lib/${qtm_dir}/plugins/QtMobility"
 qtm_data	:= "/usr/share/${qtm_dir}"
 qtm_imports	:= "/usr/lib/${qtm_dir}/imports"
 
+qtm_bluezflag ?= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'yes', 'no', d)}"
+
 do_configure_prepend() {
 	cp qtmobility.pro qtmobility.pro.old
 	sed -e '[email protected]_INSTALL_DATA.@${qtm_data}@' <qtmobility.pro.old >qtmobility.pro
@@ -49,7 +52,7 @@ do_configure_prepend() {
 	echo QT_MOBILITY_EXAMPLES = ${qtm_examples} >>./config.pri
 	echo QT_MOBILITY_DEMOS = ${qtm_demos} >>./config.pri
 	echo QT_CONFIG ${qtm_glflags} >>./config.pri
-	echo bluez_enabled = yes >>./config.pri
+	echo bluez_enabled = ${qtm_bluezflag} >>./config.pri
 	echo ${qtm_extra_config} >>./config.pri
 	echo CONFIG += ${qtm_embedded} >>./config.pri
 }
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 2/3 qt-mobility: Add pulseaudio dependency if DISTRO_FEATURES has pulseaudio

In reply to [email protected]

From: "Felipe F. Tonello" <[email protected]>

---
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +1 -1
index e5e671e..fca4cb0 100644
@@ -1,5 +1,5 @@
 HOMEPAGE = "http://qt.nokia.com"
-DEPENDS += "pulseaudio"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'bluez4', '', d)}"
 
 LICENSE = "LGPLv2.1"
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 3/3 qt-mobility: added list of modules to be compiled

In reply to [email protected]

From: "Felipe F. Tonello" <[email protected]>

This is useful for users that want to .bbappend this recipe to select specific modules to be compiled.

---
 meta/recipes-qt/qt4/qt-mobility_1.2.0.inc |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +4 -2
index fca4cb0..849235c 100644
@@ -18,7 +18,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.t
 SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
 SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"
 
-PR = "r7"
+PR = "r8"
 
 S = "${WORKDIR}/qt-mobility-opensource-src-${PV}"
 
@@ -31,6 +31,8 @@ qtm_plugins	:= "/usr/lib/${qtm_dir}/plugins/QtMobility"
 qtm_data	:= "/usr/share/${qtm_dir}"
 qtm_imports	:= "/usr/lib/${qtm_dir}/imports"
 
+qtm_modules_list ?= "bearer contacts gallery location publishsubscribe messaging multimedia \
+systeminfo serviceframework sensors versit organizer feedback connectivity"
 qtm_bluezflag ?= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'yes', 'no', d)}"
 
 do_configure_prepend() {
@@ -44,7 +46,7 @@ do_configure_prepend() {
 	cp staticconfig.pri staticconfig.pri.old
 	echo "include(${STAGING_DATADIR}/${qtm_dir}/mkspecs/qconfig.pri)" >staticconfig.pri
 	cat staticconfig.pri.old >>staticconfig.pri
-	./configure -qmake-exec qmake2 -prefix /usr -examples -demos
+	./configure -qmake-exec qmake2 -prefix /usr -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
Signature · 1 line
1.7.9.5
#4 lore raw

Re: [PATCH v2 3/3] qt-mobility: added list of modules to be compiled

Quoted 33 lines · On 03/13/2013 09:49 AM, [email protected] wrote:

From: "Felipe F. Tonello" <[email protected]>

This is useful for users that want to .bbappend this recipe to select specific modules to be compiled.

---
  meta/recipes-qt/qt4/qt-mobility_1.2.0.inc |    6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +3 -1
index fca4cb0..849235c 100644
@@ -18,7 +18,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/add-ons/qt-mobility-opensource-src-${PV}.t
  SRC_URI[md5sum]="ea5db5a8d3dd4709c2926dceda646bd8"
  SRC_URI[sha256sum]="ee3c88975e04139ac9589f76d4be646d44fcbc4c8c1cf2db621abc154cf0ba44"
 
-PR = "r7"
+PR = "r8"
 
  S = "${WORKDIR}/qt-mobility-opensource-src-${PV}"
 
@@ -31,6 +31,8 @@ qtm_plugins	:= "/usr/lib/${qtm_dir}/plugins/QtMobility"
  qtm_data	:= "/usr/share/${qtm_dir}"
  qtm_imports	:= "/usr/lib/${qtm_dir}/imports"
 
+qtm_modules_list ?= "bearer contacts gallery location publishsubscribe messaging multimedia \
+systeminfo serviceframework sensors versit organizer feedback connectivity"
  qtm_bluezflag ?= "${@base_contains('DISTRO_FEATURES', 'bluetooth', 'yes', 'no', d)}"
 
  do_configure_prepend() {

meta/recipes-qt/qt4/qt-mobility_1.2.0.inc do_configure_prepend() { · line 49

Quoted 5 lines
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc +1 -1
@@ -44,7 +46,7 @@ do_configure_prepend() {
  	cp staticconfig.pri staticconfig.pri.old
  	echo "include(${STAGING_DATADIR}/${qtm_dir}/mkspecs/qconfig.pri)" >staticconfig.pri
  	cat staticconfig.pri.old >>staticconfig.pri
-	./configure -qmake-exec qmake2 -prefix /usr -examples -demos
+	./configure -qmake-exec qmake2 -prefix /usr -examples -demos -modules ${qtm_modules_list}

This change seems to generate an error from the configure scripts

Quoted 5 lines
| Unknown option: contacts
| Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]
|                  [-bindir <dir>] [-tests] [-examples] [-no-docs]
|                  [-no-tools] [-debug] [-release] [-silent]
|                  [-modules <list>]

I think you need to add quotes to the around the list based on this from the help:

Quoted 7 lines
| -modules <list> ... Restrict list of modules to build (default all supported)
|                     Choose from: bearer contacts gallery location publishsubscribe
|                     messaging multimedia systeminfo serviceframework
|                     sensors versit organizer feedback connectivity
|                     Modules should be separated by a space and surrounded
|                     by double quotation. If a selected module depends on other modules
|                     those modules (and their dependencies) will automatically be enabled.

Thanks
Sau!

Quoted 4 lines
  	echo QT_MOBILITY_BIN = ${qtm_bin} >>./config.pri
  	echo QT_MOBILITY_LIB = ${qtm_lib} >>./config.pri
  	echo QT_MOBILITY_INCLUDE = ${qtm_include} >>./config.pri