diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-09-24 11:54:16 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-09-24 13:18:42 -0400 |
commit | 023de8617b587136277486bcbce5852070c8e37c (patch) | |
tree | 94d5a9fb42c388656e4475b816c760c2085ca5ff /dev-qt/qtbase | |
parent | profiles/arch/loong: drop the dev-util/cmake[gui] mask (diff) | |
download | gentoo-023de8617b587136277486bcbce5852070c8e37c.tar.gz gentoo-023de8617b587136277486bcbce5852070c8e37c.tar.bz2 gentoo-023de8617b587136277486bcbce5852070c8e37c.zip |
dev-qt/qtbase: backport fix for libglvnd[-X]
Currently only exists in 6.9999 and will be in Qt6.7 unless upstream
backports it to 6.6.x earlier.
Originally thought that this already worked with the cmake migration,
thus libglvnd[-X] not being only for gles2-only like in qtgui:5.
Rather than change that dependency, just backport the cmake check
to allow building.
Trivial elseif() so this does nothing unless GLX is missing.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-qt/qtbase')
-rw-r--r-- | dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch | 29 | ||||
-rw-r--r-- | dev-qt/qtbase/qtbase-6.5.2-r2.ebuild | 1 | ||||
-rw-r--r-- | dev-qt/qtbase/qtbase-6.5.9999.ebuild | 1 | ||||
-rw-r--r-- | dev-qt/qtbase/qtbase-6.6.9999.ebuild | 1 |
4 files changed, 32 insertions, 0 deletions
diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch b/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch new file mode 100644 index 000000000000..f8263d10c022 --- /dev/null +++ b/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch @@ -0,0 +1,29 @@ +Fixes build with libglvnd[-X]. + +https://github.com/qt/qtbase/commit/929d9a4ca5c9eb0a590479182471d0bbc81589aa +From: Yaroslav Isakov <yaroslav.isakov@gmail.com> +Date: Sat, 8 Jul 2023 22:09:40 +0200 +Subject: [PATCH] Allow OpenGL to be found on X11-less Linux systems (using + libOpenGL) + +Cmake supports finding OpenGL, even if there is no GLX (for glvnd) or +old-style libGL. This change keeps old behavior, but in case, if +X11-related OpenGL libraries cannot be found on Linux, it adds logic +to check for (and link with) libOpenGL, if it is present. +--- a/cmake/FindWrapOpenGL.cmake ++++ b/cmake/FindWrapOpenGL.cmake +@@ -47,4 +47,14 @@ + target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL) + endif() ++elseif(UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "Integrity") ++ # Requesting only the OpenGL component ensures CMake does not mark the package as ++ # not found if neither GLX nor libGL are available. This allows finding OpenGL ++ # on an X11-less Linux system. ++ find_package(OpenGL ${WrapOpenGL_FIND_VERSION} COMPONENTS OpenGL) ++ if (OpenGL_FOUND) ++ set(WrapOpenGL_FOUND ON) ++ add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED) ++ target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::OpenGL) ++ endif() + endif() + diff --git a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild index 67ce1f180005..23cf23a2b4ad 100644 --- a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild +++ b/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild @@ -131,6 +131,7 @@ PDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch + "${FILESDIR}"/${PN}-6.5.2-no-glx.patch "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch "${FILESDIR}"/${P}-CVE-2023-38197.patch "${FILESDIR}"/${P}-tests-gcc13.patch diff --git a/dev-qt/qtbase/qtbase-6.5.9999.ebuild b/dev-qt/qtbase/qtbase-6.5.9999.ebuild index a9f5f90dbb5e..7b0f034f5934 100644 --- a/dev-qt/qtbase/qtbase-6.5.9999.ebuild +++ b/dev-qt/qtbase/qtbase-6.5.9999.ebuild @@ -131,6 +131,7 @@ PDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch + "${FILESDIR}"/${PN}-6.5.2-no-glx.patch "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch ) diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild b/dev-qt/qtbase/qtbase-6.6.9999.ebuild index 2d2b28ed79e1..7b0f89e55b28 100644 --- a/dev-qt/qtbase/qtbase-6.6.9999.ebuild +++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild @@ -131,6 +131,7 @@ PDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch + "${FILESDIR}"/${PN}-6.5.2-no-glx.patch "${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch ) |