fix: gate kwin's X11-only helpers and the QUiLoader scripted-effects KCM
redbear-ci / check (push) Has been cancelled
redbear-ci / check (push) Has been cancelled
kwin compiles further; the remaining failure has moved into the native qtwaylandscanner_kde sub-build (host/target flag leakage), not the target sources. killer and dialoghelper both include <private/qtx11extras_p.h> unguarded and call QX11Info / XCB_CURRENT_TIME behind a RUNTIME platformName()==xcb check that is always false on a Wayland-only session. Note src/main.cpp does this CORRECTLY -- #if KWIN_BUILD_X11 around both the include and every use -- so the guard is upstream's own convention and these two helpers simply were not updated. Core kwin needed no change. The missing private header also explains a misleading second symptom: on failing to find it the compiler fell back to the HOST /usr/include/qt6 and reported 'Qt has not been ported to this OS', which looks like an unrelated toolchain fault but is the same missing header. kcm_kwin4_genericscripted includes QUiLoader from qttools, which is not ported. Dropping only the Qt::UiTools link left the include behind, so the whole target is gated. It is the settings dialog for scripted effects; the effects themselves are unaffected. Remove once qttools lands.
This commit is contained in:
@@ -90,6 +90,43 @@ sed -i '/include(ECMQmlModule)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/de
|
||||
sed -i '/^ UiTools$/d' "${COOKBOOK_SOURCE}/CMakeLists.txt"
|
||||
sed -i '/^ Qt::UiTools$/d' "${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# dialoghelper is X11-specific but is built unconditionally, even with
|
||||
# KWIN_BUILD_X11=OFF. It includes <private/qtx11extras_p.h> and <xcb/xcb.h> at
|
||||
# top level and calls QX11Info::setAppUserTime / XCB_CURRENT_TIME, all behind a
|
||||
# RUNTIME check (platformName() == "xcb") that is always false on a Wayland-only
|
||||
# session. qtbase does not install the private X11 interop header for this
|
||||
# target, so the build fails:
|
||||
# dialoghelper.cpp:22:10: fatal error: private/qtx11extras_p.h: No such file
|
||||
# and the compiler then falls back to the HOST /usr/include/qt6, which errors
|
||||
# with "Qt has not been ported to this OS" -- a misleading second symptom of the
|
||||
# same missing header, not an independent problem.
|
||||
# Upstream oversight: the helper should be gated on KWIN_BUILD_X11.
|
||||
# Idempotent: once commented, ^add_subdirectory no longer matches.
|
||||
sed -i 's/^add_subdirectory(dialoghelper)/#add_subdirectory(dialoghelper)/' \
|
||||
"${COOKBOOK_SOURCE}/src/helpers/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# killer: same story as dialoghelper -- includes <private/qtx11extras_p.h>
|
||||
# unguarded. Note src/main.cpp does this CORRECTLY (#if KWIN_BUILD_X11 around
|
||||
# the include and every use), so the guard is upstream's own convention; the two
|
||||
# helpers simply were not updated. Core kwin needs no change.
|
||||
sed -i 's/^add_subdirectory(killer)/#add_subdirectory(killer)/' \
|
||||
"${COOKBOOK_SOURCE}/src/helpers/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# kcm_kwin4_genericscripted (config UI for scripted effects) includes QUiLoader
|
||||
# from qttools, which is not ported. Dropping only the Qt::UiTools link left the
|
||||
# include, so drop the target too. This is a settings dialog for scripted
|
||||
# effects; the effects themselves are unaffected. Remove once qttools lands.
|
||||
sed -i 's/^set(kcm_kwin4_genericscripted_SRCS/#set(kcm_kwin4_genericscripted_SRCS/' \
|
||||
"${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^qt_add_dbus_interface(kcm_kwin4_genericscripted_SRCS/#qt_add_dbus_interface(kcm_kwin4_genericscripted_SRCS/' \
|
||||
"${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^add_library(kcm_kwin4_genericscripted/#add_library(kcm_kwin4_genericscripted/' \
|
||||
"${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/^target_link_libraries(kcm_kwin4_genericscripted$/,/^)/ s/^/#/' \
|
||||
"${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^install(TARGETS kcm_kwin4_genericscripted/#install(TARGETS kcm_kwin4_genericscripted/' \
|
||||
"${COOKBOOK_SOURCE}/src/kcms/common/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
# 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.
|
||||
|
||||
Reference in New Issue
Block a user