[packages/qt5-qtbase] upstreamm patch for fixing build with latest egl header changes
atler
atler at pld-linux.org
Sat Jan 15 00:19:39 CET 2022
commit 29df2ae623f87d39087078d1171f43bad69e981b
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Jan 15 00:17:42 2022 +0100
upstreamm patch for fixing build with latest egl header changes
egl-x11.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
qt5-qtbase.spec | 2 ++
2 files changed, 57 insertions(+)
---
diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec
index 4cf9c01..b49d399 100644
--- a/qt5-qtbase.spec
+++ b/qt5-qtbase.spec
@@ -80,6 +80,7 @@ Source1: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/
# Source1-md5: 9b66cdb64402e8fd9e843f8a7120abb1
Patch0: %{name}-system_cacerts.patch
Patch1: gcc11.patch
+Patch2: egl-x11.patch
URL: https://www.qt.io/
%{?with_directfb:BuildRequires: DirectFB-devel}
BuildRequires: EGL-devel
@@ -1174,6 +1175,7 @@ Generator plików makefile dla aplikacji Qt5.
%setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__sed} -i -e 's,usr/X11R6/,usr/,g' mkspecs/linux-g++-64/qmake.conf
diff --git a/egl-x11.patch b/egl-x11.patch
new file mode 100644
index 0000000..7dc4e12
--- /dev/null
+++ b/egl-x11.patch
@@ -0,0 +1,55 @@
+From f42186815187be1a0c5c0f9d6acc657872d3d533 Mon Sep 17 00:00:00 2001
+From: Laszlo Agocs <laszlo.agocs at qt.io>
+Date: Mon, 20 Sep 2021 11:16:09 +0200
+Subject: [PATCH] Cater for upstream changes in eglplatform.h
+
+EGL_NO_X11 has been replaced with USE_X11, thus breaking all existing
+code out there, including Qt:
+https://github.com/KhronosGroup/EGL-Registry/pull/130
+
+Fix this by defining USE_X11 whenever we do not define EGL_NO_X11.
+
+Fixes: QTBUG-96392
+Pick-to: 6.2
+Change-Id: If8b68caa8c9022477d87169ca2e2a0121a9313e0
+Reviewed-by: Andy Nichols <andy.nichols at qt.io>
+(cherry picked from commit 4cc5428548cb8ab973e4b0281dd123d59bfaf6a0)
+---
+ src/gui/configure.json | 3 ++-
+ src/platformsupport/eglconvenience/qt_egl_p.h | 6 +++++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index 1f08795c57..12c95742d2 100644
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -834,7 +834,8 @@
+ "// embedded devices, are not intended to be used together with X. EGL support",
+ "// has to be disabled in plugins like xcb in this case since the native display,",
+ "// window and pixmap types will be different than what an X-based platform",
+- "// plugin would expect."
++ "// plugin would expect.",
++ "#define USE_X11"
+ ],
+ "include": [ "EGL/egl.h", "X11/Xlib.h" ],
+ "main": [
+diff --git a/src/platformsupport/eglconvenience/qt_egl_p.h b/src/platformsupport/eglconvenience/qt_egl_p.h
+index bf37d07fd8..dbd42fb799 100644
+--- a/src/platformsupport/eglconvenience/qt_egl_p.h
++++ b/src/platformsupport/eglconvenience/qt_egl_p.h
+@@ -61,7 +61,11 @@
+ # if !defined(Q_OS_INTEGRITY)
+ # define WIN_INTERFACE_CUSTOM // NV
+ # endif // Q_OS_INTEGRITY
+-#endif // QT_EGL_NO_X11
++#else // QT_EGL_NO_X11
++// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
++// that needs USE_X11 to be defined.
++# define USE_X11
++#endif
+
+ #ifdef QT_EGL_WAYLAND
+ # define WAYLAND // NV
+--
+GitLab
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtbase.git/commitdiff/5438032cd6841f2b44254878270879aa8d1f0674
More information about the pld-cvs-commit
mailing list