From patchwork Fri Jul 4 09:36:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 367051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id C66791400D6 for ; Fri, 4 Jul 2014 19:36:21 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 292D226EBC; Fri, 4 Jul 2014 09:36:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eCoZduvuIHNn; Fri, 4 Jul 2014 09:36:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 79ABE329B6; Fri, 4 Jul 2014 09:36:18 +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 615EF1BF9E5 for ; Fri, 4 Jul 2014 09:36:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5CD3C8C575 for ; Fri, 4 Jul 2014 09:36:17 +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 iMYnH+9-Oyxy for ; Fri, 4 Jul 2014 09:36:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id E0B658C59F for ; Fri, 4 Jul 2014 09:36:15 +0000 (UTC) Received: from localhost.localdomain (mal35-3-82-240-201-171.fbx.proxad.net [82.240.201.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id D8C5B409DA; Fri, 4 Jul 2014 11:36:13 +0200 (CEST) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Fri, 4 Jul 2014 11:36:11 +0200 Message-Id: <1404466571-27586-1-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 2.0.0 MIME-Version: 1.0 Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH] qt5: Add an option to select default platform 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 Whithout this path, default platform is automaticaly set (generally set to "eglfs" as defined in qt5base/mkspecs/devices/common/linux_device_pre.conf:1). This choice is not always what the user would like. Thus, user have to manually appends "-platform " to command line when running any qt5 application. This patch allows user to choose default platform explicitly. Signed-off-by: Jérôme Pouiller --- package/qt5/qt5base/Config.in | 43 ++++++++++++++++++++++++++++++++++++++++++ package/qt5/qt5base/qt5base.mk | 6 ++++++ 2 files changed, 49 insertions(+) diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in index 70ddcd3..5fa7c02 100644 --- a/package/qt5/qt5base/Config.in +++ b/package/qt5/qt5base/Config.in @@ -144,6 +144,49 @@ config BR2_PACKAGE_QT5BASE_EGLFS comment "eglfs backend available if OpenGLES and EGL are enabled" depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES +choice + prompt "default graphical platform" + default BR2_PACKAGE_QT5BASE_DEFAULT_QPA_MINIMAL + help + Notice you may choose platform at runtime using -platform (-platform + help to get list of compiled platforms). + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_MINIMAL + bool "minimal" + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_OFFSCREEN + bool "offscreen" + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_LINUXFB + bool "linuxfb" + depends on BR2_PACKAGE_QT5BASE_LINUXFB + +comment 'linuxfb needs linuxfb support enabled' + depends on !BR2_PACKAGE_QT5BASE_LINUXFB + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_DIRECTFB + bool "directfb" + depends on BR2_PACKAGE_QT5BASE_DIRECTFB + +comment 'directfb needs directfb support enabled' + depends on !BR2_PACKAGE_QT5BASE_DIRECTFB + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_XCB + bool "xcb" + depends on BR2_PACKAGE_QT5BASE_XCB + +comment 'xcb needs X.org XCB support enabled' + depends on !BR2_PACKAGE_QT5BASE_XCB + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA_EGLFS + bool "eglfs" + depends on BR2_PACKAGE_QT5BASE_EGLFS + +comment 'eglfs needs eglfs support enabled' + depends on !BR2_PACKAGE_QT5BASE_EGLFS + +endchoice + config BR2_PACKAGE_QT5BASE_PRINTSUPPORT bool "print support module" select BR2_PACKAGE_QT5BASE_WIDGETS diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 618251e..9018ff8 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -96,6 +96,12 @@ else QT5BASE_CONFIGURE_OPTS += -no-xcb endif +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DEFAULT_QPA_MINIMAL),-qpa minimalb) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DEFAULT_QPA_OFFSCREEN),-qpa offscreen) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DEFAULT_QPA_LINUXFB),-qpa linuxfb) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DEFAULT_QPA_XCB),-qpa xcb) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DEFAULT_QPA_EGLFS),-qpa eglfs) + ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y) QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs QT5BASE_DEPENDENCIES += libgles libegl