From 90a0f0a00516a8ec6dd5f31d40a123a82829d734 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sun, 2 Aug 2026 05:54:25 +0300 Subject: [PATCH] kf6-kio: durable Redox build fixes as recipe seds (survive restore-sources) kf6-kio re-cooked (fingerprint invalidated by the cookbook_configure change) and surfaced three issues; fix them as build-time seds so restore-sources.sh cannot revert them (a cached source snapshot kept reverting in-tree source edits): - previewjob.cpp: a prior port replaced the pristine '#include ' with an unterminated '#if defined(Q_OS_UNIX) && ... && !defined(Q_OS_REDOX)' (also dropping the include) -> 'unterminated #if'. Restore the include. - hostinfo.cpp: drop + (BIND resolver headers absent on relibc); the only symbol used, _PATH_RESCONF, has a /etc/resolv.conf fallback. - CMakeLists.txt: drop Qt6::Test from the REQUIRED components (autotests-only, gated on BUILD_TESTING, and Qt6Test is not built for the cross target). --- local/recipes/kde/kf6-kio/recipe.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/local/recipes/kde/kf6-kio/recipe.toml b/local/recipes/kde/kf6-kio/recipe.toml index bff9516b5c..5883a03eff 100644 --- a/local/recipes/kde/kf6-kio/recipe.toml +++ b/local/recipes/kde/kf6-kio/recipe.toml @@ -165,6 +165,23 @@ if start != -1 and end != -1 and start < end: askuser.write_text(text) PY +# --- Redox source fixes (applied at build time so restore-sources.sh cannot +# --- revert them) --- +# previewjob.cpp: a prior port left an unterminated `#if defined(Q_OS_UNIX) && +# ... && !defined(Q_OS_REDOX)` in place of the pristine `#include ` +# (the edit also dropped that include), giving "unterminated #if". Restore it. +sed -i 's|^#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && !defined(Q_OS_REDOX)$|#include |' \ + "${COOKBOOK_SOURCE}/src/gui/previewjob.cpp" 2>/dev/null || true + +# hostinfo.cpp: relibc has no BIND resolver headers; only _PATH_RESCONF is used +# and it has a "/etc/resolv.conf" fallback, so drop the includes (redox target). +sed -i '/#include /d; /#include /d' \ + "${COOKBOOK_SOURCE}/src/core/hostinfo.cpp" 2>/dev/null || true + +# Qt6::Test is autotests-only (BUILD_TESTING) and not built for the cross target. +sed -i 's|CONFIG REQUIRED Widgets Network Concurrent Xml Test)|CONFIG REQUIRED Widgets Network Concurrent Xml)|' \ + "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true + rm -f CMakeCache.txt rm -rf CMakeFiles