From 7507d7331c609bb1a8267e7b957f9fdd290d18e8 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 1 Aug 2026 15:28:38 +0300 Subject: [PATCH] =?UTF-8?q?kde:=20ECMPoQmTools=20=E2=80=94=20make=20Lingui?= =?UTF-8?q?stTools=20optional=20(cross-build=20without=20qttools)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ecm_process_po_files_as_qm() did find_package(Qt6 COMPONENTS LinguistTools REQUIRED) for lrelease/lconvert. Those live in qttools, which is not in the Redox cross toolchain, so every KDE package that installs translations failed to configure (Qt6_FOUND=FALSE). Use OPTIONAL_COMPONENTS (so a missing LinguistTools neither aborts nor registers as a required package the final feature_summary fails on) and return early when the tools are absent — .po -> .qm compilation is skipped and the app builds untranslated. Systemic: unblocks all KF6 packages. --- .../source/modules/ECMPoQmTools.cmake | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake b/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake index f348be754c..e06b8318bc 100644 --- a/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake +++ b/local/recipes/kde/kf6-extra-cmake-modules/source/modules/ECMPoQmTools.cmake @@ -148,11 +148,21 @@ function(ecm_process_po_files_as_qm lang) message(FATAL_ERROR "ecm_process_po_files_as_qm() must be called with PO_FILES argument") endif() - # Find lrelease and lconvert + # Find lrelease and lconvert. LinguistTools (lrelease/lconvert) live in + # qttools, which is not part of the cross toolchain when building for Redox. + # Use OPTIONAL_COMPONENTS so a missing LinguistTools neither aborts here nor + # registers as a required package that the final feature_summary would fail + # on. Without the tools, .po -> .qm translation compilation cannot run, so + # skip it gracefully (the app is built untranslated). if (QT_MAJOR_VERSION EQUAL "5") - find_package(Qt5LinguistTools CONFIG REQUIRED) + find_package(Qt5LinguistTools CONFIG) else() - find_package(Qt6 COMPONENTS LinguistTools CONFIG REQUIRED) + find_package(Qt6 OPTIONAL_COMPONENTS LinguistTools CONFIG) + endif() + + if (NOT TARGET Qt${QT_MAJOR_VERSION}::lconvert AND NOT TARGET Qt${QT_MAJOR_VERSION}::lrelease) + message(STATUS "ECMPoQmTools: LinguistTools unavailable; skipping .po -> .qm processing") + return() endif() if(TARGET Qt${QT_MAJOR_VERSION}::lconvert)