Patchwork [meta-qt5,v2] qtlocation: add packageconfig for geoclue and gypsy

login
register
mail settings
Submitter Jonathan Liu
Date April 20, 2014, 2:01 p.m.
Message ID <1398002483-26092-1-git-send-email-net147@gmail.com>
Download mbox | patch
Permalink /patch/70701/
State Accepted, archived
Headers show

Comments

Jonathan Liu - April 20, 2014, 2:01 p.m.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 recipes-qt/qt5/qtlocation.inc | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Patch

diff --git a/recipes-qt/qt5/qtlocation.inc b/recipes-qt/qt5/qtlocation.inc
index 70a4375..41f2d19 100644
--- a/recipes-qt/qt5/qtlocation.inc
+++ b/recipes-qt/qt5/qtlocation.inc
@@ -2,3 +2,19 @@  require qt5.inc
 
 DEPENDS += "qtbase qt3d"
 # qtsystems qtmultimedia
+
+PACKAGECONFIG ??= ""
+# older geoclue 0.x is needed
+PACKAGECONFIG[geoclue] = "OE_GEOCLUE_ENABLED,,gconf geoclue"
+PACKAGECONFIG[gypsy] = "OE_GYPSY_ENABLED,,gconf gypsy"
+
+do_configure_prepend() {
+    # disable geoclue tests if it isn't enabled by PACKAGECONFIG
+    sed -i -e 's/^\(qtCompileTest(geoclue)\)/OE_GEOCLUE_ENABLED:\1/' ${S}/qtlocation.pro
+    sed -i -e 's/^\(qtCompileTest(geoclue-satellite)\)/OE_GEOCLUE_ENABLED:\1/' ${S}/qtlocation.pro
+    # disable gypsy test if it isn't enabled by PACKAGECONFIG
+    sed -i -e 's/^\(qtCompileTest(gypsy)\)/OE_GYPSY_ENABLED:\1/' ${S}/qtlocation.pro
+}
+
+EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'geoclue', 'CONFIG+=OE_GEOCLUE_ENABLED', '', d)}"
+EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'gypsy', 'CONFIG+=OE_GYPSY_ENABLED', '', d)}"