From 7b9e0ec57c660554ef6c46c0cfdfdd5a6db24e27 Mon Sep 17 00:00:00 2001 From: Christian Hitz Date: Wed, 11 Sep 2024 15:20:19 +0200 Subject: [PATCH] package/qt6/qt6tools: allow building linguist tools without printsupport This fixes a regression in qttools that would not build the qt linuguist tools (lupdate, lrelease, etc.) when CUPS is not available. Signed-off-by: Christian Hitz Signed-off-by: Thomas Petazzoni --- ...e-lconvert-lrelease-in-no-gui-builds.patch | 56 +++++++++++++++++++ package/qt6/qt6tools/Config.in.host | 1 - 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 package/qt6/qt6tools/0001-CMake-Re-enable-lupdate-lconvert-lrelease-in-no-gui-builds.patch diff --git a/package/qt6/qt6tools/0001-CMake-Re-enable-lupdate-lconvert-lrelease-in-no-gui-builds.patch b/package/qt6/qt6tools/0001-CMake-Re-enable-lupdate-lconvert-lrelease-in-no-gui-builds.patch new file mode 100644 index 0000000000..fdce97cf48 --- /dev/null +++ b/package/qt6/qt6tools/0001-CMake-Re-enable-lupdate-lconvert-lrelease-in-no-gui-builds.patch @@ -0,0 +1,56 @@ +From 4be1823e4d459c89717e791ef27fd463ad04cb2b Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Tue, 11 Jun 2024 10:47:18 +0200 +Subject: [PATCH] CMake: Re-enable lupdate/lconvert/lrelease in no-gui builds + +This reverts 8dba0e48a0f7d3487b318a74f80f2d8e59c320f9 which disabled the +'linguist' feature if the 'printsupport' feature wasn't available. +However, the 'linguist' feature controls not only the Qt Linguist +application but also the command line tools lupdate, lconvert, and +lrelease. In no-gui builds, which also disable printsupport, the command +line tools were unexpectedly missing. + +Fix the issue by extending the feature condition in +src/linguist/CMakeLists.txt. As drive-by, fix the FEATURE_png condition +that was still in QMake form from the initial conversion. + +Fixes: QTBUG-126189 +Task-number: QTBUG-125066 +Pick-to: 6.7 6.8 +Change-Id: I59ebb82fd5823165b307ffbc967d7fd89a071ede +Reviewed-by: Alexey Edelev +Reviewed-by: Alexandru Croitor + +Upstream: https://github.com/qt/qttools/commit/4be1823e4d459c89717e791ef27fd463ad04cb2b +Signed-off-by: Christian Hitz +--- + configure.cmake | 1 - + src/linguist/CMakeLists.txt | 3 ++- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.cmake b/configure.cmake +index 51a5196da6..e0facf0b90 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -74,7 +74,6 @@ qt_feature("kmap2qmap" PRIVATE + 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 + ) + qt_feature("pixeltool" PRIVATE + LABEL "pixeltool" +diff --git a/src/linguist/CMakeLists.txt b/src/linguist/CMakeLists.txt +index ef28c0ff3a..ee11963039 100644 +--- a/src/linguist/CMakeLists.txt ++++ b/src/linguist/CMakeLists.txt +@@ -14,7 +14,8 @@ 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) ++if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton ++ AND QT_FEATURE_png AND QT_FEATURE_printsupport AND TARGET Qt::Widgets) + add_subdirectory(linguist) + endif() + diff --git a/package/qt6/qt6tools/Config.in.host b/package/qt6/qt6tools/Config.in.host index 110ecbee9b..7a6f8a5176 100644 --- a/package/qt6/qt6tools/Config.in.host +++ b/package/qt6/qt6tools/Config.in.host @@ -18,7 +18,6 @@ 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.