From patchwork Sat Oct 5 21:16:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RmF0aWggQcWfxLFjxLE=?= X-Patchwork-Id: 280805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id B115F2C00A3 for ; Sun, 6 Oct 2013 08:18:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8C861932B9; Sat, 5 Oct 2013 21:18:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kTzjVGvyzw6I; Sat, 5 Oct 2013 21:18:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4A3B793A79; Sat, 5 Oct 2013 21:18:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 138A11BF952 for ; Sat, 5 Oct 2013 21:18:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0DE178BBBF for ; Sat, 5 Oct 2013 21:18:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yYjm+cz7ZdCW for ; Sat, 5 Oct 2013 21:18:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by whitealder.osuosl.org (Postfix) with ESMTPS id 60AB08BCBF for ; Sat, 5 Oct 2013 21:18:51 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id e53so2486592eek.13 for ; Sat, 05 Oct 2013 14:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=eiaMOLo1R3VARKOLv4hSGr66JXkQpaIOoQubiw1EYyM=; b=oyUKP1uGdFePp+Usl1HQ9hK4MfmCNhjnAylaf5Wx47N6RffqsnRyPJGGZenl5Yltuy VOMvV3DGa2Uvg1FDO7SB2jYZqTqhMx5Q3RAPIqeRyeZ5a748OxpKDrm5WYWHyO1FyMwr VxG228uyotpZgsYexiYfARt1TLWOmosBEx1Lz/bDhU0kkBnRdUcne84UcuePCB1D87P6 3Dk1/2GW3SiYTKXSBXTtQPFLkmXT6ePMmtQJ+5NoUlo3IbUUFt1pRiBpaOH+BN0nTWRs AM7srZhle+Hv59bFVllJB4TB545VMmf270KWGgh3GZIAfSAoN5ZxZCen++Bw0EQREWvd t77g== X-Received: by 10.15.67.131 with SMTP id u3mr33773141eex.34.1381007929742; Sat, 05 Oct 2013 14:18:49 -0700 (PDT) Received: from localhost.localdomain ([78.173.88.154]) by mx.google.com with ESMTPSA id i1sm43673768eeg.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Oct 2013 14:18:49 -0700 (PDT) From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= To: Date: Sun, 6 Oct 2013 00:16:36 +0300 Message-Id: <1381007796-20031-2-git-send-email-fatih.asici@gmail.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381007796-20031-1-git-send-email-fatih.asici@gmail.com> References: <1381007796-20031-1-git-send-email-fatih.asici@gmail.com> MIME-Version: 1.0 Cc: buildroot@busybox.net Subject: [Buildroot] [PATCH 2/2] qt5base: add an option to build and install examples X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Adds two patches to fix building of examples when configured with one of these options: * -no-opengl (patch fetched from upstream) * -no-gui (patch sent to upstream) Signed-off-by: Fatih Aşıcı Tested-by: Ezequiel Garcia --- package/qt5/qt5base/Config.in | 7 +++ ...e-build-failure-in-windowcontainer-exampl.patch | 28 ++++++++++ ...les-Fix-build-when-configured-with-no-gui.patch | 62 ++++++++++++++++++++++ package/qt5/qt5base/qt5base.mk | 18 ++++++- 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 package/qt5/qt5base/qt5base-0006-Fix-possible-build-failure-in-windowcontainer-exampl.patch create mode 100644 package/qt5/qt5base/qt5base-0007-examples-Fix-build-when-configured-with-no-gui.patch diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in index e433373..278966b 100644 --- a/package/qt5/qt5base/Config.in +++ b/package/qt5/qt5base/Config.in @@ -28,6 +28,13 @@ config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html +config BR2_PACKAGE_QT5BASE_EXAMPLES + bool "Compile and install examples (with code)" + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_XML + help + If unsure, say N. + config BR2_PACKAGE_QT5BASE_NETWORK bool "network module" help diff --git a/package/qt5/qt5base/qt5base-0006-Fix-possible-build-failure-in-windowcontainer-exampl.patch b/package/qt5/qt5base/qt5base-0006-Fix-possible-build-failure-in-windowcontainer-exampl.patch new file mode 100644 index 0000000..15c7a3b --- /dev/null +++ b/package/qt5/qt5base/qt5base-0006-Fix-possible-build-failure-in-windowcontainer-exampl.patch @@ -0,0 +1,28 @@ +From f6a7092309e81326bf1fced4f8deb15bebcae9f1 Mon Sep 17 00:00:00 2001 +From: Andrew Knight +Date: Sat, 31 Aug 2013 16:36:25 +0300 +Subject: [PATCH] Fix possible build failure in windowcontainer example + +The windowcontainer example utilzes the openglwindow example, so it +must also check that OpenGL is available. + +Change-Id: I7ecb372cfd533bb56effe7c61ebee9bd53de4c54 +Reviewed-by: Friedemann Kleint +--- + examples/widgets/widgets.pro | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro +index 726494f..d45a805 100644 +--- a/examples/widgets/widgets.pro ++++ b/examples/widgets/widgets.pro +@@ -22,5 +22,6 @@ SUBDIRS = \ + widgets \ + windowcontainer + ++!contains(QT_CONFIG, opengl(es1|es2)?): SUBDIRS -= windowcontainer + contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows + contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= draganddrop +-- +1.8.4.rc3 + diff --git a/package/qt5/qt5base/qt5base-0007-examples-Fix-build-when-configured-with-no-gui.patch b/package/qt5/qt5base/qt5base-0007-examples-Fix-build-when-configured-with-no-gui.patch new file mode 100644 index 0000000..9c5cc25 --- /dev/null +++ b/package/qt5/qt5base/qt5base-0007-examples-Fix-build-when-configured-with-no-gui.patch @@ -0,0 +1,62 @@ +From 35d2c2018371099fc07fdf3ddda4d37783705411 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= +Date: Sat, 5 Oct 2013 22:57:41 +0300 +Subject: [PATCH] examples: Fix build when configured with -no-gui +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building of examples fails when configured with -no-gui. This patch adds gui +dependency to the relevant .pro files. + +Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-33910 +Signed-off-by: Fatih Aşıcı +--- + examples/gui/gui.pro | 2 ++ + examples/qpa/qpa.pro | 2 ++ + examples/qtconcurrent/qtconcurrent.pro | 1 + + examples/threads/threads.pro | 2 ++ + 4 files changed, 7 insertions(+) + +diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro +index 8758a1b..5fb4241 100644 +--- a/examples/gui/gui.pro ++++ b/examples/gui/gui.pro +@@ -1,3 +1,5 @@ ++requires(qtHaveModule(gui)) ++ + TEMPLATE = subdirs + CONFIG += no_docs_target + +diff --git a/examples/qpa/qpa.pro b/examples/qpa/qpa.pro +index 6f07e50..2729348 100644 +--- a/examples/qpa/qpa.pro ++++ b/examples/qpa/qpa.pro +@@ -1,2 +1,4 @@ ++requires(qtHaveModule(gui)) ++ + TEMPLATE = subdirs + SUBDIRS = windows +diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro +index 1df6f2d..5e8c77f 100644 +--- a/examples/qtconcurrent/qtconcurrent.pro ++++ b/examples/qtconcurrent/qtconcurrent.pro +@@ -1,4 +1,5 @@ + requires(qtHaveModule(concurrent)) ++requires(qtHaveModule(gui)) + + TEMPLATE = subdirs + SUBDIRS = imagescaling \ +diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro +index e47da84..b5cf12a 100644 +--- a/examples/threads/threads.pro ++++ b/examples/threads/threads.pro +@@ -1,3 +1,5 @@ ++requires(qtHaveModule(gui)) ++ + TEMPLATE = subdirs + CONFIG += no_docs_target + +-- +1.8.4.rc3 + diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 0106c2c..ebf51c4 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -60,6 +60,12 @@ QT5BASE_LICENSE = Commercial license QT5BASE_REDISTRIBUTE = NO endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +QT5BASE_CONFIGURE_OPTS += -make examples -compile-examples +else +QT5BASE_CONFIGURE_OPTS += -nomake examples +endif + # Qt5 SQL Plugins ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y) ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y) @@ -175,8 +181,9 @@ define QT5BASE_CONFIGURE_CMDS -hostprefix $(HOST_DIR)/usr \ -sysroot $(STAGING_DIR) \ -plugindir /usr/lib/qt/plugins \ + -examplesdir /usr/lib/qt/examples \ -no-rpath \ - -nomake examples -nomake tests \ + -nomake tests \ -device buildroot \ -no-c++11 \ $(QT5BASE_CONFIGURE_OPTS) \ @@ -212,15 +219,24 @@ define QT5BASE_INSTALL_TARGET_FONTS fi endef +define QT5BASE_INSTALL_TARGET_EXAMPLES + if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \ + fi +endef + ifeq ($(BR2_PREFER_STATIC_LIB),y) define QT5BASE_INSTALL_TARGET_CMDS $(QT5BASE_INSTALL_TARGET_FONTS) + $(QT5BASE_INSTALL_TARGET_EXAMPLES) endef else define QT5BASE_INSTALL_TARGET_CMDS $(QT5BASE_INSTALL_TARGET_LIBS) $(QT5BASE_INSTALL_TARGET_PLUGINS) $(QT5BASE_INSTALL_TARGET_FONTS) + $(QT5BASE_INSTALL_TARGET_EXAMPLES) endef endif