qt55: set library paths from NIX_PROFILES

This commit is contained in:
Thomas Tuegel 2015-10-17 09:23:37 -05:00
parent b1569b3015
commit a3855ef9ae
13 changed files with 95 additions and 46 deletions

View file

@ -1,7 +1,7 @@
From d3224286c647f1d1e7dac485bbeee5bc8286e6c6 Mon Sep 17 00:00:00 2001
From 5334f7d5d3e7be31ea25c3553dfb60f283a14669 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:21:58 -0600
Subject: [PATCH 1/9] dlopen-gtkstyle
Subject: [PATCH 01/11] dlopen-gtkstyle
---
qtbase/src/widgets/styles/qgtk2painter.cpp | 2 +-
@ -59,5 +59,5 @@ index 0e119a1..ad6caa1 100644
return (QGtkStylePrivate::gconf_client_get_default !=0);
}
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From af315c076c8626292075592fab1726fcd62c3169 Mon Sep 17 00:00:00 2001
From 51ae02d8c9de1cb93bf22b2519efb119dd2e39d9 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:22:55 -0600
Subject: [PATCH 2/9] dlopen-resolv
Subject: [PATCH 02/11] dlopen-resolv
---
qtbase/src/network/kernel/qdnslookup_unix.cpp | 2 +-
@ -35,5 +35,5 @@ index 90a6f76..758407a 100644
return;
}
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From fc9f34b6e8a290615868e27bfcd31c355d11487c Mon Sep 17 00:00:00 2001
From d1f7bf62e4bab26df5deea37f08cfdd278cca47c Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:23:08 -0600
Subject: [PATCH 3/9] dlopen-gl
Subject: [PATCH 03/11] dlopen-gl
---
.../plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 2 +-
@ -21,5 +21,5 @@ index 5166372..bdeb69a 100644
}
}
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From b1a0771652ddf91058f67fa92260a89c43f5c530 Mon Sep 17 00:00:00 2001
From 26c73d6da84f1b4797421b9ddecef18d6ce588f0 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:23:22 -0600
Subject: [PATCH 4/9] tzdir
Subject: [PATCH 04/11] tzdir
---
qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp | 21 +++++++++++++++------
@ -48,5 +48,5 @@ index 29f0e17..3878974 100644
}
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From 5fbe717120864d490fa4d60bc7f7676ac19bd69d Mon Sep 17 00:00:00 2001
From 9fbdfd6c1231ee4778acc9a2edf297cf4b9314ac Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:33:51 -0600
Subject: [PATCH 5/9] dlopen-libXcursor
Subject: [PATCH 05/11] dlopen-libXcursor
---
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++--
@ -25,5 +25,5 @@ index e51ab85..7ec4b0b 100644
}
if (xcursorFound) {
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From 4c4b1f2a35644014da79d089d3860e518fa9a27d Mon Sep 17 00:00:00 2001
From 2d7e4e21291238e2b41d0e173f918cd3530c8ade Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sun, 23 Aug 2015 08:52:04 -0500
Subject: [PATCH 6/9] dlopen openssl
Subject: [PATCH 06/11] dlopen openssl
---
qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 ++++----
@ -34,5 +34,5 @@ index e2700df..a7ccf88 100644
// libssl.so.0 and libcrypto.so.0 found
return pair;
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From a23141d76cdde068ba1cefdad4a6352c921ce7c9 Mon Sep 17 00:00:00 2001
From d060d32d8df3e320a12567ebdfc2c1d01c648168 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sun, 23 Aug 2015 08:52:27 -0500
Subject: [PATCH 7/9] dlopen dbus
Subject: [PATCH 07/11] dlopen dbus
---
qtbase/src/dbus/qdbus_symbols.cpp | 2 +-
@ -21,5 +21,5 @@ index b82d92b..f72c9cb 100644
lib->unload();
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From a7dc6209542ef8aa54191c0e17fbb9b41cbad67f Mon Sep 17 00:00:00 2001
From 253c0829d4bc30da0152a22114a949449796ec7d Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sun, 23 Aug 2015 08:52:57 -0500
Subject: [PATCH 8/9] xdg config dirs
Subject: [PATCH 08/11] xdg config dirs
---
qtbase/src/corelib/io/qsettings.cpp | 18 ++++++++++++++++++
@ -51,5 +51,5 @@ index 93d63fd..160b197 100644
SandboxConfFile = 0,
NumConfFiles = 1
--
2.5.0
2.5.2

View file

@ -1,7 +1,7 @@
From 64bc88615a4cb58d461fe600b46611415d74b7b2 Mon Sep 17 00:00:00 2001
From 44378743aa6ca21eb61de93476daa8356081c0fc Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sun, 23 Aug 2015 08:53:42 -0500
Subject: [PATCH 9/9] decrypt ssl traffic
Subject: [PATCH 09/11] decrypt ssl traffic
---
qtbase/src/network/ssl/qsslsocket_openssl.cpp | 2 +-
@ -21,5 +21,5 @@ index 049666b..e8342ab 100644
#include "qssl_p.h"
#include "qsslsocket_openssl_p.h"
--
2.5.0
2.5.2

View file

@ -0,0 +1,27 @@
From 5113406661f06afa01da48ebc0567a4d0f69051c Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sat, 17 Oct 2015 09:12:46 -0500
Subject: [PATCH 10/11] mkspecs libgl
---
qtbase/mkspecs/common/linux.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qtbase/mkspecs/common/linux.conf b/qtbase/mkspecs/common/linux.conf
index 8d6fb6f..0ff9181 100644
--- a/qtbase/mkspecs/common/linux.conf
+++ b/qtbase/mkspecs/common/linux.conf
@@ -12,8 +12,8 @@ QMAKE_INCDIR =
QMAKE_LIBDIR =
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_OPENGL = @mesa@/include
+QMAKE_LIBDIR_OPENGL = @mesa@/lib
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =
--
2.5.2

View file

@ -0,0 +1,38 @@
From 2da5e660c4b470444e756f2ec88cb520a124bc99 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Sat, 17 Oct 2015 09:20:35 -0500
Subject: [PATCH] nix profiles library paths
---
qtbase/src/corelib/kernel/qcoreapplication.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/qtbase/src/corelib/kernel/qcoreapplication.cpp b/qtbase/src/corelib/kernel/qcoreapplication.cpp
index ecafe91..96e3eb5 100644
--- a/qtbase/src/corelib/kernel/qcoreapplication.cpp
+++ b/qtbase/src/corelib/kernel/qcoreapplication.cpp
@@ -2496,6 +2496,21 @@ QStringList QCoreApplication::libraryPaths()
}
}
}
+
+ // Add library paths derived from NIX_PROFILES.
+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES");
+ if (!nixProfilesEnv.isEmpty()) {
+ QLatin1Char pathSep(' ');
+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts);
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
+ it->append("/lib/qt5/plugins");
+ QString canonicalPath = QDir(*it).canonicalPath();
+ if (!canonicalPath.isEmpty()
+ && !app_libpaths->contains(canonicalPath)) {
+ app_libpaths->append(canonicalPath);
+ }
+ }
+ }
}
return *(coreappdata()->app_libpaths);
}
--
2.5.2

View file

@ -1,17 +0,0 @@
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
@@ -12,8 +12,8 @@
QMAKE_LIBDIR =
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBDIR_OPENGL =
+QMAKE_INCDIR_OPENGL = @mesa@/include
+QMAKE_LIBDIR_OPENGL = @mesa@/lib
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =

View file

@ -84,12 +84,13 @@ stdenv.mkDerivation {
xdg-config-dirs = ./0008-xdg-config-dirs.patch;
decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch;
mkspecs-libgl = substituteAll {
src = ./0014-mkspecs-libgl.patch;
src = ./0010-mkspecs-libgl.patch;
inherit mesa;
};
nix-profiles-library-paths = ./0011-nix-profiles-library-paths.patch;
in [
dlopen-resolv dlopen-gl tzdir dlopen-libXcursor dlopen-openssl
dlopen-dbus xdg-config-dirs
dlopen-dbus xdg-config-dirs nix-profiles-library-paths
]
++ optional gtkStyle dlopen-gtkstyle
++ optional decryptSslTraffic decrypt-ssl-traffic