Files
RedBear-OS/local/recipes/kde/kwin/recipe.toml
T
vasilito 9bb9044843 fix: KWin recipe — zero stub references remain
Removed all stub fallback blocks, redbear-compositor delegation,
config stub generation, KWin stub header text.
Wrapper now execs /usr/bin/kwin_wayland directly.
Configure/build failures exit 1 (hard fail, no silent stub install).
2026-04-29 16:01:51 +01:00

92 lines
2.6 KiB
TOML

# KWin Wayland compositor — real cmake build attempt with reduced feature set.
# DRM backend → scheme:drm, libinput → via evdevd, session → seatd.
# Full build requires Qt6Quick/QML (qtdeclarative exports metadata but downstream QML insufficient).
# Requires real cmake configure + build; recipe fails hard if configure/build fails.
[source]
tar = "https://invent.kde.org/plasma/kwin/-/archive/v6.3.4/kwin-v6.3.4.tar.gz"
blake3 = "2aa1e234a75b0aa94f0da3a74d93e2a8e49b30a3afb12dc24b2ecd3abaa94e7f"
[build]
template = "custom"
dependencies = [
"qtbase",
"kf6-extra-cmake-modules",
"kf6-kcoreaddons",
"kf6-kconfig",
"kf6-kwindowsystem",
"kf6-kglobalaccel",
]
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
STAGE="${COOKBOOK_STAGE}/usr"
mkdir -p "${STAGE}/bin"
# kwin_wayland_wrapper — launches the real KWin compositor
cat > "${STAGE}/bin/kwin_wayland_wrapper" << 'EOFBIN'
#!/bin/sh
RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp/run/redbear-greeter}"
mkdir -p "$RUNTIME_DIR"
export XDG_RUNTIME_DIR="${RUNTIME_DIR}"
exec /usr/bin/kwin_wayland "$@"
EOFBIN
chmod +x "${STAGE}/bin/kwin_wayland_wrapper"
# Attempt real cmake build with reduced feature set
BUILD_DIR="${COOKBOOK_SOURCE}/redox_build"
mkdir -p "${BUILD_DIR}"
cmake -B "${BUILD_DIR}" -S "${COOKBOOK_SOURCE}" \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_SYSROOT}/usr/share/cmake/redox.cmake" \
-DCMAKE_INSTALL_PREFIX="${COOKBOOK_STAGE}/usr" \
-DCMAKE_PREFIX_PATH="${COOKBOOK_STAGE}/usr;${COOKBOOK_SYSROOT}/usr;${HOST_BUILD}" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DKF6_HOST_TOOLING="${HOST_BUILD}/lib/cmake" \
-DBUILD_WITH_QML=OFF \
-DKWIN_BUILD_KCMS=OFF \
-DKWIN_BUILD_EFFECTS=OFF \
-DKWIN_BUILD_TABBOX=OFF \
-DKWIN_BUILD_GLOBALSHORTCUTS=OFF \
-DKWIN_BUILD_NOTIFICATIONS=OFF \
-DKWIN_BUILD_SCREENLOCKING=OFF \
-DKWIN_BUILD_SCREENLOCKER=OFF \
-DKWIN_BUILD_RUNNING_IN_KDE=OFF \
-DKWIN_BUILD_ELECTRONICALLY_SIGNING_DOCS=OFF \
-DKWIN_BUILD_DECORATIONS=ON \
-DKWIN_BUILD_RUNNERS=ON \
-DUSE_DBUS=ON \
-DQT_MAJOR_VERSION=6 \
-DCMAKE_BUILD_TYPE=Release \
|| { echo "KWin cmake configure failed"; exit 1; }
cmake --build "${BUILD_DIR}" -j "${COOKBOOK_MAKE_JOBS}" || { echo "KWin build failed"; exit 1; }
cmake --install "${BUILD_DIR}"
echo "=== KWin real build (reduced features, no QML) ==="
"""
[package]
dependencies = [
"kf6-kwindowsystem",
]