diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2015-12-19 12:15:33 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2015-12-19 12:15:33 -0600 |
commit | 9f62af08854a446e6e87434895ae0032d19778f4 (patch) | |
tree | 61c084c348c966c4fb0a35cea0d39dc480f4dbe8 | |
parent | 081b1f1707a20fbf12768d855c6a7880059e4bbe (diff) | |
download | nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar.gz nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar.bz2 nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar.lz nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar.xz nixlib-9f62af08854a446e6e87434895ae0032d19778f4.tar.zst nixlib-9f62af08854a446e6e87434895ae0032d19778f4.zip |
qt55.qtbase: fallback libGL path
If libGL is not found on the system library path, fall back to the default Mesa driver.
-rw-r--r-- | pkgs/development/libraries/qt-5/5.5/qtbase/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 0cb063010460..57ae127c9082 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -90,7 +90,7 @@ stdenv.mkDerivation { if [[ -n "$mesaSupported" ]]; then substituteInPlace \ qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp \ - --replace "@openglDriver@" "${mesa.driverLink}" + --replace "@mesa@" "${mesa}" substituteInPlace qtbase/mkspecs/common/linux.conf --replace "@mesa@" "${mesa}" fi ''; diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch index 8e25a12b0694..14411a95f3ac 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch @@ -2,12 +2,16 @@ Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforms/xcb/gl_in =================================================================== --- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp -@@ -563,7 +563,7 @@ void (*QGLXContext::getProcAddress(const +@@ -563,7 +563,12 @@ void (*QGLXContext::getProcAddress(const { extern const QString qt_gl_library_name(); // QLibrary lib(qt_gl_library_name()); -- QLibrary lib(QLatin1String("GL")); -+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL")); ++ // Check system library paths first + QLibrary lib(QLatin1String("GL")); ++ if (!lib.load()) { ++ // Fallback to Mesa driver ++ lib.setFileName(QLatin1String("@mesa@/lib/libGL")); ++ } glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB"); } } |