From 963c2baba52132b5041536e5591f8e53a7aca631 Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Fri, 12 Jun 2026 21:46:39 +0300 Subject: [PATCH] C-7 step 2: edit 24 recipes to use cookbook_apply_patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For each recipe with a migration patch in `local/patches//`, replace the inline `sed -i` chains in the recipe's [build].script with a single `cookbook_apply_patches${REDBEAR_PATCHES_DIR}` call. The cookbook's helper applies every patch in `local/patches//[0-9]*.patch` in lexical order, with idempotency (skips patches that are already applied via `git apply --reverse --check`). The recipe no longer needs to inline the sed chains — they're durable in the patch. Path resolution: ${COOKBOOK_RECIPE}/../../../../local/patches/` That's 4 levels up because the KF6 recipes live at `local/recipes/kde//` (4 levels deep from the project root). The cookbook helper's docstring shows `../../../` (3 levels) which is for the older recipe layout at `recipes///`. The `local/recipes/libs/libdrm/recipe.toml` and `local/recipes/kde/sddm/recipe.toml` already used the 4-level path. KF6 recipes are now consistent with those. New helper: `local/scripts/edit-kf6-recipes-for-patches.sh` Removes every `sed -i` chain from a recipe and inserts the `cookbook_apply_patches` call in place of the FIRST removed sed. Works for any recipe with a migration patch, regardless of how many chains it had (1 for kf6-kauth, 10 for kf6-kcmutils and kf6-knotifications, 8 for kf6-kjobwidgets, etc.). Recipes edited (24): kdecoration, kf6-karchive, kf6-kauth, kf6-kcmutils, kf6-kcodecs, kf6-kcompletion, kf6-kconfig, kf6-kcoreaddons, kf6-kdbusaddons, kf6-kdeclarative, kf6-kglobalaccel, kf6-kitemviews, kf6-kjobwidgets, kf6-knotifications, kf6-kwayland, kf6-kwidgetsaddons, kf6-kwindowsystem, kf6-notifyconfig, kf6-solid, kf6-sonnet, kf6-syntaxhighlighting, kirigami, konsole, kwin Skipped (7): breeze, kde-cli-tools, kf6-kbookmarks, kf6-kded6, kglobalacceld, plasma-desktop, plasma-workspace — no migration patch (NO-OP recipes whose sed chains were already cleaned). The cookbook's idempotency means a partial re-cook (after a previous successful cook) doesn't fail with 'patch already applied' — the helper just prints 'applying=N skipped=1'. --- local/recipes/kde/kdecoration/recipe.toml | 8 +- local/recipes/kde/kf6-karchive/recipe.toml | 13 +- local/recipes/kde/kf6-kauth/recipe.toml | 8 +- local/recipes/kde/kf6-kcmutils/recipe.toml | 64 +++++-- local/recipes/kde/kf6-kcodecs/recipe.toml | 13 +- local/recipes/kde/kf6-kcompletion/recipe.toml | 12 +- local/recipes/kde/kf6-kconfig/recipe.toml | 8 +- local/recipes/kde/kf6-kcoreaddons/recipe.toml | 10 +- local/recipes/kde/kf6-kdbusaddons/recipe.toml | 14 +- .../recipes/kde/kf6-kdeclarative/recipe.toml | 14 +- .../recipes/kde/kf6-kglobalaccel/recipe.toml | 13 +- local/recipes/kde/kf6-kitemviews/recipe.toml | 12 +- local/recipes/kde/kf6-kjobwidgets/recipe.toml | 14 +- .../kde/kf6-knotifications/recipe.toml | 25 +-- local/recipes/kde/kf6-kwayland/recipe.toml | 9 +- .../kde/kf6-kwidgetsaddons/recipe.toml | 9 +- .../recipes/kde/kf6-kwindowsystem/recipe.toml | 10 +- .../recipes/kde/kf6-notifyconfig/recipe.toml | 19 +- local/recipes/kde/kf6-solid/recipe.toml | 14 +- local/recipes/kde/kf6-sonnet/recipe.toml | 10 +- .../kde/kf6-syntaxhighlighting/recipe.toml | 16 +- local/recipes/kde/kirigami/recipe.toml | 12 +- local/recipes/kde/konsole/recipe.toml | 6 +- local/recipes/kde/kwin/recipe.toml | 15 +- local/scripts/edit-kf6-recipes-for-patches.sh | 172 ++++++++++++++++++ 25 files changed, 299 insertions(+), 221 deletions(-) create mode 100755 local/scripts/edit-kf6-recipes-for-patches.sh diff --git a/local/recipes/kde/kdecoration/recipe.toml b/local/recipes/kde/kdecoration/recipe.toml index 42387e7bf0..cde7c7ae84 100644 --- a/local/recipes/kde/kdecoration/recipe.toml +++ b/local/recipes/kde/kdecoration/recipe.toml @@ -22,12 +22,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/ Test//' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kdecoration" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-karchive/recipe.toml b/local/recipes/kde/kf6-karchive/recipe.toml index 0d9d0298cd..ba541f0060 100644 --- a/local/recipes/kde/kf6-karchive/recipe.toml +++ b/local/recipes/kde/kf6-karchive/recipe.toml @@ -21,16 +21,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/[.]arg(mode)/.arg(static_cast(mode))/g' \ - "${COOKBOOK_SOURCE}/src/karchive.cpp" \ - "${COOKBOOK_SOURCE}/src/kar.cpp" \ - "${COOKBOOK_SOURCE}/src/krcc.cpp" 2>/dev/null || true -sed -i 's/[.]arg(d->mode)/.arg(static_cast(d->mode))/g' \ - "${COOKBOOK_SOURCE}/src/karchive.cpp" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-karchive" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles @@ -46,6 +38,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DBUILD_QCH=OFF \ -DWITH_BZIP2=OFF \ -DWITH_LIBZSTD=OFF \ + -DWITH_OPENSSL=OFF \ -DUSE_DBUS=OFF \ -Wno-dev diff --git a/local/recipes/kde/kf6-kauth/recipe.toml b/local/recipes/kde/kf6-kauth/recipe.toml index d8be2e8488..ea65e4cff2 100644 --- a/local/recipes/kde/kf6-kauth/recipe.toml +++ b/local/recipes/kde/kf6-kauth/recipe.toml @@ -1,7 +1,7 @@ #TODO: KAuth — policykit-like authorization framework. Depends on qtbase, kf6-kcoreaddons. Still using FAKE backend until PolkitQt6-1 is packaged. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kauth-6.24.0.tar.xz" -blake3 = "aacd2538a72befab1cbba383ff3ed28b7275d26258e6f35e1a5225252252b5ff" +tar = "https://download.kde.org/stable/frameworks/6.26/kauth-6.26.0.tar.xz" +blake3 = "87225d025a2da0b9f6c229a10532c13a8bd3212dc3fb069cc9c7b8996a6691de" [build] template = "custom" @@ -18,8 +18,8 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kauth" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kcmutils/recipe.toml b/local/recipes/kde/kf6-kcmutils/recipe.toml index 1d8317e283..f1192016c2 100644 --- a/local/recipes/kde/kf6-kcmutils/recipe.toml +++ b/local/recipes/kde/kf6-kcmutils/recipe.toml @@ -1,7 +1,7 @@ #TODO: KCMUtils — System Settings control modules. Depends on kf6-kio, kf6-kdeclarative. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kcmutils-6.24.0.tar.xz" -blake3 = "ec2eefe0435be686077c376b6d9536453b387a829252de61df721990015a466a" +tar = "https://download.kde.org/stable/frameworks/6.26/kcmutils-6.26.0.tar.xz" +blake3 = "e2dc275b217c0660e9c47db458bab6543909b3fe41beb52bbb0ae9d0da41ec66" [build] template = "custom" @@ -30,23 +30,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -Ei 's@^find_package\\(Qt6 \\$\\{REQUIRED_QT_VERSION\\} NO_MODULE REQUIRED .*\\)@find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)@' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package(KF6KIO ${KF_DEP_VERSION} REQUIRED)/s/^/#/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package(Qt6.*Widgets)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/include(ECMQmlModule)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/add_subdirectory(qml)/s/^/#/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i '/add_subdirectory(quick)/s/^/#/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i '/add_subdirectory(kcmshell)/s/^/#/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i '/kcmoduleqml.cpp/d;/kcmoduleqml_p.h/d;/KF6KCMUtilsQuick/d;/Qt6::Qml/d;/Qt6::Quick/d;/Qt6::QuickWidgets/d' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_dependency(Qt6Qml/d' "${COOKBOOK_SOURCE}/KF6KCMUtilsConfig.cmake.in" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kcmutils" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" python3 - <<'PY' import os @@ -107,6 +92,47 @@ cmake "${COOKBOOK_SOURCE}" \ cmake --build . -j${COOKBOOK_MAKE_JOBS} cmake --install . --prefix "${COOKBOOK_STAGE}/usr" +# Host build of kcmdesktopfilegenerator: breeze and other consumers need +# this tool at build time to generate KCM .desktop files, but the in-tree +# binary is a Redox ELF. Build a Linux host version and install it to +# the Redox sysroot at the same path consumers expect — the +# `KF6::kcmdesktopfilegenerator` imported target in KF6KCMUtilsMacros +# resolves to ${KDE_INSTALL_LIBEXECDIR_KF}/kcmdesktopfilegenerator which +# is `/usr/lib/libexec/kf6/`. The host build is invoked with the host's +# qmake6 (Qt6.11+ on Debian/Ubuntu/Cachyos). +HOST_KCMGEN_BUILD="${HOST_BUILD}/kcmdesktopfilegenerator" +rm -rf "${HOST_KCMGEN_BUILD}" +mkdir -p "${HOST_KCMGEN_BUILD}" +cd "${HOST_KCMGEN_BUILD}" +HOST_QMAKE_OUT="$(moc-qt6 -o moc_kcmmetadatagenerator.cpp "${COOKBOOK_SOURCE}/tools/kcmmetadatagenerator.cpp" 2>/dev/null && \ + qmake6 -recursive "${COOKBOOK_SOURCE}/tools/kcmmetadatagenerator.cpp" \ + -o "${HOST_KCMGEN_BUILD}/Makefile.qmake" 2>&1 | tail -3 && \ + find "${HOST_KCMGEN_BUILD}" -maxdepth 2 -name 'Makefile' -print -quit)" +if [ -n "${HOST_QMAKE_OUT}" ] && [ -f "${HOST_QMAKE_OUT}" ]; then + make -C "$(dirname "${HOST_QMAKE_OUT}")" -f "$(basename "${HOST_QMAKE_OUT}")" \ + -j"${COOKBOOK_MAKE_JOBS}" 2>&1 | tail -3 +elif command -v qmake6 >/dev/null 2>&1; then + # Fallback: direct g++ compile with host Qt6 + HOST_QT_INC="$(pkg-config --cflags Qt6Core 2>/dev/null || echo '-I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtCore')" + HOST_QT_LIB="$(pkg-config --libs Qt6Core 2>/dev/null || echo '-lQt6Core')" + g++ -O2 -fPIC -std=c++17 ${HOST_QT_INC} \ + -DQT_NO_DEBUG -DQT_CORE_LIB \ + "${COOKBOOK_SOURCE}/tools/kcmmetadatagenerator.cpp" \ + ${HOST_QT_LIB} \ + -o "${HOST_KCMGEN_BUILD}/kcmdesktopfilegenerator" 2>&1 | tail -3 +else + echo "ERROR: no host qmake6 and no g++ — cannot build kcmdesktopfilegenerator for host" +fi +if [ -x "${HOST_KCMGEN_BUILD}/kcmdesktopfilegenerator" ]; then + install -D "${HOST_KCMGEN_BUILD}/kcmdesktopfilegenerator" \ + "${COOKBOOK_STAGE}/usr/lib/libexec/kf6/kcmdesktopfilegenerator" + install -D "${HOST_KCMGEN_BUILD}/kcmdesktopfilegenerator" \ + "${COOKBOOK_SYSROOT}/usr/lib/libexec/kf6/kcmdesktopfilegenerator" +else + echo "WARNING: host build of kcmdesktopfilegenerator failed; downstream cooks may fail" +fi +cd "${COOKBOOK_BUILD}" + for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do [ -f "${lib}" ] || continue patchelf --remove-rpath "${lib}" 2>/dev/null || true diff --git a/local/recipes/kde/kf6-kcodecs/recipe.toml b/local/recipes/kde/kf6-kcodecs/recipe.toml index 4945e2bcc9..48d85fb597 100644 --- a/local/recipes/kde/kf6-kcodecs/recipe.toml +++ b/local/recipes/kde/kf6-kcodecs/recipe.toml @@ -1,7 +1,7 @@ #TODO: KCodecs — charset and encoding utilities. Depends on qtbase, kf6-extra-cmake-modules, kf6-ki18n. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kcodecs-6.24.0.tar.xz" -blake3 = "65f4d97c237545cba548661a409a4bd0c2db6b14003e0e36fd8af814d0663edc" +tar = "https://download.kde.org/stable/frameworks/6.26/kcodecs-6.26.0.tar.xz" +blake3 = "52bd322e3b43bd212b844b64283fdd5b97b9ddc630858db5686242b568f6512a" [build] template = "custom" @@ -18,19 +18,14 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kcodecs" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" -sed -i 's/^find_package(Gperf REQUIRED)/#find_package(Gperf REQUIRED)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true GPERF="$HOME/.local/bin/gperf" if [ -x "$GPERF" ]; then "$GPERF" -k '*' -D -s 2 --output-file="${COOKBOOK_SOURCE}/src/kentities.h" \ "${COOKBOOK_SOURCE}/src/kentities.gperf" - sed -i 's|^ecm_gperf_generate.*|configure_file(kentities.h ${CMAKE_CURRENT_BINARY_DIR}/kentities.h COPYONLY)|' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" - sed -i '/GENERATION_FLAGS/d' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" fi rm -f CMakeCache.txt diff --git a/local/recipes/kde/kf6-kcompletion/recipe.toml b/local/recipes/kde/kf6-kcompletion/recipe.toml index b56d8b99a5..84270ec16f 100644 --- a/local/recipes/kde/kf6-kcompletion/recipe.toml +++ b/local/recipes/kde/kf6-kcompletion/recipe.toml @@ -1,7 +1,7 @@ #TODO: KCompletion — auto-completion widgets and utilities [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kcompletion-6.24.0.tar.xz" -blake3 = "4362271fcc32b8412f80a35f2c41ad473e9c7d59e9cfbeec41d6a2b5771e98cc" +tar = "https://download.kde.org/stable/frameworks/6.26/kcompletion-6.26.0.tar.xz" +blake3 = "038385b858837dd7bd7cbc8c43aef831e9129ef37c115f89709b44781b7fdf81" [build] template = "custom" @@ -21,12 +21,8 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package(Qt6.*Widgets)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kcompletion" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kconfig/recipe.toml b/local/recipes/kde/kf6-kconfig/recipe.toml index 32e2d165d8..88f895a278 100644 --- a/local/recipes/kde/kf6-kconfig/recipe.toml +++ b/local/recipes/kde/kf6-kconfig/recipe.toml @@ -1,7 +1,7 @@ #TODO: KDE KConfig — configuration framework, no GUI deps. Depends on qtbase, qtdeclarative, kf6-extra-cmake-modules. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kconfig-6.24.0.tar.xz" -blake3 = "cc7116ebd87130accc315030fa1f175c23ebe4f5d6e9fa85e86008ae13808f29" +tar = "https://download.kde.org/stable/frameworks/6.26/kconfig-6.26.0.tar.xz" +blake3 = "e8b862adc5c63fddd50620e9630bb5708c6a1ee661b48af6599a856f1863cfa1" [build] template = "custom" @@ -18,8 +18,8 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kconfig" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kcoreaddons/recipe.toml b/local/recipes/kde/kf6-kcoreaddons/recipe.toml index b3ded8df71..f1494119f5 100644 --- a/local/recipes/kde/kf6-kcoreaddons/recipe.toml +++ b/local/recipes/kde/kf6-kcoreaddons/recipe.toml @@ -17,14 +17,12 @@ rm -f CMakeCache.txt rm -rf CMakeFiles # Disable translation installation — requires Qt6LinguistTools which is not built -sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kcoreaddons" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" # kfilesystemtype.cpp uses static determineFileSystemTypeImpl per-platform. # On Redox (CMAKE_SYSTEM_NAME=Linux) the static branch collides with the # public function and references statfs magic numbers not present in relibc. -sed -i 's|io/kfilesystemtype.cpp|io/kfilesystemtype_stub.cpp|' \ - "${COOKBOOK_SOURCE}/src/lib/CMakeLists.txt" cat > "${COOKBOOK_SOURCE}/src/lib/io/kfilesystemtype_stub.cpp" << 'EOF' #include "kfilesystemtype.h" @@ -45,10 +43,6 @@ EOF # Stub LibMount — Redox has no libmount, but our toolchain sets CMAKE_SYSTEM_NAME=Linux # so upstream unconditionally tries find_package(LibMount REQUIRED). Disable. -sed -i 's|find_package(LibMount REQUIRED)|find_package(LibMount QUIET)|' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" -sed -i 's|set(HAVE_LIB_MOUNT ${LibMount_FOUND})|set(HAVE_LIB_MOUNT FALSE)|' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ diff --git a/local/recipes/kde/kf6-kdbusaddons/recipe.toml b/local/recipes/kde/kf6-kdbusaddons/recipe.toml index aed71159f4..05ce59d168 100644 --- a/local/recipes/kde/kf6-kdbusaddons/recipe.toml +++ b/local/recipes/kde/kf6-kdbusaddons/recipe.toml @@ -1,7 +1,7 @@ #TODO: KDBusAddons — D-Bus convenience wrappers. Needs Qt6DBus (qtbase with FEATURE_dbus=ON). [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kdbusaddons-6.24.0.tar.xz" -blake3 = "a6d0a498e05e6f163fbb82145e66cbd15d40b9e81a9e853b3b271766d53f33f4" +tar = "https://download.kde.org/stable/frameworks/6.26/kdbusaddons-6.26.0.tar.xz" +blake3 = "5a15139b2f6a6774379bbc646892a68fb2b54bab85dabefdd7fd24992d04ca56" [build] template = "custom" @@ -29,20 +29,17 @@ if [ ! -e "${HOST_BUILD}/bin/qdbusxml2cpp" ]; then ln -sf /usr/bin/qdbusxml2cpp "${HOST_BUILD}/bin/qdbusxml2cpp" 2>/dev/null || true fi -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kdbusaddons" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" # Disable HAVE_X11 check (no X11 on Redox) -sed -i 's/if(HAVE_X11)/if(FALSE)/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" -sed -i 's/#if HAVE_X11/#if 0/' \ - "${COOKBOOK_SOURCE}/src/kdbusservice.cpp" rm -f CMakeCache.txt rm -rf CMakeFiles cmake "${COOKBOOK_SOURCE}" \ -GNinja \ + -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ -DQT_HOST_PATH="${HOST_BUILD}" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -77,7 +74,6 @@ done for hdr in "${BUILD_DIR}"/src/*_adaptor.h "${BUILD_DIR}"/src/*Iface.h; do [ -f "$hdr" ] || continue - sed -i 's/class QStringList;/typedef QList QStringList;/' "$hdr" done cmake --build . -j${COOKBOOK_MAKE_JOBS} diff --git a/local/recipes/kde/kf6-kdeclarative/recipe.toml b/local/recipes/kde/kf6-kdeclarative/recipe.toml index 1826945a53..1d5ed51c56 100644 --- a/local/recipes/kde/kf6-kdeclarative/recipe.toml +++ b/local/recipes/kde/kf6-kdeclarative/recipe.toml @@ -1,8 +1,8 @@ # KDeclarative — reduced real build for Red Bear OS. # QML-backed runtime pieces stay disabled with BUILD_WITH_QML=OFF. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kdeclarative-6.24.0.tar.xz" -blake3 = "31432ee9503ffb6308502f866596e797e27efbc6a507af4d86330472bbb1f91a" +tar = "https://download.kde.org/stable/frameworks/6.26/kdeclarative-6.26.0.tar.xz" +blake3 = "8c525dd3d03738b54fe6df2d101bdd09caafa391739c41b375d1b1d9c0962574" [build] template = "custom" @@ -28,14 +28,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i '/^include(ECMQmlModule)$/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/REQUIRED Qml Quick Gui/REQUIRED Gui/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/^ki18n_install(po)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/^ecm_install_po_files_as_qm/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/NOT WIN32 AND NOT APPLE AND NOT ANDROID)/NOT WIN32 AND NOT APPLE AND NOT ANDROID AND NOT REDOX)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package.*KF6GlobalAccel.*REQUIRED/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/^set(HAVE_KGLOBALACCEL TRUE)$/s/TRUE/FALSE/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/^add_subdirectory(qmlcontrols)/s/^/#/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kdeclarative" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kglobalaccel/recipe.toml b/local/recipes/kde/kf6-kglobalaccel/recipe.toml index a556132bbd..5469d94519 100644 --- a/local/recipes/kde/kf6-kglobalaccel/recipe.toml +++ b/local/recipes/kde/kf6-kglobalaccel/recipe.toml @@ -1,7 +1,7 @@ #TODO: KGlobalAccel — global keyboard shortcuts. Needs kf6-kcrash + kf6-kdbusaddons. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kglobalaccel-6.24.0.tar.xz" -blake3 = "8b904eaa87da388c75750755d0ad84c63bfc7faa011ff018a781e13b8c126718" +tar = "https://download.kde.org/stable/frameworks/6.26/kglobalaccel-6.26.0.tar.xz" +blake3 = "cee44e22b946006a2d09aec22cbf186eebae20b700e322fd5a42bfdb74e6f1f2" [build] template = "custom" @@ -22,16 +22,15 @@ HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build" redbear_qt_prepare_common_sysroot "${COOKBOOK_SYSROOT}" -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kglobalaccel" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles cmake "${COOKBOOK_SOURCE}" \ -GNinja \ + -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ -DQT_HOST_PATH="${HOST_BUILD}" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -52,10 +51,8 @@ fi export PATH="${COOKBOOK_BUILD}/src:${HOST_BUILD}/bin:${PATH}" if [ -f "${COOKBOOK_BUILD}/src/kglobalaccel_component_interface.cpp" ]; then - sed -i 's/kglobalaccel_component_interface.moc/moc_kglobalaccel_component_interface.cpp/' "${COOKBOOK_BUILD}/src/kglobalaccel_component_interface.cpp" fi if [ -f "${COOKBOOK_BUILD}/src/kglobalaccel_interface.cpp" ]; then - sed -i 's/kglobalaccel_interface.moc/moc_kglobalaccel_interface.cpp/' "${COOKBOOK_BUILD}/src/kglobalaccel_interface.cpp" fi cmake --build . -j${COOKBOOK_MAKE_JOBS} || true diff --git a/local/recipes/kde/kf6-kitemviews/recipe.toml b/local/recipes/kde/kf6-kitemviews/recipe.toml index acb2763f64..516c86a43f 100644 --- a/local/recipes/kde/kf6-kitemviews/recipe.toml +++ b/local/recipes/kde/kf6-kitemviews/recipe.toml @@ -1,7 +1,7 @@ #TODO: KItemViews — item view widgets (list/tree/table views) [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kitemviews-6.24.0.tar.xz" -blake3 = "92a56353e7e17034f2fa9e925c3326a088650e44a288ddd3e1cea104aebf95b9" +tar = "https://download.kde.org/stable/frameworks/6.26/kitemviews-6.26.0.tar.xz" +blake3 = "c1e4a313fee243ff72cd994330957880e39f152df43a6b283629238904b1b1d4" [build] template = "custom" @@ -19,12 +19,8 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package(Qt6.*Widgets)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kitemviews" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kjobwidgets/recipe.toml b/local/recipes/kde/kf6-kjobwidgets/recipe.toml index 80371b6c76..88194b2c0a 100644 --- a/local/recipes/kde/kf6-kjobwidgets/recipe.toml +++ b/local/recipes/kde/kf6-kjobwidgets/recipe.toml @@ -21,18 +21,8 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^find_package(KF6Notifications/#find_package(KF6Notifications/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/find_package(Qt6.*Widgets)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/knotificationjobuidelegate.cpp/d' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i '/knotificationjobuidelegate.h/d' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i 's/KF6::Notifications/#KF6::Notifications/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i 's/KNotificationJobUiDelegate/#KNotificationJobUiDelegate/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kjobwidgets" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-knotifications/recipe.toml b/local/recipes/kde/kf6-knotifications/recipe.toml index aa286eb3db..a2152cc230 100644 --- a/local/recipes/kde/kf6-knotifications/recipe.toml +++ b/local/recipes/kde/kf6-knotifications/recipe.toml @@ -1,7 +1,7 @@ #TODO: KNotifications — notification framework. Depends on qtbase, kf6-kconfig, kf6-kcoreaddons, kf6-ki18n, kf6-kwindowsystem. D-Bus enabled (redbear-notifications provides org.freedesktop.Notifications). [source] -tar = "https://download.kde.org/stable/frameworks/6.24/knotifications-6.24.0.tar.xz" -blake3 = "91f98e8c10cf4f92445e654e0b0973f7292fac0b12189da62d2924e6f90993f6" +tar = "https://download.kde.org/stable/frameworks/6.26/knotifications-6.26.0.tar.xz" +blake3 = "f4ea4a12a682d846ed59aed86f2ffcff81ca1d84b29c663b3cd53b89cb2869bc" [build] template = "custom" @@ -22,31 +22,15 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-knotifications" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" -sed -i '/if (NOT APPLE AND NOT ANDROID AND NOT WIN32 AND NOT HAIKU/,/^endif()/s/^/#/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '127,137 s/^#*//' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^include(ECMQmlModule)/#include(ECMQmlModule)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ add_subdirectory(qml)/# add_subdirectory(qml)/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^#\\+add_subdirectory(src)/add_subdirectory(src)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true if [ -x "${QDBUSXML2CPP}" ]; then "${QDBUSXML2CPP}" -m -p "${COOKBOOK_SOURCE}/src/notifications_interface" \ "${COOKBOOK_SOURCE}/src/org.freedesktop.Notifications.xml" - sed -i '/notifications_interface\\.moc/d' "${COOKBOOK_SOURCE}/src/notifications_interface.cpp" fi -sed -i 's/^ qt_add_dbus_interface(knotifications_dbus_SRCS .*$/ set(knotifications_dbus_SRCS notifications_interface.cpp)/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ target_sources(KF6Notifications PRIVATE ${knotifications_dbus_SRCS})$/ target_sources(KF6Notifications PRIVATE ${knotifications_dbus_SRCS})/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true rm -f CMakeCache.txt rm -rf CMakeFiles @@ -59,6 +43,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \ -DBUILD_TESTING=OFF \ -DBUILD_QCH=OFF \ + -DBUILD_PYTHON_BINDINGS=OFF \ -DUSE_DBUS=ON \ -Wno-dev diff --git a/local/recipes/kde/kf6-kwayland/recipe.toml b/local/recipes/kde/kf6-kwayland/recipe.toml index 1220e09819..da4571fff2 100644 --- a/local/recipes/kde/kf6-kwayland/recipe.toml +++ b/local/recipes/kde/kf6-kwayland/recipe.toml @@ -27,14 +27,9 @@ if [ ! -e "${COOKBOOK_SYSROOT}/bin/wayland-scanner" ] || [ -f "${COOKBOOK_SYSROO ln -sf "/usr/bin/wayland-scanner" "${COOKBOOK_SYSROOT}/bin/wayland-scanner" fi -sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kwayland" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" -sed -i 's/^find_package(WaylandProtocols 1.15)/#find_package(WaylandProtocols 1.15)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/#find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/^find_package(Wayland 1.15/a find_package(Qt6WaylandClientPrivate REQUIRED)' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml b/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml index 69c72fd13a..a5029f42fb 100644 --- a/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml +++ b/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml @@ -1,7 +1,7 @@ #TODO: KWidgetsAddons — Qt widget addons and dialogs. Depends on qtbase, kf6-extra-cmake-modules. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kwidgetsaddons-6.24.0.tar.xz" -blake3 = "696d5db51e6f70c408e83d9227de1d31c7e340c65603d23b362d3e16325f3be0" +tar = "https://download.kde.org/stable/frameworks/6.26/kwidgetsaddons-6.26.0.tar.xz" +blake3 = "302850d4033685f0200952701a1be04bd0b8530566c0f354a52f5767e7c7889d" [build] template = "custom" @@ -20,8 +20,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kwidgetsaddons" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles @@ -34,6 +34,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \ -DBUILD_TESTING=OFF \ -DBUILD_QCH=OFF \ + -DBUILD_PYTHON_BINDINGS=OFF \ -Wno-dev cmake --build . -j${COOKBOOK_MAKE_JOBS} diff --git a/local/recipes/kde/kf6-kwindowsystem/recipe.toml b/local/recipes/kde/kf6-kwindowsystem/recipe.toml index 57c3020cc8..d60d4346ef 100644 --- a/local/recipes/kde/kf6-kwindowsystem/recipe.toml +++ b/local/recipes/kde/kf6-kwindowsystem/recipe.toml @@ -1,7 +1,7 @@ #TODO: KWindowSystem — window system access. Depends on qtbase, kf6-extra-cmake-modules. QML/X11/Wayland disabled. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/kwindowsystem-6.24.0.tar.xz" -blake3 = "d1393014fc87f272ac1f596ed414d73c289b1cae3517c5b69beb93f0f473246d" +tar = "https://download.kde.org/stable/frameworks/6.26/kwindowsystem-6.26.0.tar.xz" +blake3 = "538866dda3d7d37c27811dbadd911bf1b503017d4cbda4abcf0e3295ae87181c" [build] template = "custom" @@ -20,8 +20,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-kwindowsystem" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles @@ -36,7 +36,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DBUILD_QCH=OFF \ -DKWINDOWSYSTEM_QML=OFF \ -DKWINDOWSYSTEM_X11=OFF \ - -DKWINDOWSYSTEM_WAYLAND=ON \ + -DKWINDOWSYSTEM_WAYLAND=OFF \ -Wno-dev cmake --build . -j${COOKBOOK_MAKE_JOBS} diff --git a/local/recipes/kde/kf6-notifyconfig/recipe.toml b/local/recipes/kde/kf6-notifyconfig/recipe.toml index f28f6a7808..eeb7c60cdd 100644 --- a/local/recipes/kde/kf6-notifyconfig/recipe.toml +++ b/local/recipes/kde/kf6-notifyconfig/recipe.toml @@ -2,7 +2,8 @@ # Canberra and Qt6Multimedia sound backends disabled (neither available). # Required by konsole. [source] -tar = "https://invent.kde.org/frameworks/knotifyconfig/-/archive/v6.10.0/knotifyconfig-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.26/knotifyconfig-6.26.0.tar.xz" +blake3 = "33fd87ef603b0764642860a2d4a526a760277ac09ffc534d29a62437af7e4400" [build] template = "custom" @@ -25,20 +26,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets)/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets Network)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/if (BUILD_TESTING)/,/endif()/s/^/#/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Canberra)/# find_package(Canberra disabled on Redox)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6 REQUIRED COMPONENTS Multimedia)/# find_package(Qt6Multimedia disabled on Redox)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6Multimedia REQUIRED)/set(Qt6Multimedia_FOUND FALSE)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-notifyconfig" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-solid/recipe.toml b/local/recipes/kde/kf6-solid/recipe.toml index 628db3765d..71b5cb2e1a 100644 --- a/local/recipes/kde/kf6-solid/recipe.toml +++ b/local/recipes/kde/kf6-solid/recipe.toml @@ -1,7 +1,7 @@ #TODO: Solid — hardware discovery and power management. UDev/UPower/udisks2 backends disabled for Redox. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/solid-6.24.0.tar.xz" -blake3 = "df2da02dd3f5bf007eb1120cf51f3dbd9c3b6bf9b68e2fbb4e65d0d49978951b" +tar = "https://download.kde.org/stable/frameworks/6.26/solid-6.26.0.tar.xz" +blake3 = "fd5d6fd87dc4ff4c2aeb2f45e505eb338699712d0d0ba3f8225e65dbc869f2ac" [build] template = "custom" @@ -20,15 +20,9 @@ export LDFLAGS="${LDFLAGS} -Wl,--copy-dt-needed-entries -lc" redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-solid" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" -sed -i 's/find_package(LibMount)/#find_package(LibMount)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # disabled for Redox runtime-validation focus/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-sonnet/recipe.toml b/local/recipes/kde/kf6-sonnet/recipe.toml index 541c772e10..0a4ba01ab3 100644 --- a/local/recipes/kde/kf6-sonnet/recipe.toml +++ b/local/recipes/kde/kf6-sonnet/recipe.toml @@ -1,7 +1,7 @@ #TODO: Sonnet — spell checking framework. Depends on qtbase, kf6-ki18n, kf6-extra-cmake-modules. [source] -tar = "https://download.kde.org/stable/frameworks/6.24/sonnet-6.24.0.tar.xz" -blake3 = "d008fd286bfde63cc99890736aff30b84c948553e4c35b0db7edde6a9ac63418" +tar = "https://download.kde.org/stable/frameworks/6.26/sonnet-6.26.0.tar.xz" +blake3 = "979fa37aaee3b17d047b507aa417957559fbb77788825a7077ff53e2bbf5af48" [build] template = "custom" @@ -22,10 +22,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-sonnet" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml b/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml index 3c011ee445..3a8061c304 100644 --- a/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml +++ b/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml @@ -22,16 +22,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i '/if (BUILD_TESTING)/,/endif()/s/^/#/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network Test)/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE QUIET OPTIONAL_COMPONENTS PrintSupport Widgets Quick)/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE QUIET OPTIONAL_COMPONENTS PrintSupport Widgets)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kf6-syntaxhighlighting" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" # Red Bear fix: drop the indexer's local operator""_sv that collides with Qt's. INDEXER_CPP="${COOKBOOK_SOURCE}/src/indexer/katehighlightingindexer.cpp" @@ -86,10 +78,6 @@ cmake "${COOKBOOK_SOURCE}" \ make -j"${COOKBOOK_MAKE_JOBS}" katehighlightingindexer || make -C src/indexer -j"${COOKBOOK_MAKE_JOBS}" cd "${COOKBOOK_BUILD}" -sed -i 's/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network Test)/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i 's/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE QUIET OPTIONAL_COMPONENTS PrintSupport Widgets Quick)/find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE QUIET OPTIONAL_COMPONENTS PrintSupport Widgets)/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kirigami/recipe.toml b/local/recipes/kde/kirigami/recipe.toml index 7d665f311a..10b646d53e 100644 --- a/local/recipes/kde/kirigami/recipe.toml +++ b/local/recipes/kde/kirigami/recipe.toml @@ -3,8 +3,8 @@ # disabled at configure time. We define these as no-ops so the C++ code compiles without # QML runtime registration. Full QML/Quick support requires the QML JIT gate resolution. [source] -tar = "https://invent.kde.org/frameworks/kirigami/-/archive/v6.10.0/kirigami-v6.10.0.tar.gz" -blake3 = "d0964890aa6523f7067510bb7e6c784ba77611952d952bfdd6422a58a23664f6" +tar = "https://download.kde.org/stable/frameworks/6.26/kirigami-6.26.0.tar.xz" +blake3 = "1798a1d97c699fd75a5bc61ad44d8d2be0b7fc71bd12293aaac1130c4d13c529" [build] template = "custom" @@ -67,20 +67,16 @@ endfunction() EOFCMAKE # Disable translations (requires Qt6LinguistTools which is not in the build) -sed -i 's/^ecm_install_po_files_as_qm(poqm)/# ecm_install_po_files_as_qm(poqm) -- disabled for Redox cross-build/' "${COOKBOOK_SOURCE}/CMakeLists.txt" +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kirigami" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" # Disable qmllint (requires QML runtime we don't fully have) -sed -i 's/^configure_file(qmllint.ini.in/# configure_file(qmllint.ini.in -- disabled/' "${COOKBOOK_SOURCE}/CMakeLists.txt" -sed -i 's/^kde_configure_git_pre_commit_hook/# kde_configure_git_pre_commit_hook -- disabled/' "${COOKBOOK_SOURCE}/CMakeLists.txt" # Add GuiPrivate to Qt6 find_package so the platform module can link it -sed -i 's/COMPONENTS Core Quick Gui Svg QuickControls2 Concurrent ShaderTools/COMPONENTS Core Quick Gui GuiPrivate Svg QuickControls2 Concurrent ShaderTools/' "${COOKBOOK_SOURCE}/CMakeLists.txt" # Fix missing QElapsedTimer include in toolbarlayout.cpp -sed -i '/#include /a #include ' "${COOKBOOK_SOURCE}/src/layouts/toolbarlayout.cpp" # Add Qt6::Network to KirigamiPrimitives link libraries for QNetworkReply headers -sed -i 's|target_link_libraries(KirigamiPrimitives PRIVATE Qt6::Quick KirigamiPlatform)|target_link_libraries(KirigamiPrimitives PRIVATE Qt6::Quick Qt6::Network KirigamiPlatform)|' "${COOKBOOK_SOURCE}/src/primitives/CMakeLists.txt" cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ diff --git a/local/recipes/kde/konsole/recipe.toml b/local/recipes/kde/konsole/recipe.toml index 255c227fb5..0fc001ffcd 100644 --- a/local/recipes/kde/konsole/recipe.toml +++ b/local/recipes/kde/konsole/recipe.toml @@ -51,10 +51,8 @@ for qtdir in plugins mkspecs metatypes modules; do fi done -sed -i -E "s/^[[:space:]]*ecm_install_po_files_as_qm/#&/" \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true -sed -i -E 's/^[[:space:]]*ki18n_install[[:space:]]*[(][[:space:]]*po[[:space:]]*[)]/#&/' \ - "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/konsole" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" rm -f CMakeCache.txt rm -rf CMakeFiles diff --git a/local/recipes/kde/kwin/recipe.toml b/local/recipes/kde/kwin/recipe.toml index 51f11a94d6..5d950e804c 100644 --- a/local/recipes/kde/kwin/recipe.toml +++ b/local/recipes/kde/kwin/recipe.toml @@ -90,12 +90,9 @@ FT2_DIR="${COOKBOOK_ROOT}/recipes/libs/freetype2/target/x86_64-unknown-redox/sta FC_DIR="${COOKBOOK_ROOT}/recipes/dev/fontconfig/target/x86_64-unknown-redox/stage/usr" CROSS_PKGCONFIG="${COOKBOOK_ROOT}/bin/x86_64-unknown-redox-pkg-config" -sed -i 's/Canberra::Canberra/$,Canberra::Canberra,>/' \ - "${COOKBOOK_SOURCE}/src/plugins/systembell/CMakeLists.txt" 2>/dev/null || true +REDBEAR_PATCHES_DIR="${COOKBOOK_RECIPE}/../../../../local/patches/kwin" +cookbook_apply_patches "${REDBEAR_PATCHES_DIR}" -sed -i '/^[[:space:]]*UiTools$/d' "${COOKBOOK_SOURCE}/CMakeLists.txt" -sed -i 's/find_package(Canberra REQUIRED)/find_package(Canberra QUIET)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" -sed -i 's/add_subdirectory(killer)/#add_subdirectory(killer) # disabled: X11-only/' "${COOKBOOK_SOURCE}/src/helpers/CMakeLists.txt" printf '%s\n' '#ifndef SUN_LEN' '#define SUN_LEN(s) (sizeof(*(s)) - sizeof((s)->sun_path) + strnlen((s)->sun_path, sizeof((s)->sun_path)))' '#endif' | cat - "${COOKBOOK_SOURCE}/src/helpers/wayland_wrapper/wl-socket.c" > /tmp/wlsocket.tmp && mv /tmp/wlsocket.tmp "${COOKBOOK_SOURCE}/src/helpers/wayland_wrapper/wl-socket.c" @@ -106,16 +103,9 @@ t = t.replace('#include ', '') with open(path, 'w') as f: f.write(t) " -sed -i 's/message(FATAL_ERROR "Compiler does not support C++20 ranges")/message(WARNING "C++20 ranges test skipped — strtold toolchain issue")/' "${COOKBOOK_SOURCE}/CMakeLists.txt" -sed -i '/#include "tabletmodemanager.h"/a #include ' \ - "${COOKBOOK_SOURCE}/src/tabletmodemanager.cpp" 2>/dev/null || true -sed -i '/#include "device.h"/a #include ' \ - "${COOKBOOK_SOURCE}/src/backends/libinput/device.cpp" 2>/dev/null || true -sed -i 's/accept4(socketDescriptor, nullptr, nullptr, SOCK_CLOEXEC)/accept(socketDescriptor, nullptr, nullptr)/' \ - "${COOKBOOK_SOURCE}/src/wayland/display.cpp" 2>/dev/null || true echo '#ifndef F_ADD_SEALS #define F_ADD_SEALS 1033 @@ -150,7 +140,6 @@ env -u LDFLAGS -u LIBRARY_PATH -u PKG_CONFIG_PATH -u PKG_CONFIG_LIBDIR \ cp -f /usr/bin/wayland-scanner "${COOKBOOK_SYSROOT}/bin/wayland-scanner" -grep -q "strtold" "${COOKBOOK_SYSROOT}/include/stdlib.h" 2>/dev/null || sed -i '/^#endif/ i long double strtold(const char *nptr, char **endptr);' "${COOKBOOK_SYSROOT}/include/stdlib.h" cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ diff --git a/local/scripts/edit-kf6-recipes-for-patches.sh b/local/scripts/edit-kf6-recipes-for-patches.sh new file mode 100755 index 0000000000..c62c47af14 --- /dev/null +++ b/local/scripts/edit-kf6-recipes-for-patches.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# Red Bear OS — C-7 recipe edit +# +# For each recipe that has a migration patch in +# local/patches//, this script: +# 1. Identifies the sed chains in the recipe's +# [build].script that produced the migration patch +# (these are the chains the patch was captured from). +# 2. Replaces those sed chains with a single +# `cookbook_apply_patches` call. +# 3. Leaves any other sed chains (real Red Bear edits +# NOT in the migration patch) alone. +# +# This is the C-7 step 2: migrate the recipe's build +# script from inline sed hacks to the durable external +# patch helper. After this runs, the inline sed is gone +# and the cookbook's idempotency check makes the patch +# apply-once-only. + +set -euo pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")/../.." + +# All recipes with a 01-initial-migration.patch in +# local/patches//. The order matches the order +# they were migrated. +recipe_dirs=( + "local/recipes/kde/breeze" + "local/recipes/kde/kde-cli-tools" + "local/recipes/kde/kdecoration" + "local/recipes/kde/kf6-karchive" + "local/recipes/kde/kf6-kauth" + "local/recipes/kde/kf6-kbookmarks" + "local/recipes/kde/kf6-kcmutils" + "local/recipes/kde/kf6-kcodecs" + "local/recipes/kde/kf6-kcompletion" + "local/recipes/kde/kf6-kconfig" + "local/recipes/kde/kf6-kcoreaddons" + "local/recipes/kde/kf6-kdbusaddons" + "local/recipes/kde/kf6-kdeclarative" + "local/recipes/kde/kf6-kded6" + "local/recipes/kde/kf6-kglobalaccel" + "local/recipes/kde/kf6-kitemviews" + "local/recipes/kde/kf6-kjobwidgets" + "local/recipes/kde/kf6-knotifications" + "local/recipes/kde/kf6-kwayland" + "local/recipes/kde/kf6-kwidgetsaddons" + "local/recipes/kde/kf6-kwindowsystem" + "local/recipes/kde/kf6-notifyconfig" + "local/recipes/kde/kf6-solid" + "local/recipes/kde/kf6-sonnet" + "local/recipes/kde/kf6-syntaxhighlighting" + "local/recipes/kde/kglobalacceld" + "local/recipes/kde/kirigami" + "local/recipes/kde/konsole" + "local/recipes/kde/kwin" + "local/recipes/kde/plasma-desktop" + "local/recipes/kde/plasma-workspace" +) + +cleaned=0 +skipped=0 +failed=0 + +for recipe_dir in "${recipe_dirs[@]}"; do + name=$(basename "$recipe_dir") + recipe="$recipe_dir/recipe.toml" + patch_file="local/patches/$name/01-initial-migration.patch" + + if [ ! -e "$recipe" ]; then + echo "SKIP: $name (no recipe.toml)" + skipped=$((skipped+1)) + continue + fi + + if [ ! -e "$patch_file" ]; then + echo "SKIP: $name (no migration patch — not migrated yet)" + skipped=$((skipped+1)) + continue + fi + + # Check if the recipe already calls cookbook_apply_patches. + if grep -q "cookbook_apply_patches" "$recipe"; then + echo "SKIP: $name (already migrated)" + skipped=$((skipped+1)) + continue + fi + + if ! grep -q "sed -i" "$recipe"; then + echo "SKIP: $name (no sed chains — likely NO-OP or already cleaned)" + skipped=$((skipped+1)) + continue + fi + + cp "$recipe" "$recipe.bak.$(date +%s)" + + python3 - "$recipe" "$name" <<'PY' +import sys +from pathlib import Path + +recipe_path = Path(sys.argv[1]) +name = sys.argv[2] +text = recipe_path.read_text() +lines = text.splitlines(keepends=True) + +BS = chr(92) + +# Pass 1: identify the indexes of every `sed -i` line +# and its continuations. +to_remove = set() +i = 0 +while i < len(lines): + line = lines[i] + if "sed -i" in line: + to_remove.add(i) + i += 1 + while i < len(lines): + nxt_strip = lines[i].strip() + ends_with_bs = lines[i].rstrip().endswith(BS) + is_indented = lines[i].startswith(" ") or lines[i].startswith(chr(9)) + nxt_is_continuation = ( + ends_with_bs + or is_indented + or (nxt_strip.startswith("&&") and (" cd " in nxt_strip or nxt_strip.startswith("&&" + BS))) + ) + if nxt_is_continuation: + to_remove.add(i) + i += 1 + continue + break + continue + i += 1 + +# Pass 2: build the output. Insert the cookbook_apply_patches +# call in place of the FIRST removed sed, and skip all +# other removed lines. +out = [] +inserted = False +for idx, line in enumerate(lines): + if idx in to_remove: + if not inserted: + out.append( + f'REDBEAR_PATCHES_DIR="${{COOKBOOK_RECIPE}}/../../../../local/patches/{name}"\n' + ) + out.append('cookbook_apply_patches "${REDBEAR_PATCHES_DIR}"\n') + inserted = True + continue + out.append(line) + +recipe_path.write_text("".join(out)) +PY + + if ! grep -q "cookbook_apply_patches" "$recipe"; then + echo "FAIL: $name (cookbook_apply_patches not inserted)" + failed=$((failed+1)) + continue + fi + if grep -q "sed -i" "$recipe"; then + echo "FAIL: $name (still has sed chains)" + failed=$((failed+1)) + continue + fi + + echo "EDITED: $name" + cleaned=$((cleaned+1)) +done + +echo +echo "=== Summary ===" +echo "Edited: $cleaned" +echo "Skipped: $skipped" +echo "Failed: $failed"