Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Roy Kollen Svendsen <roykollensvendsen@gmail.com>
Cc: Jesse Van Gavere <jesseevg@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/qt6/qt6tools: allow building host Qt Linguist Tools
Date: Wed, 4 Sep 2024 14:30:16 +0200	[thread overview]
Message-ID: <20240904143016.14accde3@windsurf> (raw)
In-Reply-To: <20240904122040.738362-1-roykollensvendsen@gmail.com>

Hello,

On Wed,  4 Sep 2024 14:20:37 +0200
Roy Kollen Svendsen <roykollensvendsen@gmail.com> wrote:

> 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>
> ---
>  package/qt6/qt6tools/Config.in   | 11 +++++++++++
>  package/qt6/qt6tools/qt6tools.mk | 10 ++++++++--
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/package/qt6/qt6tools/Config.in b/package/qt6/qt6tools/Config.in
> index 5f52c5644f..eea461a2a9 100644
> --- a/package/qt6/qt6tools/Config.in
> +++ b/package/qt6/qt6tools/Config.in
> @@ -15,3 +15,14 @@ config BR2_PACKAGE_QT6TOOLS
>  	  and design of applications.
>  
>  	  https://github.com/qt/qttools
> +
> +if BR2_PACKAGE_QT6TOOLS
> +
> +config BR2_PACKAGE_HOST_QT6TOOLS_LINGUIST_TOOLS
> +	bool "linguist tools (host)"
> +	select BR2_PACKAGE_HOST_QT6BASE_PRINTSUPPORT
> +	help
> +	  Translate Qt C++ and Qt Quick applications into local
> +	  languages.

This should go in a package/qt6/qt6tools/Config.in.host, not in
Config.in as Config.in is for options that affect the target build.

> +
> +endif
> diff --git a/package/qt6/qt6tools/qt6tools.mk b/package/qt6/qt6tools/qt6tools.mk
> index 09c986cfc6..897cf43054 100644
> --- a/package/qt6/qt6tools/qt6tools.mk
> +++ b/package/qt6/qt6tools/qt6tools.mk
> @@ -37,11 +37,17 @@ QT6TOOLS_DEPENDENCIES = \
>  	qt6base \
>  	host-qt6tools
>  
> +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

Please group these host package things...

> +
>  ifeq ($(BR2_PACKAGE_QT6DECLARATIVE),y)
>  QT6TOOLS_DEPENDENCIES += qt6declarative
>  endif
>  
> -HOST_QT6TOOLS_DEPENDENCIES = host-qt6base

... here. Rather than inter-twining target package and host package
details.

Thanks!

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

  parent reply	other threads:[~2024-09-04 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 12:20 [Buildroot] [PATCH 1/2] package/qt6/qt6tools: allow building host Qt Linguist Tools Roy Kollen Svendsen
2024-09-04 12:20 ` [Buildroot] [PATCH 2/2] package/qt6/qt6base: allow selecting the host Qt Print Support module Roy Kollen Svendsen
2024-09-04 12:33   ` Thomas Petazzoni via buildroot
2024-09-04 21:23     ` Roy Kollen Svendsen
2024-09-04 12:30 ` Thomas Petazzoni via buildroot [this message]
2024-09-04 21:27   ` [Buildroot] [PATCH 1/2] package/qt6/qt6tools: allow building host Qt Linguist Tools Roy Kollen Svendsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240904143016.14accde3@windsurf \
    --to=buildroot@buildroot.org \
    --cc=jesseevg@gmail.com \
    --cc=roykollensvendsen@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox