summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-08-29 18:11:15 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-08-29 18:11:15 -0500
commite9a8c5a988901a7e9c6f26214916ade70f262a45 (patch)
tree338cb905ff00680ddb13415d02281ace11503f12 /pkgs
parentfc0baf0ebeb0ba562f78ccb30dbdadc5e9a42aab (diff)
parent06ed82677a84fae47f0ab87b89519ea1792af346 (diff)
downloadnixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar.gz
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar.bz2
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar.lz
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar.xz
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.tar.zst
nixlib-e9a8c5a988901a7e9c6f26214916ade70f262a45.zip
Merge pull request #9524 from bjornfor/qt5-mkspecs-libgl
qt5: embed path to mesa (libGL) in Qt mkspecs file
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/qt-5/5.3/0014-mkspecs-libgl.patch15
-rw-r--r--pkgs/development/libraries/qt-5/5.3/default.nix3
-rw-r--r--pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch15
-rw-r--r--pkgs/development/libraries/qt-5/5.4/qtbase.nix3
4 files changed, 34 insertions, 2 deletions
diff --git a/pkgs/development/libraries/qt-5/5.3/0014-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.3/0014-mkspecs-libgl.patch
new file mode 100644
index 000000000000..94a031d12574
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.3/0014-mkspecs-libgl.patch
@@ -0,0 +1,15 @@
+Ensure Qt knows where libGL is.
+
+Author: Bjørn Forsman <bjorn.forsman@gmail.com>
+diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf
+--- qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf	2014-09-11 12:48:07.000000000 +0200
++++ qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf	2015-08-23 13:03:30.617473019 +0200
+@@ -13,7 +13,7 @@
+ QMAKE_INCDIR_X11        =
+ QMAKE_LIBDIR_X11        =
+ QMAKE_INCDIR_OPENGL     =
+-QMAKE_LIBDIR_OPENGL     =
++QMAKE_LIBDIR_OPENGL     = @mesa@/lib
+ QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
+ QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
+ QMAKE_INCDIR_EGL        =
diff --git a/pkgs/development/libraries/qt-5/5.3/default.nix b/pkgs/development/libraries/qt-5/5.3/default.nix
index 7f4e0b60c2d0..d1a049d78a72 100644
--- a/pkgs/development/libraries/qt-5/5.3/default.nix
+++ b/pkgs/development/libraries/qt-5/5.3/default.nix
@@ -81,7 +81,8 @@ stdenv.mkDerivation rec {
       (substituteAll { src = ./0011-dlopen-openssl.patch; inherit openssl; })
       (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus; })
       ./0013-qtwebkit-glib-2.44.patch
-    ];
+    ] ++ optional mesaSupported
+      (substituteAll { src = ./0014-mkspecs-libgl.patch; inherit mesa; });
 
   preConfigure = ''
     export LD_LIBRARY_PATH="$PWD/qtbase/lib:$PWD/qtbase/plugins/platforms:$PWD/qttools/lib:$LD_LIBRARY_PATH"
diff --git a/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch
new file mode 100644
index 000000000000..94a031d12574
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch
@@ -0,0 +1,15 @@
+Ensure Qt knows where libGL is.
+
+Author: Bjørn Forsman <bjorn.forsman@gmail.com>
+diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf
+--- qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf	2014-09-11 12:48:07.000000000 +0200
++++ qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf	2015-08-23 13:03:30.617473019 +0200
+@@ -13,7 +13,7 @@
+ QMAKE_INCDIR_X11        =
+ QMAKE_LIBDIR_X11        =
+ QMAKE_INCDIR_OPENGL     =
+-QMAKE_LIBDIR_OPENGL     =
++QMAKE_LIBDIR_OPENGL     = @mesa@/lib
+ QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
+ QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
+ QMAKE_INCDIR_EGL        =
diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
index 6ec57787e224..2e4a1c1c161a 100644
--- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
@@ -71,7 +71,8 @@ stdenv.mkDerivation {
       (substituteAll { src = ./0011-dlopen-openssl.patch; inherit openssl; })
       (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus; })
       ./0013-xdg_config_dirs.patch
-    ]
+    ] ++ optional mesaSupported
+      (substituteAll { src = ./0014-mkspecs-libgl.patch; inherit mesa; })
     ++ (optional decryptSslTraffic ./0100-ssl.patch);
 
   preConfigure = ''