diff --git a/config/redbear-full.toml b/config/redbear-full.toml index 7a145dcc65..f2e8ba15f4 100644 --- a/config/redbear-full.toml +++ b/config/redbear-full.toml @@ -295,6 +295,8 @@ libxkbfile = {} util-macros = {} xcb-util = {} xcb-util-image = {} +xcb-util-wm = {} +xcb-util-keysyms = {} # libice/libsm deliberately NOT included: they are X11 session-management # libraries used only by ksmserver, which is inside if(WITH_X11) and is not # built. They also need xorg util-macros, which is in no recipe here -- so diff --git a/local/recipes/kde/kf6-kwindowsystem/recipe.toml b/local/recipes/kde/kf6-kwindowsystem/recipe.toml index 98ea88a21f..ba43cd3bf8 100644 --- a/local/recipes/kde/kf6-kwindowsystem/recipe.toml +++ b/local/recipes/kde/kf6-kwindowsystem/recipe.toml @@ -10,6 +10,12 @@ blake3 = "7d97020c517d228d3ca442d68fb3db899a8b6ae0e5b1f5ccc92701ef691a8ecf" [build] template = "custom" dependencies = [ + "libxrender", + "libxfixes", + "xcb-util-wm", + "xcb-util-keysyms", + "libxcb", + "libx11", "qtbase", # KWINDOWSYSTEM_QML=ON (below) builds the QML module, whose CMakeLists does # find_package(Qt6Qml) via ECMQmlModule. Qt6Qml comes from qtdeclarative, so @@ -41,6 +47,27 @@ done rm -f CMakeCache.txt rm -rf CMakeFiles +# KWINDOWSYSTEM_X11 stays OFF -- enabling it needs Qt built with the xcb +# platform, which this qtbase is not: +# src/platforms/xcb/kxerrorhandler_p.h:15: fatal error: +# private/qtx11extras_p.h: No such file or directory +# That header ships only with Qt's X11 support, so turning KWindowSystem X11 on +# would cascade into rebuilding qtbase with the whole xcb plugin stack. The X11 +# LIBRARIES are still present and linkable (they satisfy find_package(X11) for +# consumers); what is absent is Qt-level X11 integration. Consumers therefore +# compile with HAVE_X11=0 -- see plasma-desktop, which forces it explicitly. +# +# Original note kept for context: +# KWINDOWSYSTEM_X11=ON would install netwm.h, +# KX11Extras, KStartupInfo, KWindowInfo or KSelectionOwner. That was consistent +# while nothing could find X11 -- but the real X11 stack is now in the sysroot, +# so consumers' config-X11.h sets HAVE_X11=1 and they legitimately include those +# headers: +# applets/taskmanager/backend.h:16: fatal error: netwm.h (plasma-desktop) +# Libraries present + KWindowSystem X11 absent is the inconsistent state; this +# makes the two agree, and lets the per-file gating be removed rather than grown. +# Needs XCB components XCB/KEYSYMS/RES/ICCCM (source CMakeLists.txt:64): libxcb +# supplies xcb and xcb-res, xcb-util-keysyms and xcb-util-wm the other two. cmake "${COOKBOOK_SOURCE}" \ -DKF_SKIP_PO_PROCESSING=ON \ -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ diff --git a/local/recipes/kde/plasma-desktop/recipe.toml b/local/recipes/kde/plasma-desktop/recipe.toml index ae3c7a4c6f..6e04ba35af 100644 --- a/local/recipes/kde/plasma-desktop/recipe.toml +++ b/local/recipes/kde/plasma-desktop/recipe.toml @@ -136,6 +136,23 @@ fi sed -i 's|if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}")|if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}" AND NOT EXISTS "${XKBDIR}")|' \ "${COOKBOOK_SOURCE}/ConfigureChecks.cmake" +# Force HAVE_X11 to 0 even though find_package(X11) succeeds. +# +# CMakeLists.txt:211 does `if(X11_FOUND) set(HAVE_X11 1) endif()`. The X11 +# LIBRARIES are now in the sysroot (they are needed: X11 is TYPE REQUIRED here, +# and libxcb is required unconditionally), so X11_FOUND is true -- but Qt is +# built without the xcb platform and KWindowSystem without its X11 component, +# so the X11-only KDE headers do not exist: +# applets/taskmanager/backend.h:16: fatal error: netwm.h +# +# HAVE_X11=1 asserts "Qt/KDE X11 integration is available", which is false here. +# Enabling it for real means rebuilding qtbase with the whole xcb plugin stack +# (kxerrorhandler_p.h needs private/qtx11extras_p.h) -- tracked, not attempted +# mid-build. Until then the honest value is 0, and the gating script compiles +# those paths out. +# Idempotent: after rewriting, the original line no longer matches. +sed -i 's/^ set(HAVE_X11 1)$/ set(HAVE_X11 0)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" + python3 "${COOKBOOK_ROOT}/local/scripts/gate-kx11extras.py" "${COOKBOOK_SOURCE}" # BUILD_DOC=OFF -- KF6DocTools is REQUIRED when docs are on and is not ported. diff --git a/recipes/wip/x11/xcb-util-keysyms/recipe.toml b/recipes/x11/xcb-util-keysyms/recipe.toml similarity index 95% rename from recipes/wip/x11/xcb-util-keysyms/recipe.toml rename to recipes/x11/xcb-util-keysyms/recipe.toml index b08b376c1c..9e72836ea3 100644 --- a/recipes/wip/x11/xcb-util-keysyms/recipe.toml +++ b/recipes/x11/xcb-util-keysyms/recipe.toml @@ -11,6 +11,7 @@ autotools_recursive_regenerate [build] dependencies = [ + "util-macros", "libxcb", ] template = "custom" diff --git a/recipes/wip/x11/xcb-util-wm/recipe.toml b/recipes/x11/xcb-util-wm/recipe.toml similarity index 95% rename from recipes/wip/x11/xcb-util-wm/recipe.toml rename to recipes/x11/xcb-util-wm/recipe.toml index 2f575493e2..b0c4c85cb7 100644 --- a/recipes/wip/x11/xcb-util-wm/recipe.toml +++ b/recipes/x11/xcb-util-wm/recipe.toml @@ -11,6 +11,7 @@ autotools_recursive_regenerate [build] dependencies = [ + "util-macros", "libxcb", ] template = "custom"