From ab7cc543b81ca027b5505df9f5903ccc63b10844 Mon Sep 17 00:00:00 2001 From: vasilito Date: Tue, 4 Aug 2026 22:16:38 +0300 Subject: [PATCH] gate-kx11extras: also guard fixx11h.h and netwm.h KWindowSystem ships fixx11h.h (X11 macro cleanup), netwm.h and netwm_def.h (EWMH) only with its X11 component, so a Wayland-only install lacks them. They carry no X11/ or xcb/ path prefix, so the prefix-only rule missed them: logout-greeter/shutdowndlg.cpp:51: fatal error: fixx11h.h: No such file The single remaining unguarded case is libtaskmanager/xwindowtasksmodel.cpp, which upstream excludes from the build via if(HAVE_X11) in libtaskmanager/CMakeLists.txt -- it is never compiled, so it is left alone rather than edited for appearance. --- local/scripts/gate-kx11extras.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/local/scripts/gate-kx11extras.py b/local/scripts/gate-kx11extras.py index 99be5e25ed..adf609fddb 100755 --- a/local/scripts/gate-kx11extras.py +++ b/local/scripts/gate-kx11extras.py @@ -370,7 +370,12 @@ def gate_raw_x11_includes(text: str) -> tuple[str, int]: r"""Guard bare `#include ` / `` that sit outside HAVE_X11. Distinct from the KWindowSystem-API gating above: these are the Xlib/XCB - headers themselves. A Wayland-only sysroot ships none of them, so each is a + headers themselves, plus the X11-only KDE headers that KWindowSystem ships + only with its X11 component -- fixx11h.h (X11 macro cleanup), netwm.h and + netwm_def.h (EWMH). Those carry no X11/ or xcb/ path prefix, so a + prefix-only rule missed them: + logout-greeter/shutdowndlg.cpp:51: fatal error: fixx11h.h: No such file + A Wayland-only sysroot ships none of them, so each is a hard compile failure: appmenu/appmenu.h:13: fatal error: xcb/xcb.h: No such file or directory @@ -406,7 +411,9 @@ def gate_raw_x11_includes(text: str) -> tuple[str, int]: inx -= 1 out.append(line) continue - if inx == 0 and re.match(r"#\s*include\s*<(X11/|xcb/)", st): + if inx == 0 and re.match( + r"#\s*include\s*<(X11/|xcb/|fixx11h\.h|netwm\.h|netwm_def\.h)", st + ): ind = re.match(r"[ \t]*", line).group(0) out.append(f"{ind}{GUARD_OPEN}") out.append(line)