From cc264f1cdc080506ef3bdde30ccf5176a3fa6ffe Mon Sep 17 00:00:00 2001 From: rsadowski Date: Mon, 16 Jan 2023 07:26:13 +0000 Subject: [PATCH] Fix build with upcomming Mesa update From upstram: https://invent.kde.org/qt/qt/qtbase/-/commit/7a44796c813ab9661a68d42a67c18759d0a3f9ed 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. --- x11/qt5/qtbase/Makefile | 2 ++ .../patches/patch-src_gui_configure_json | 27 +++++++++++++++++ ..._platformsupport_eglconvenience_qt_egl_p_h | 30 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 x11/qt5/qtbase/patches/patch-src_gui_configure_json create mode 100644 x11/qt5/qtbase/patches/patch-src_platformsupport_eglconvenience_qt_egl_p_h diff --git a/x11/qt5/qtbase/Makefile b/x11/qt5/qtbase/Makefile index 15176d52587..cf3b9fe47cc 100644 --- a/x11/qt5/qtbase/Makefile +++ b/x11/qt5/qtbase/Makefile @@ -12,6 +12,8 @@ PKGNAME-global = qt5-global-${VERSION} PKGNAME-psql = qt5-postgresql-${VERSION} PKGNAME-tds = qt5-tds-${VERSION} +REVISION-main = 0 + PKG_ARCH-global = * PKG_ARCH-examples = * diff --git a/x11/qt5/qtbase/patches/patch-src_gui_configure_json b/x11/qt5/qtbase/patches/patch-src_gui_configure_json new file mode 100644 index 00000000000..60e73ad2d1e --- /dev/null +++ b/x11/qt5/qtbase/patches/patch-src_gui_configure_json @@ -0,0 +1,27 @@ +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: default avatarAndy Nichols +(cherry picked from commit 4cc54285) + +https://invent.kde.org/qt/qt/qtbase/-/commit/7a44796c813ab9661a68d42a67c18759d0a3f9ed + +Index: src/gui/configure.json +--- src/gui/configure.json.orig ++++ 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/x11/qt5/qtbase/patches/patch-src_platformsupport_eglconvenience_qt_egl_p_h b/x11/qt5/qtbase/patches/patch-src_platformsupport_eglconvenience_qt_egl_p_h new file mode 100644 index 00000000000..ca9dd440ae5 --- /dev/null +++ b/x11/qt5/qtbase/patches/patch-src_platformsupport_eglconvenience_qt_egl_p_h @@ -0,0 +1,30 @@ +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: default avatarAndy Nichols +(cherry picked from commit 4cc54285) + +https://invent.kde.org/qt/qt/qtbase/-/commit/7a44796c813ab9661a68d42a67c18759d0a3f9ed + +Index: src/platformsupport/eglconvenience/qt_egl_p.h +--- src/platformsupport/eglconvenience/qt_egl_p.h.orig ++++ 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