From c8662264eb6316334d77bb189bd6057976ef5876 Mon Sep 17 00:00:00 2001 From: Roy Kollen Svendsen Date: Wed, 4 Sep 2024 23:10:44 +0200 Subject: [PATCH] package/qt6/qt6base: allow selecting the host print support module According to configure.cmake print support requires us to select the widgets feature: ... qt_feature("printsupport" PRIVATE LABEL "Qt PrintSupport" CONDITION QT_FEATURE_widgets SECTION "Module" PURPOSE "Provides the Qt PrintSupport module." ) ... And further, according to configure.cmake, widgets requires us to select the gui feature: ... qt_feature("widgets" PRIVATE LABEL "Qt Widgets" AUTODETECT NOT TVOS AND NOT WATCHOS CONDITION QT_FEATURE_gui ) ... Signed-off-by: Roy Kollen Svendsen Signed-off-by: Thomas Petazzoni --- package/qt6/qt6base/Config.in.host | 9 +++++++++ package/qt6/qt6base/qt6base.mk | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/package/qt6/qt6base/Config.in.host b/package/qt6/qt6base/Config.in.host index 46fb668817..786c8ea3a7 100644 --- a/package/qt6/qt6base/Config.in.host +++ b/package/qt6/qt6base/Config.in.host @@ -8,6 +8,11 @@ config BR2_PACKAGE_HOST_QT6BASE_GUI config BR2_PACKAGE_HOST_QT6BASE_NETWORK bool +# The Qt Widgets module is required for printsupport +config BR2_PACKAGE_HOST_QT6BASE_PRINTSUPPORT + bool + select BR2_PACKAGE_HOST_QT6BASE_WIDGETS + # Select this if you need host qt6 tools that require the Qt::Test module # (e.g. qmltestrunner). config BR2_PACKAGE_HOST_QT6BASE_TEST @@ -17,3 +22,7 @@ config BR2_PACKAGE_HOST_QT6BASE_TEST # (e.g. qhelpgenerator). config BR2_PACKAGE_HOST_QT6BASE_SQL bool + +config BR2_PACKAGE_HOST_QT6BASE_WIDGETS + bool + select BR2_PACKAGE_HOST_QT6BASE_GUI diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk index 4c0392f92d..0617d05f5c 100644 --- a/package/qt6/qt6base/qt6base.mk +++ b/package/qt6/qt6base/qt6base.mk @@ -113,10 +113,8 @@ HOST_QT6BASE_CONF_OPTS += \ -DFEATURE_png=OFF \ -DFEATURE_gif=OFF \ -DFEATURE_jpeg=OFF \ - -DFEATURE_printsupport=OFF \ -DFEATURE_kms=OFF \ -DFEATURE_fontconfig=OFF \ - -DFEATURE_widgets=OFF \ -DFEATURE_libinput=OFF \ -DFEATURE_tslib=OFF \ -DFEATURE_eglfs=OFF @@ -131,6 +129,12 @@ else HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=OFF endif +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_PRINTSUPPORT),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_printsupport=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_printsupport=OFF +endif + # We need host qt6base with Sql support for host-qt6tools to generate the # qhelpgenerator host tool. qt6tools will fail to build if qhelpgenerator is not # available. @@ -150,6 +154,12 @@ else HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF endif +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_WIDGETS),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_widgets=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_widgets=OFF +endif + # Conditional blocks below are ordered by alphabetic ordering of the # BR2_PACKAGE_* option.