Files
RedBear-OS/local/recipes/kde/kf6-kpackage/recipe.toml
T
vasilito 86a80b2f12 C-7 cleanup: remove dead sed chains from 24 NO-OP KF6 recipes
24 KF6 recipes had inline `sed -i` chains in their [build].script
that targeted `ecm_install_po_files_as_qm(poqm)` in CMakeLists.txt.
Upstream KDE Frameworks 6.26.0 has dropped the call entirely for
packages that no longer ship translations — the sed chains were
no-ops. Per the v6.0 zero-tolerance policy for sed hacks and dead
code, this commit removes the chains rather than leaving them as
workaround cruft.

Recipes cleaned (24):
  kf6-attica, kf6-kcolorscheme, kf6-kconfigwidgets, kf6-kcrash,
  kf6-kguiaddons, kf6-ki18n, kf6-kiconthemes, kf6-kidletime,
  kf6-kimageformats, kf6-kio, kf6-kitemmodels, kf6-knewstuff,
  kf6-kpackage, kf6-kservice, kf6-ksvg, kf6-ktexteditor,
  kf6-ktextwidgets, kf6-kwallet, kf6-kxmlgui, kf6-parts,
  kf6-plasma-activities, kf6-prison, kf6-pty, plasma-framework

Each recipe lost 1-17 sed lines (5-line multi-line `sed -i ... \    file` continuations correctly consumed). All 24 recipes
still parse as valid TOML.

Helper: `local/scripts/cleanup-kf6-noop-seds.sh` (new). Walks
the NO-OP list, makes a timestamped backup, removes the sed
chain + any orphan `\\` continuation + any orphan `&& cd`
continuation, verifies zero sed lines remain. Idempotent.

The 15 HAS-LINE recipes (kf6-kauth, kf6-kbookmarks,
kf6-kcodecs, kf6-kcompletion, kf6-kconfig, kf6-kcoreaddons,
kf6-kdbusaddons, kf6-kglobalaccel, kf6-kitemviews,
kf6-kjobwidgets, kf6-knotifications, kf6-kwidgetsaddons,
kf6-solid, kf6-sonnet, kf6-syntaxhighlighting) still have
their sed chains in place and will be migrated to external
patches via `migrate-kf6-seds-to-patches.sh` in a
follow-up. The 2 git-sourced recipes (breeze, kirigami, …)
will be handled once their source is fetched and the
line-presence check can run.
2026-06-12 18:09:05 +03:00

97 lines
3.7 KiB
TOML

#TODO: KPackage — package framework, theme/plugin/installer management. Needs kf6-kservice.
[source]
tar = "https://download.kde.org/stable/frameworks/6.26/kpackage-6.26.0.tar.xz"
blake3 = "b5b5a01adfbe9e806dc72e4d7921eafd25fe684693fc29f3fe1381a64b81b3df"
[build]
template = "custom"
dependencies = [
"qtbase",
"kf6-extra-cmake-modules",
"kf6-kcoreaddons",
"kf6-ki18n",
"kf6-kconfig",
"kf6-kservice",
"kf6-karchive",
]
script = """
DYNAMIC_INIT
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
rm -f CMakeCache.txt
rm -rf CMakeFiles
export LDFLAGS="${LDFLAGS} -llzma -Wl,--copy-dt-needed-entries -Wl,--allow-shlib-undefined"
SYSROOT="${COOKBOOK_SYSROOT}"
mkdir -p "${SYSROOT}/lib"
if [ -f "${SYSROOT}/usr/lib/liblzma.a" ] && [ ! -f "${SYSROOT}/lib/liblzma.so.5" ]; then
# xz recipe only ships liblzma.a; build a shared object from it so that
# libKF6Archive.so's NEEDED liblzma.so.5 can be resolved at link time.
x86_64-unknown-redox-gcc -shared -Wl,-soname,liblzma.so.5 \
-o "${SYSROOT}/lib/liblzma.so.5" \
"${SYSROOT}/usr/lib/liblzma.a" 2>/dev/null || true
cp -f "${SYSROOT}/usr/lib/liblzma.a" "${SYSROOT}/lib/liblzma.a" 2>/dev/null || true
fi
if [ -f "${SYSROOT}/usr/lib/liblzma.so" ]; then
cp -f "${SYSROOT}/usr/lib/liblzma.so.5" "${SYSROOT}/lib/liblzma.so.5" 2>/dev/null || true
cp -f "${SYSROOT}/usr/lib/liblzma.so" "${SYSROOT}/lib/liblzma.so" 2>/dev/null || true
cp -f "${SYSROOT}/usr/lib/liblzma.so.5.2.13" "${SYSROOT}/lib/liblzma.so.5.2.13" 2>/dev/null || true
fi
cmake "${COOKBOOK_SOURCE}" \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DQT_HOST_PATH="${HOST_BUILD}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
-DCMAKE_EXE_LINKER_FLAGS="-L${SYSROOT}/usr/lib -Wl,-rpath-link,${SYSROOT}/usr/lib -llzma -Wl,--copy-dt-needed-entries -Wl,--allow-shlib-undefined" \
-DCMAKE_SHARED_LINKER_FLAGS="-L${SYSROOT}/usr/lib -Wl,-rpath-link,${SYSROOT}/usr/lib -Wl,--copy-dt-needed-entries -Wl,--allow-shlib-undefined" \
-DBUILD_TESTING=OFF \
-DBUILD_QCH=OFF \
-DBUILD_WITH_QML=OFF \
-Wno-dev
cmake --build . -j${COOKBOOK_MAKE_JOBS}
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
PACKAGE_CMAKE="${COOKBOOK_STAGE}/usr/lib/cmake/KF6Package/KF6PackageConfig.cmake"
if [ -f "${PACKAGE_CMAKE}" ]; then
python3 - <<'PY' "${PACKAGE_CMAKE}"
from pathlib import Path
import sys
path = Path(sys.argv[1])
text = path.read_text()
old = '''if (CMAKE_CROSSCOMPILING AND KF6_HOST_TOOLING)
find_file(KPACKAGE_TARGETSFILE KF6Package/KF6PackageToolsTargets.cmake PATHS ${KF6_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
include("${KPACKAGE_TARGETSFILE}")
else()
include("${CMAKE_CURRENT_LIST_DIR}/KF6PackageToolsTargets.cmake")
endif()'''
new = '''if (CMAKE_CROSSCOMPILING AND KF6_HOST_TOOLING)
find_file(KPACKAGE_TARGETSFILE KF6Package/KF6PackageToolsTargets.cmake PATHS ${KF6_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
if(KPACKAGE_TARGETSFILE)
include("${KPACKAGE_TARGETSFILE}")
elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/KF6PackageToolsTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/KF6PackageToolsTargets.cmake")
endif()
else()
include("${CMAKE_CURRENT_LIST_DIR}/KF6PackageToolsTargets.cmake")
endif()'''
if old in text:
path.write_text(text.replace(old, new))
PY
fi
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do
[ -f "${lib}" ] || continue
patchelf --remove-rpath "${lib}" 2>/dev/null || true
done
"""