All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module
@ 2024-09-04 21:10 Roy Kollen Svendsen
  2024-09-04 21:10 ` [Buildroot] [PATCH v2 2/3] package/qt6/qt6tools: separate host and target options Roy Kollen Svendsen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Roy Kollen Svendsen @ 2024-09-04 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Jesse Van Gavere, Roy Kollen Svendsen, Thomas Petazzoni

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 <roykollensvendsen@gmail.com>
---
In response to:
https://patchwork.ozlabs.org/project/buildroot/patch/20240904122040.738362-2-roykollensvendsen@gmail.com/

Changes v1 -> v2:
  - make this commit the first one in the series  (suggested by Thomas)
  - remove useless comments  (suggested by Thomas)
  
 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.
 
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 2/3] package/qt6/qt6tools: separate host and target options
  2024-09-04 21:10 [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Roy Kollen Svendsen
@ 2024-09-04 21:10 ` Roy Kollen Svendsen
  2024-09-04 21:10 ` [Buildroot] [PATCH v2 3/3] package/qt6/qt6tools: add option to build host linguist tools Roy Kollen Svendsen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Roy Kollen Svendsen @ 2024-09-04 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Jesse Van Gavere, Roy Kollen Svendsen, Thomas Petazzoni

Add Config.in.host to allow separating options affecting host and target
builds.

Move/copy parts of Config.in into Config.in.host.

Signed-off-by: Roy Kollen Svendsen <roykollensvendsen@gmail.com>
---
In response to:
https://patchwork.ozlabs.org/project/buildroot/patch/20240904122040.738362-1-roykollensvendsen@gmail.com/

Changes v1 -> v2:
  - this patch was added to the series as a preliminary step to move the host
  linguist tools option (see patch 3/3) into Config.in.host

 package/qt6/Config.in.host          |  1 +
 package/qt6/qt6tools/Config.in      |  8 ++------
 package/qt6/qt6tools/Config.in.host | 15 +++++++++++++++
 3 files changed, 18 insertions(+), 6 deletions(-)
 create mode 100644 package/qt6/qt6tools/Config.in.host

diff --git a/package/qt6/Config.in.host b/package/qt6/Config.in.host
index dfe7865c57..fa5c39cce1 100644
--- a/package/qt6/Config.in.host
+++ b/package/qt6/Config.in.host
@@ -1,5 +1,6 @@
 if BR2_PACKAGE_QT6
 
 source "package/qt6/qt6base/Config.in.host"
+source "package/qt6/qt6tools/Config.in.host"
 
 endif
diff --git a/package/qt6/qt6tools/Config.in b/package/qt6/qt6tools/Config.in
index 5f52c5644f..1828e5f043 100644
--- a/package/qt6/qt6tools/Config.in
+++ b/package/qt6/qt6tools/Config.in
@@ -1,12 +1,8 @@
 config BR2_PACKAGE_QT6TOOLS
 	bool "qt6tools"
+	# The Qt Network module is required
 	select BR2_PACKAGE_QT6BASE_NETWORK
-	# qt6tools needs host-qt6tools, and host-qt6tools needs
-	# network support in qt6base. In addition, we also need
-	# host-qt6base with Sql support to build the qhelpgenerator
-	# tool, if target support for Sql is present
-	select BR2_PACKAGE_HOST_QT6BASE_NETWORK
-	select BR2_PACKAGE_HOST_QT6BASE_SQL if BR2_PACKAGE_QT6BASE_SQL
+	select BR2_PACKAGE_HOST_QT6TOOLS
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
diff --git a/package/qt6/qt6tools/Config.in.host b/package/qt6/qt6tools/Config.in.host
new file mode 100644
index 0000000000..4fd28172b9
--- /dev/null
+++ b/package/qt6/qt6tools/Config.in.host
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_HOST_QT6TOOLS
+	bool "host qt6tools"
+	# The Qt Qt Network module is required
+	select BR2_PACKAGE_HOST_QT6BASE_NETWORK
+	# Requires the Qt Sql module to build the qhelpgenerator
+	# tool, if target support for Sql is present
+	select BR2_PACKAGE_HOST_QT6BASE_SQL if BR2_PACKAGE_QT6BASE_SQL
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  Qt Tools provides tools facilitate the development
+	  and design of applications.
+
+	  https://github.com/qt/qttools
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 3/3] package/qt6/qt6tools: add option to build host linguist tools
  2024-09-04 21:10 [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Roy Kollen Svendsen
  2024-09-04 21:10 ` [Buildroot] [PATCH v2 2/3] package/qt6/qt6tools: separate host and target options Roy Kollen Svendsen
@ 2024-09-04 21:10 ` Roy Kollen Svendsen
  2024-09-14 10:08 ` [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Thomas Petazzoni via buildroot
  2024-09-14 10:43 ` Thomas Petazzoni via buildroot
  3 siblings, 0 replies; 5+ messages in thread
From: Roy Kollen Svendsen @ 2024-09-04 21:10 UTC (permalink / raw)
  To: buildroot; +Cc: Jesse Van Gavere, Roy Kollen Svendsen, Thomas Petazzoni

According to src/linguist/CMakeLists.txt we need to enable the linguist
feature:

...
if(NOT QT_FEATURE_linguist)
    return()
endif()
add_subdirectory(lconvert)
add_subdirectory(lprodump)
add_subdirectory(lrelease)
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
    add_subdirectory(linguist)
endif()
...

And according to configure.cmake we need to select print support:
...
qt_feature("linguist" PRIVATE
    LABEL "Qt Linguist"
    PURPOSE "Qt Linguist can be used by translator to translate text in Qt applications."
    CONDITION TARGET Qt::PrintSupport
)
...

Signed-off-by: Roy Kollen Svendsen <roykollensvendsen@gmail.com>
---
In response to:
https://patchwork.ozlabs.org/project/buildroot/patch/20240904122040.738362-1-roykollensvendsen@gmail.com/

Changes v1 -> v2:
  - avoid inter-twining target package and host package details in the
  mk-file  (suggested by Thomas)
  - move host linguist tools option into Config.in.host  (suggested by Thomas) 

 package/qt6/qt6tools/Config.in.host | 11 +++++++++++
 package/qt6/qt6tools/qt6tools.mk    |  6 ++++++
 2 files changed, 17 insertions(+)

diff --git a/package/qt6/qt6tools/Config.in.host b/package/qt6/qt6tools/Config.in.host
index 4fd28172b9..110ecbee9b 100644
--- a/package/qt6/qt6tools/Config.in.host
+++ b/package/qt6/qt6tools/Config.in.host
@@ -13,3 +13,14 @@ config BR2_PACKAGE_HOST_QT6TOOLS
 	  and design of applications.
 
 	  https://github.com/qt/qttools
+
+if BR2_PACKAGE_HOST_QT6TOOLS
+
+config BR2_PACKAGE_HOST_QT6TOOLS_LINGUIST_TOOLS
+	bool "host linguist tools"
+	select BR2_PACKAGE_HOST_QT6BASE_PRINTSUPPORT
+	help
+	  Translate Qt C++ and Qt Quick applications into local
+	  languages.
+
+endif
diff --git a/package/qt6/qt6tools/qt6tools.mk b/package/qt6/qt6tools/qt6tools.mk
index 09c986cfc6..e91db79a12 100644
--- a/package/qt6/qt6tools/qt6tools.mk
+++ b/package/qt6/qt6tools/qt6tools.mk
@@ -43,5 +43,11 @@ endif
 
 HOST_QT6TOOLS_DEPENDENCIES = host-qt6base
 
+ifeq ($(BR2_PACKAGE_HOST_QT6TOOLS_LINGUIST_TOOLS),y)
+HOST_QT6TOOLS_CONF_OPTS += -DFEATURE_linguist=ON
+else
+HOST_QT6TOOLS_CONF_OPTS += -DFEATURE_linguist=OFF
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.46.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module
  2024-09-04 21:10 [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Roy Kollen Svendsen
  2024-09-04 21:10 ` [Buildroot] [PATCH v2 2/3] package/qt6/qt6tools: separate host and target options Roy Kollen Svendsen
  2024-09-04 21:10 ` [Buildroot] [PATCH v2 3/3] package/qt6/qt6tools: add option to build host linguist tools Roy Kollen Svendsen
@ 2024-09-14 10:08 ` Thomas Petazzoni via buildroot
  2024-09-14 10:43 ` Thomas Petazzoni via buildroot
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-14 10:08 UTC (permalink / raw)
  To: Roy Kollen Svendsen; +Cc: Jesse Van Gavere, buildroot

On Wed,  4 Sep 2024 23:10:44 +0200
Roy Kollen Svendsen <roykollensvendsen@gmail.com> wrote:

> 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 <roykollensvendsen@gmail.com>
> ---
> In response to:
> https://patchwork.ozlabs.org/project/buildroot/patch/20240904122040.738362-2-roykollensvendsen@gmail.com/

Thanks a lot, series applied!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module
  2024-09-04 21:10 [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Roy Kollen Svendsen
                   ` (2 preceding siblings ...)
  2024-09-14 10:08 ` [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Thomas Petazzoni via buildroot
@ 2024-09-14 10:43 ` Thomas Petazzoni via buildroot
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-14 10:43 UTC (permalink / raw)
  To: Roy Kollen Svendsen; +Cc: Jesse Van Gavere, buildroot

On Wed,  4 Sep 2024 23:10:44 +0200
Roy Kollen Svendsen <roykollensvendsen@gmail.com> wrote:

> 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 <roykollensvendsen@gmail.com>
> ---
> In response to:
> https://patchwork.ozlabs.org/project/buildroot/patch/20240904122040.738362-2-roykollensvendsen@gmail.com/

And in fact I have reverted this one, because I applied
https://patchwork.ozlabs.org/project/buildroot/patch/20240911132021.2318073-1-christian@klarinett.li/,
which makes this patch unnecessary.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-14 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 21:10 [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Roy Kollen Svendsen
2024-09-04 21:10 ` [Buildroot] [PATCH v2 2/3] package/qt6/qt6tools: separate host and target options Roy Kollen Svendsen
2024-09-04 21:10 ` [Buildroot] [PATCH v2 3/3] package/qt6/qt6tools: add option to build host linguist tools Roy Kollen Svendsen
2024-09-14 10:08 ` [Buildroot] [PATCH v2 1/3] package/qt6/qt6base: allow selecting the host print support module Thomas Petazzoni via buildroot
2024-09-14 10:43 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.