File 0001-glx-Fix-loading-OpenGL-library-when-libGL.so-symlink.patch of Package libqt5-qtbase.18762

From 65485bfe4b42d1f1e37b23809f731b2f4c31fc0e Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Tue, 10 Apr 2018 14:01:47 +0300
Subject: [PATCH] glx: Fix loading OpenGL library when libGL.so symlink is
 missing

Task-number: QTBUG-67537
Change-Id: Ib59bc27582f44b0c6b04efa57c44d877e1685bbb
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
---
 .../platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index e2e573f0e1..177293231e 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -581,6 +581,8 @@ QFunctionPointer QGLXContext::getProcAddress(const char *procName)
                 extern const QString qt_gl_library_name();
 //                QLibrary lib(qt_gl_library_name());
                 QLibrary lib(QLatin1String("GL"));
+                if (!lib.load())
+                    lib.setFileNameAndVersion(QLatin1String("GL"), 1);
                 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
 #endif
             }
-- 
2.17.1

openSUSE Build Service is sponsored by