fix: declare kwin's missing REQUIRED deps; gate the Canberra-only plugin

kwin's CMakeLists issues find_package/pkg_check_modules REQUIRED for
several packages that are in the config and built but were never declared
as deps, so they were never staged into kwin's sysroot: libxcvt,
libdisplay-info, kglobalacceld, libinput, lcms2. Audited the CMakeLists
for REQUIRED names and cross-checked against recipes that exist, rather
than adding them one failed configure at a time.

KF6_HOST_TOOLING must point at the HOST's system KF6 (/usr/lib/cmake), as
konsole already does. src/wayland/tools needs a native Qt/KF6 prefix;
pointing it at build/qt-host-build instead fails differently, because that
tree carries Qt host tooling but no KF6, and KF6AuthConfig /
KF6KCMUtilsConfig then fail their include().

systembell: TEMPORARY DEBT, narrowly scoped and documented at the call
site. It is the only consumer of Canberra in KWin, yet
find_package(Canberra REQUIRED) is ungated, so one optional audible-bell
plugin blocks the whole compositor. The in-tree WIP libcanberra recipe
depends on gtk3 and is itself marked 'no audio backend supported'; a local
recipe using --disable-gtk3 plus the null backend is the intended fix.
Visual bell and every other effect are unaffected.
This commit is contained in:
2026-08-03 09:21:15 +03:00
parent 4fbfe3bf98
commit a19de6f5c9
+28
View File
@@ -49,6 +49,13 @@ dependencies = [
"vulkan-loader",
"plasma-wayland-protocols",
"libepoxy",
# pkg_check_modules(... REQUIRED) in kwin's CMakeLists: present in the
# config and built, but never staged into kwin's sysroot without a dep.
"libxcvt",
"libinput",
"lcms2",
"libdisplay-info",
"kglobalacceld",
"libudev",
"wayland-protocols",
"redbear-compositor",
@@ -75,6 +82,26 @@ sed -i '/include(ECMQmlModule)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/de
# Remove Qt components not available in cross-build
sed -i '/^ UiTools$/d' "${COOKBOOK_SOURCE}/CMakeLists.txt"
# TEMPORARY DEBT -- systembell (audible bell) is the ONLY consumer of Canberra
# in KWin (src/plugins/systembell/*). kwin's find_package(Canberra REQUIRED) is
# ungated, so the whole compositor fails to configure over one optional plugin.
#
# The proper fix is to port libcanberra, and it is NOT done here because the
# in-tree WIP recipe (recipes/wip/libs/audio/libcanberra) depends on gtk3 --
# an enormous port for an audio bell -- and is itself marked "no audio backend
# supported". A local recipe using upstream's --disable-gtk3 plus the null
# backend is the intended route; until then this drops one non-essential
# plugin, not compositor functionality.
#
# Scope: audible system bell only. Visual bell and all other KWin effects are
# unaffected. Remove BOTH seds once libcanberra is ported.
# Idempotent: once commented, ^add_subdirectory no longer matches; the
# find_package line is rewritten to a form that no longer matches REQUIRED.
sed -i 's/^add_subdirectory(systembell)/#add_subdirectory(systembell)/' \
"${COOKBOOK_SOURCE}/src/plugins/CMakeLists.txt" 2>/dev/null || true
sed -i 's/^find_package(Canberra REQUIRED)/find_package(Canberra)/' \
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
rm -f CMakeCache.txt
rm -rf CMakeFiles
@@ -96,6 +123,7 @@ cmake "${COOKBOOK_SOURCE}" \
-DKF_SKIP_PO_PROCESSING=ON \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DQT_HOST_PATH="${HOST_BUILD}" \
-DKF6_HOST_TOOLING=/usr/lib/cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \