From 989c7493e70b7344aebfe8dcfe10d2f0d0bde59f Mon Sep 17 00:00:00 2001 From: Roy Kollen Svendsen Date: Wed, 4 Sep 2024 23:10:46 +0200 Subject: [PATCH] package/qt6/qt6tools: add option to build host linguist tools 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 Signed-off-by: Thomas Petazzoni --- 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))