[oe] [meta-qt5][PATCH] qt5: use common PACKAGECONFIG to build examples

Samuli Piippo samuli.piippo at theqtcompany.com
Wed Feb 3 15:12:39 UTC 2016


Each Qt module's examples can now be enabled with PACKAGECONFIG.
Replace the webkit patch with a PACKAGECONFIG option and follow
common practice by not building QtWayland examples by default,
those can be enabled in a .bbappend with PACKAGECONFIG += "examples"

Enabling PACKAGECONFIG[examples] in qtbase, will still cause every
Qt module to build their examples.

Signed-off-by: Samuli Piippo <samuli.piippo at theqtcompany.com>
---
 recipes-qt/qt5/qt5.inc                             |  3 +++
 recipes-qt/qt5/qtwayland_git.bb                    |  2 --
 ...amples-enable-building-examples-by-defaul.patch | 29 ----------------------
 recipes-qt/qt5/qtwebkit-examples_git.bb            |  4 +--
 4 files changed, 4 insertions(+), 34 deletions(-)
 delete mode 100644 recipes-qt/qt5/qtwebkit-examples/0001-qtwebkit-examples-enable-building-examples-by-defaul.patch

diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index ce9d976..70e4b30 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -5,6 +5,9 @@ inherit qmake5
 
 PACKAGECONFIG_OPENSSL ?= "openssl"
 
+PACKAGECONFIG[examples] = ""
+EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'examples', 'QT_BUILD_PARTS+=examples', '', d)}"
+
 # we don't want conflicts with qt4
 OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"
 OE_QMAKE_PATH_ARCHDATA = "${OE_QMAKE_PATH_QT_ARCHDATA}"
diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb
index 059c2db..128794c 100644
--- a/recipes-qt/qt5/qtwayland_git.bb
+++ b/recipes-qt/qt5/qtwayland_git.bb
@@ -20,11 +20,9 @@ DEPENDS += "qtbase qtdeclarative wayland wayland-native qtwayland-native ${XKB_D
 
 QT_WAYLAND_CONFIG ?= "wayland-compositor"
 QT_WAYLAND_DEFINES ?= ""
-QT_WAYLAND_BUILD_PARTS ?= "examples"
 
 EXTRA_QMAKEVARS_PRE += "CONFIG+=${QT_WAYLAND_CONFIG}"
 EXTRA_QMAKEVARS_PRE += "DEFINES+=${QT_WAYLAND_DEFINES}"
-EXTRA_QMAKEVARS_PRE += "QT_BUILD_PARTS+=${QT_WAYLAND_BUILD_PARTS}"
 
 FILES_${PN}-plugins += " \
     ${OE_QMAKE_PATH_PLUGINS}/*/*/*${SOLIBSDEV} \
diff --git a/recipes-qt/qt5/qtwebkit-examples/0001-qtwebkit-examples-enable-building-examples-by-defaul.patch b/recipes-qt/qt5/qtwebkit-examples/0001-qtwebkit-examples-enable-building-examples-by-defaul.patch
deleted file mode 100644
index 3034f95..0000000
--- a/recipes-qt/qt5/qtwebkit-examples/0001-qtwebkit-examples-enable-building-examples-by-defaul.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8900f45818b7f181d2b57ceebdf086c78d2ee6b0 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys at ti.com>
-Date: Tue, 8 Oct 2013 00:18:10 -0400
-Subject: [PATCH] qtwebkit-examples: enable building examples by default
-
-Examples are provided in sources, but the build for them is not enabled by
-default. Since example binaries are packaged separately to ${PN}-examples,
-having them built by default makes more sense.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Denys Dmytriyenko <denys at ti.com>
----
- qtwebkit-examples.pro | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/qtwebkit-examples.pro b/qtwebkit-examples.pro
-index 3fcecf1..2da8a36 100644
---- a/qtwebkit-examples.pro
-+++ b/qtwebkit-examples.pro
-@@ -2,4 +2,4 @@ requires(qtHaveModule(webkit))
- 
- load(qt_parts)
- 
--SUBDIRS += doc
-+SUBDIRS += doc examples
--- 
-2.6.1
-
diff --git a/recipes-qt/qt5/qtwebkit-examples_git.bb b/recipes-qt/qt5/qtwebkit-examples_git.bb
index f915083..a0d4e9f 100644
--- a/recipes-qt/qt5/qtwebkit-examples_git.bb
+++ b/recipes-qt/qt5/qtwebkit-examples_git.bb
@@ -13,9 +13,7 @@ LIC_FILES_CHKSUM = " \
     file://examples/webkitwidgets/imageanalyzer/imageanalyzer.cpp;endline=39;md5=b0739af76072fbe303dc04b6941e054f \
 "
 
-SRC_URI += " \
-    file://0001-qtwebkit-examples-enable-building-examples-by-defaul.patch \
-"
+PACKAGECONFIG ?= "examples"
 
 DEPENDS += "qtwebkit qtxmlpatterns"
 RDEPENDS_${PN}-examples += "qtwebkit-qmlplugins"
-- 
1.9.1




More information about the Openembedded-devel mailing list