Message ID | 20240904122040.738362-1-roykollensvendsen@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] package/qt6/qt6tools: allow building host Qt Linguist Tools | expand |
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
Hi Thomas, Here is v2: PATCH 2/3: https://patchwork.ozlabs.org/project/buildroot/patch/20240904211049.866640-2-roykollensvendsen@gmail.com/ PATCH 3/3: https://patchwork.ozlabs.org/project/buildroot/patch/20240904211049.866640-3-roykollensvendsen@gmail.com/ Roy ons. 4. sep. 2024 kl. 14:30 skrev Thomas Petazzoni <thomas.petazzoni@bootlin.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
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. + +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 + ifeq ($(BR2_PACKAGE_QT6DECLARATIVE),y) QT6TOOLS_DEPENDENCIES += qt6declarative endif -HOST_QT6TOOLS_DEPENDENCIES = host-qt6base - $(eval $(cmake-package)) $(eval $(host-cmake-package))
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(-)