From 76e2fe61fd6a735dcd2eaed93725e4cd1e2be52d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Nov 04 2019 19:48:51 +0000 Subject: Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files --- diff --git a/0001-glamor-xwayland-Define-EGL_NO_X11.patch b/0001-glamor-xwayland-Define-EGL_NO_X11.patch new file mode 100644 index 0000000..3057eb2 --- /dev/null +++ b/0001-glamor-xwayland-Define-EGL_NO_X11.patch @@ -0,0 +1,98 @@ +From 4b10693a62c06234fae69c3f50dc9af541b6d804 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 4 Nov 2019 20:03:17 +0100 +Subject: [PATCH xserver] glamor/xwayland: Define EGL_NO_X11 + +Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS, +EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers +shipped with libglvnd. + +This fixes the xserver not building with the libglvnd-1.2.0 headers: + +In file included from /usr/include/EGL/eglplatform.h:128, + from /usr/include/epoxy/egl_generated.h:11, + from /usr/include/epoxy/egl.h:46, + from glamor_priv.h:43, + from glamor_composite_glyphs.c:25: +/usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC' + 222 | *GC; + | ^~ +In file included from glamor.h:34, + from glamor_priv.h:32, + from glamor_composite_glyphs.c:25: +../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here + 282 | } GC; + | ^~ + +Signed-off-by: Hans de Goede +--- + glamor/glamor_egl.h | 1 + + glamor/glamor_priv.h | 1 + + hw/xwayland/xwayland-glamor-eglstream.c | 1 + + hw/xwayland/xwayland-glamor-gbm.c | 1 + + hw/xwayland/xwayland-glamor.c | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/glamor/glamor_egl.h b/glamor/glamor_egl.h +index 2f7566b24..8f6ed7840 100644 +--- a/glamor/glamor_egl.h ++++ b/glamor/glamor_egl.h +@@ -28,6 +28,7 @@ + #define GLAMOR_EGL_H + + #define MESA_EGL_NO_X11_HEADERS ++#define EGL_NO_X11 + #include + #include + #include +diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h +index 10c74c1b5..ea7a8bc96 100644 +--- a/glamor/glamor_priv.h ++++ b/glamor/glamor_priv.h +@@ -40,6 +40,7 @@ + #include + #ifdef GLAMOR_HAS_GBM + #define MESA_EGL_NO_X11_HEADERS ++#define EGL_NO_X11 + #include + #endif + +diff --git a/hw/xwayland/xwayland-glamor-eglstream.c b/hw/xwayland/xwayland-glamor-eglstream.c +index c62c0d2ac..36b749aaf 100644 +--- a/hw/xwayland/xwayland-glamor-eglstream.c ++++ b/hw/xwayland/xwayland-glamor-eglstream.c +@@ -33,6 +33,7 @@ + #include "wayland-eglstream-controller-client-protocol.h" + + #define MESA_EGL_NO_X11_HEADERS ++#define EGL_NO_X11 + #include + #include + #include +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index 354695060..e3d35ce10 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -36,6 +36,7 @@ + #include + + #define MESA_EGL_NO_X11_HEADERS ++#define EGL_NO_X11 + #include + #include + +diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c +index dc07f7933..bf7f0ffb4 100644 +--- a/hw/xwayland/xwayland-glamor.c ++++ b/hw/xwayland/xwayland-glamor.c +@@ -26,6 +26,7 @@ + #include "xwayland.h" + + #define MESA_EGL_NO_X11_HEADERS ++#define EGL_NO_X11 + #include + + #include +-- +2.23.0 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 7e655a3..43ea0af 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -156,8 +156,9 @@ Patch61: 0015-xwayland-Call-xwl_window_check_resolution_change_emu.patch Patch62: 0016-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch Patch63: 0017-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch -# Fix building with new libglvnd provided gl.pc +# Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files Patch64: 0001-build-glx-Lower-gl-version-to-work-with-libglvnd.patch +Patch65: 0001-glamor-xwayland-Define-EGL_NO_X11.patch BuildRequires: systemtap-sdt-devel BuildRequires: git @@ -584,7 +585,7 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog * Mon Nov 4 2019 Hans de Goede - 1.20.5-9 -- Fix building with new libglvnd provided gl.pc +- Fix building with new libglvnd-1.2.0 (E)GL headers and pkgconfig files * Mon Nov 4 2019 Hans de Goede - 1.20.5-8 - Backport Xwayland randr resolution change emulation support