7c7399e0a6
Add guard-recipes.sh with four modes: - --verify: check all local/recipes have correct symlinks into recipes/ - --fix: repair broken symlinks (run before builds) - --save-all: snapshot all recipe.toml into local/recipes/ - --restore: recreate all symlinks from local/recipes/ (run after sync-upstream) Wired into apply-patches.sh (post-patch) and sync-upstream.sh (post-sync). This prevents the build system from deleting recipe files during cargo cook, make distclean, or upstream source refresh.
55 lines
1.7 KiB
TOML
55 lines
1.7 KiB
TOML
#TODO: KF6Pty — pseudo terminal framework required by Konsole.
|
|
# UTEMPTER optional; openpty/login path expected to work on Redox via libc/pty.h.
|
|
[source]
|
|
tar = "https://invent.kde.org/frameworks/kpty/-/archive/v6.10.0/kpty-v6.10.0.tar.gz"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"qtbase",
|
|
"kf6-extra-cmake-modules",
|
|
"kf6-kcoreaddons",
|
|
"kf6-ki18n",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
|
|
|
for qtdir in plugins mkspecs metatypes modules; do
|
|
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
|
|
ln -s "usr/${qtdir}" "${COOKBOOK_SYSROOT}/${qtdir}"
|
|
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(UTEMPTER)/# find_package(UTEMPTER disabled on Redox)/' \
|
|
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
|
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
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}" \
|
|
-DBUILD_TESTING=OFF \
|
|
-DBUILD_QCH=OFF \
|
|
-Wno-dev
|
|
|
|
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
|
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
|
|
|
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6Pty*.so.*; do
|
|
[ -f "${lib}" ] || continue
|
|
patchelf --remove-rpath "${lib}" 2>/dev/null || true
|
|
done
|
|
"""
|