summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-12-19 11:56:50 -0600
committerThomas Tuegel <ttuegel@gmail.com>2015-12-19 11:56:50 -0600
commit8b890cac072b08540c9434b9d3a2f83d180e8757 (patch)
tree576b5b7d36dde48450f185cc1a27249dd3230451
parente0027501f1e93aedb898d68f74ccf79f9797c785 (diff)
downloadnixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar.gz
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar.bz2
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar.lz
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar.xz
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.tar.zst
nixlib-8b890cac072b08540c9434b9d3a2f83d180e8757.zip
qt55.qtbase: manage patches with quilt
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch39
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch25
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch29
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch25
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch25
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch27
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/decrypt-ssl-traffic.patch13
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/default.nix115
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-dbus.patch13
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch13
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gtkstyle.patch (renamed from pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch)35
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-libXcursor.patch17
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-openssl.patch (renamed from pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch)24
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-resolv.patch26
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/mkspecs-libgl.patch15
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch (renamed from pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch)22
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/series7
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/tzdir.patch (renamed from pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch)24
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/xdg-config-dirs.patch (renamed from pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch)31
19 files changed, 196 insertions, 329 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch
deleted file mode 100644
index ce768fec80c4..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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 02/11] dlopen-resolv
-
----
- qtbase/src/network/kernel/qdnslookup_unix.cpp | 2 +-
- qtbase/src/network/kernel/qhostinfo_unix.cpp  | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/qtbase/src/network/kernel/qdnslookup_unix.cpp b/qtbase/src/network/kernel/qdnslookup_unix.cpp
-index fa782da..912ecc7 100644
---- a/qtbase/src/network/kernel/qdnslookup_unix.cpp
-+++ b/qtbase/src/network/kernel/qdnslookup_unix.cpp
-@@ -79,7 +79,7 @@ static void resolveLibrary()
-     if (!lib.load())
- #endif
-     {
--        lib.setFileName(QLatin1String("resolv"));
-+        lib.setFileName(QLatin1String("@glibc/lib/resolv"));
-         if (!lib.load())
-             return;
-     }
-diff --git a/qtbase/src/network/kernel/qhostinfo_unix.cpp b/qtbase/src/network/kernel/qhostinfo_unix.cpp
-index 90a6f76..758407a 100644
---- a/qtbase/src/network/kernel/qhostinfo_unix.cpp
-+++ b/qtbase/src/network/kernel/qhostinfo_unix.cpp
-@@ -95,7 +95,7 @@ static void resolveLibrary()
-     if (!lib.load())
- #endif
-     {
--        lib.setFileName(QLatin1String("resolv"));
-+        lib.setFileName(QLatin1String("@glibc@/lib/libresolv"));
-         if (!lib.load())
-             return;
-     }
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch
deleted file mode 100644
index 0f8bd78aa320..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 03/11] dlopen-gl
-
----
- .../plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp   | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
-index 5166372..bdeb69a 100644
---- a/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
-+++ b/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
-@@ -560,7 +560,7 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) ()
-             {
-                 extern const QString qt_gl_library_name();
- //                QLibrary lib(qt_gl_library_name());
--                QLibrary lib(QLatin1String("GL"));
-+                QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
-                 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
-             }
-         }
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch
deleted file mode 100644
index 61c9b9846f5a..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-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 05/11] dlopen-libXcursor
-
----
- qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
-index e51ab85..7ec4b0b 100644
---- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
-+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
-@@ -303,10 +303,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
- #ifdef XCB_USE_XLIB
-     static bool function_ptrs_not_initialized = true;
-     if (function_ptrs_not_initialized) {
--        QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
-+        QLibrary xcursorLib(QLatin1String("@libXcursor@/lib/libXcursor"), 1);
-         bool xcursorFound = xcursorLib.load();
-         if (!xcursorFound) { // try without the version number
--            xcursorLib.setFileName(QLatin1String("Xcursor"));
-+            xcursorLib.setFileName(QLatin1String("@libXcursor@/lib/Xcursor"));
-             xcursorFound = xcursorLib.load();
-         }
-         if (xcursorFound) {
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch
deleted file mode 100644
index dcd5855e824e..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 07/11] dlopen dbus
-
----
- qtbase/src/dbus/qdbus_symbols.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/qtbase/src/dbus/qdbus_symbols.cpp b/qtbase/src/dbus/qdbus_symbols.cpp
-index b82d92b..f72c9cb 100644
---- a/qtbase/src/dbus/qdbus_symbols.cpp
-+++ b/qtbase/src/dbus/qdbus_symbols.cpp
-@@ -89,7 +89,7 @@ bool qdbus_loadLibDBus()
- #ifdef Q_OS_WIN
-         QLatin1String("dbus-1"),
- #endif
--        QLatin1String("libdbus-1")
-+        QLatin1String("@dbus_libs@/lib/libdbus-1")
-     };
- 
-     lib->unload();
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch
deleted file mode 100644
index 1d7202924cd3..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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 09/11] decrypt ssl traffic
-
----
- qtbase/src/network/ssl/qsslsocket_openssl.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/qtbase/src/network/ssl/qsslsocket_openssl.cpp b/qtbase/src/network/ssl/qsslsocket_openssl.cpp
-index 049666b..e8342ab 100644
---- a/qtbase/src/network/ssl/qsslsocket_openssl.cpp
-+++ b/qtbase/src/network/ssl/qsslsocket_openssl.cpp
-@@ -48,7 +48,7 @@
- ****************************************************************************/
- 
- //#define QSSLSOCKET_DEBUG
--//#define QT_DECRYPT_SSL_TRAFFIC
-+#define QT_DECRYPT_SSL_TRAFFIC
- 
- #include "qssl_p.h"
- #include "qsslsocket_openssl_p.h"
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch
deleted file mode 100644
index 0f418e600f15..000000000000
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/decrypt-ssl-traffic.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/decrypt-ssl-traffic.patch
new file mode 100644
index 000000000000..2cb3f7dfa700
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/decrypt-ssl-traffic.patch
@@ -0,0 +1,13 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/network/ssl/qsslsocket_openssl.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/network/ssl/qsslsocket_openssl.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/network/ssl/qsslsocket_openssl.cpp
+@@ -48,7 +48,7 @@
+ ****************************************************************************/
+ 
+ //#define QSSLSOCKET_DEBUG
+-//#define QT_DECRYPT_SSL_TRAFFIC
++#define QT_DECRYPT_SSL_TRAFFIC
+ 
+ #include "qssl_p.h"
+ #include "qsslsocket_openssl_p.h"
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 7c48c4571d92..3bbbefefa3c1 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, substituteAll, makeWrapper
+{ stdenv, lib, fetchurl, copyPathsToStore, makeWrapper
 , srcs
 
 , xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi
@@ -23,11 +23,9 @@
 , decryptSslTraffic ? false
 }:
 
-with stdenv.lib;
-
 let
   inherit (srcs.qt5) version;
-  system-x86_64 = elem stdenv.system platforms.x86_64;
+  system-x86_64 = lib.elem stdenv.system lib.platforms.x86_64;
 in
 
 stdenv.mkDerivation {
@@ -54,47 +52,44 @@ stdenv.mkDerivation {
   '';
 
   patches =
-    let dlopen-gtkstyle = substituteAll {
-          src = ./0001-dlopen-gtkstyle.patch;
-          # substituteAll ignores env vars starting with capital letter
-          gconf = GConf;
-          inherit gnome_vfs libgnomeui gtk;
-        };
-        dlopen-resolv = substituteAll {
-          src = ./0002-dlopen-resolv.patch;
-          glibc = stdenv.cc.libc;
-        };
-        dlopen-gl = substituteAll {
-          src = ./0003-dlopen-gl.patch;
-          openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
-        };
-        tzdir = ./0004-tzdir.patch;
-        dlopen-libXcursor = substituteAll {
-          src = ./0005-dlopen-libXcursor.patch;
-          inherit libXcursor;
-        };
-        dlopen-openssl = substituteAll {
-          src = ./0006-dlopen-openssl.patch;
-          inherit openssl;
-        };
-        dlopen-dbus = substituteAll {
-          src = ./0007-dlopen-dbus.patch;
-          dbus_libs = dbus;
-        };
-        xdg-config-dirs = ./0008-xdg-config-dirs.patch;
-        decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch;
-        mkspecs-libgl = substituteAll {
-          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 nix-profiles-library-paths
-    ]
-    ++ optional gtkStyle dlopen-gtkstyle
-    ++ optional decryptSslTraffic decrypt-ssl-traffic
-    ++ optional mesaSupported mkspecs-libgl;
+    copyPathsToStore (lib.readPathsFromFile ./. ./series)
+    ++ lib.optional gtkStyle ./dlopen-gtkstyle.patch
+    ++ lib.optional decryptSslTraffic ./decrypt-ssl-traffic.patch
+    ++ lib.optional mesaSupported [ ./dlopen-gl.patch ./mkspecs-libgl.patch ];
+
+  inherit decryptSslTraffic gtkStyle mesaSupported;
+
+  postPatch = ''
+    substituteInPlace qtbase/src/network/kernel/qdnslookup_unix.cpp \
+      --replace "@glibc@" "${stdenv.cc.libc}"
+    substituteInPlace qtbase/src/network/kernel/qhostinfo_unix.cpp \
+      --replace "@glibc@" "${stdenv.cc.libc}"
+
+    substituteInPlace qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp \
+      --replace "@libXcursor@" "${libXcursor}"
+
+    substituteInPlace qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp \
+      --replace "@openssl@" "${openssl}"
+
+    substituteInPlace qtbase/src/dbus/qdbus_symbols.cpp \
+      --replace "@dbus_libs@" "${dbus}"
+
+    if [[ -n "$gtkStyle" ]]; then
+      substituteInPlace qtbase/src/widgets/styles/qgtk2painter.cpp --replace "@gtk@" "${gtk}"
+      substituteInPlace qtbase/src/widgets/styles/qgtkstyle_p.cpp \
+        --replace "@gtk@" "${gtk}" \
+        --replace "@gnome_vfs@" "${gnome_vfs}" \
+        --replace "@libgnomeui@" "${libgnomeui}" \
+        --replace "@gconf@" "${GConf}"
+    fi
+
+    if [[ -n "$mesaSupported" ]]; then
+      substituteInPlace \
+        qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp \
+        --replace "@openglDriver@" "${mesa.driverLink}"
+      substituteInPlace qtbase/mkspecs/common/linux.conf --replace "@mesa@" "${mesa}"
+    fi
+  '';
 
   preConfigure = ''
     export LD_LIBRARY_PATH="$PWD/qtbase/lib:$PWD/qtbase/plugins/platforms:$PWD/qttools/lib:$LD_LIBRARY_PATH"
@@ -121,7 +116,7 @@ stdenv.mkDerivation {
     -release
     -shared
     -c++11
-    ${optionalString developerBuild "-developer-build"}
+    ${lib.optionalString developerBuild "-developer-build"}
     -largefile
     -accessibility
     -rpath
@@ -142,15 +137,15 @@ stdenv.mkDerivation {
     -glib
     -xcb
     -qpa xcb
-    -${optionalString (cups == null) "no-"}cups
-    -${optionalString (!gtkStyle) "no-"}gtkstyle
+    -${lib.optionalString (cups == null) "no-"}cups
+    -${lib.optionalString (!gtkStyle) "no-"}gtkstyle
 
     -no-eglfs
     -no-directfb
     -no-linuxfb
     -no-kms
 
-    ${optionalString (!system-x86_64) "-no-sse2"}
+    ${lib.optionalString (!system-x86_64) "-no-sse2"}
     -no-sse3
     -no-ssse3
     -no-sse4.1
@@ -174,14 +169,14 @@ stdenv.mkDerivation {
 
     -make libs
     -make tools
-    -${optionalString (buildExamples == false) "no"}make examples
-    -${optionalString (buildTests == false) "no"}make tests
+    -${lib.optionalString (buildExamples == false) "no"}make examples
+    -${lib.optionalString (buildTests == false) "no"}make tests
   '';
 
   # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
   # if dependency paths contain the string "pq", which can occur in the hash.
   # To prevent these failures, we need to override PostgreSQL detection.
-  PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
+  PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
 
   propagatedBuildInputs = [
     xlibs.libXcomposite libX11 libxcb libXext libXrender libXi
@@ -191,15 +186,15 @@ stdenv.mkDerivation {
   ]
   # Qt doesn't directly need GLU (just GL), but many apps use, it's small and
   # doesn't remain a runtime-dep if not used
-  ++ optionals mesaSupported [ mesa mesa_glu ]
-  ++ optional (cups != null) cups
-  ++ optional (mysql != null) mysql.lib
-  ++ optional (postgresql != null) postgresql
-  ++ optionals gtkStyle [gnome_vfs libgnomeui gtk GConf];
+  ++ lib.optionals mesaSupported [ mesa mesa_glu ]
+  ++ lib.optional (cups != null) cups
+  ++ lib.optional (mysql != null) mysql.lib
+  ++ lib.optional (postgresql != null) postgresql
+  ++ lib.optionals gtkStyle [gnome_vfs libgnomeui gtk GConf];
 
   buildInputs =
     [ bison flex gperf ruby ]
-    ++ optional developerBuild gdb;
+    ++ lib.optional developerBuild gdb;
 
   nativeBuildInputs = [ python perl pkgconfig ];
 
@@ -210,7 +205,7 @@ stdenv.mkDerivation {
 
   postInstall =
     ''
-      ${optionalString buildDocs ''
+      ${lib.optionalString buildDocs ''
         make docs && make install_docs
       ''}
 
@@ -223,7 +218,7 @@ stdenv.mkDerivation {
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with lib; {
     homepage = http://qt-project.org;
     description = "A cross-platform application framework for C++";
     license = "GPL/LGPL";
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-dbus.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-dbus.patch
new file mode 100644
index 000000000000..401cfd5c295e
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-dbus.patch
@@ -0,0 +1,13 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/dbus/qdbus_symbols.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/dbus/qdbus_symbols.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/dbus/qdbus_symbols.cpp
+@@ -89,7 +89,7 @@ bool qdbus_loadLibDBus()
+ #ifdef Q_OS_WIN
+         QLatin1String("dbus-1"),
+ #endif
+-        QLatin1String("libdbus-1")
++        QLatin1String("@dbus_libs@/lib/libdbus-1")
+     };
+ 
+     lib->unload();
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
new file mode 100644
index 000000000000..8e25a12b0694
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gl.patch
@@ -0,0 +1,13 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+===================================================================
+--- 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
+             {
+                 extern const QString qt_gl_library_name();
+ //                QLibrary lib(qt_gl_library_name());
+-                QLibrary lib(QLatin1String("GL"));
++                QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
+                 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
+             }
+         }
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gtkstyle.patch
index a4211378b904..ad1719c46e29 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-gtkstyle.patch
@@ -1,17 +1,7 @@
-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 01/11] dlopen-gtkstyle
-
----
- qtbase/src/widgets/styles/qgtk2painter.cpp |  2 +-
- qtbase/src/widgets/styles/qgtkstyle_p.cpp  | 12 ++++++------
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/qtbase/src/widgets/styles/qgtk2painter.cpp b/qtbase/src/widgets/styles/qgtk2painter.cpp
-index 489d456..c38e986 100644
---- a/qtbase/src/widgets/styles/qgtk2painter.cpp
-+++ b/qtbase/src/widgets/styles/qgtk2painter.cpp
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/styles/qgtk2painter.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/widgets/styles/qgtk2painter.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/styles/qgtk2painter.cpp
 @@ -96,7 +96,7 @@ static void initGtk()
      static bool initialized = false;
      if (!initialized) {
@@ -21,11 +11,11 @@ index 489d456..c38e986 100644
  
          QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
          QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
-diff --git a/qtbase/src/widgets/styles/qgtkstyle_p.cpp b/qtbase/src/widgets/styles/qgtkstyle_p.cpp
-index 0e119a1..ad6caa1 100644
---- a/qtbase/src/widgets/styles/qgtkstyle_p.cpp
-+++ b/qtbase/src/widgets/styles/qgtkstyle_p.cpp
-@@ -327,7 +327,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus(GtkWidget *widget, bool focus)
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/styles/qgtkstyle_p.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/widgets/styles/qgtkstyle_p.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/widgets/styles/qgtkstyle_p.cpp
+@@ -327,7 +327,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus
  void QGtkStylePrivate::resolveGtk() const
  {
      // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
@@ -34,7 +24,7 @@ index 0e119a1..ad6caa1 100644
  
      gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
      gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
-@@ -425,8 +425,8 @@ void QGtkStylePrivate::resolveGtk() const
+@@ -425,8 +425,8 @@ void QGtkStylePrivate::resolveGtk() cons
      pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
      pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
  
@@ -45,7 +35,7 @@ index 0e119a1..ad6caa1 100644
  }
  
  /* \internal
-@@ -594,9 +594,9 @@ void QGtkStylePrivate::cleanupGtkWidgets()
+@@ -594,9 +594,9 @@ void QGtkStylePrivate::cleanupGtkWidgets
  static bool resolveGConf()
  {
      if (!QGtkStylePrivate::gconf_client_get_default) {
@@ -58,6 +48,3 @@ index 0e119a1..ad6caa1 100644
      }
      return (QGtkStylePrivate::gconf_client_get_default !=0);
  }
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-libXcursor.patch
new file mode 100644
index 000000000000..e66ce1676d30
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-libXcursor.patch
@@ -0,0 +1,17 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -303,10 +303,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *c
+ #ifdef XCB_USE_XLIB
+     static bool function_ptrs_not_initialized = true;
+     if (function_ptrs_not_initialized) {
+-        QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
++        QLibrary xcursorLib(QLatin1String("@libXcursor@/lib/libXcursor"), 1);
+         bool xcursorFound = xcursorLib.load();
+         if (!xcursorFound) { // try without the version number
+-            xcursorLib.setFileName(QLatin1String("Xcursor"));
++            xcursorLib.setFileName(QLatin1String("@libXcursor@/lib/Xcursor"));
+             xcursorFound = xcursorLib.load();
+         }
+         if (xcursorFound) {
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-openssl.patch
index ad48133d93f7..1cc6fac583b7 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-openssl.patch
@@ -1,17 +1,8 @@
-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 06/11] dlopen openssl
-
----
- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp b/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
-index e2700df..a7ccf88 100644
---- a/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
-+++ b/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
-@@ -640,8 +640,8 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl()
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -640,8 +640,8 @@ static QPair<QLibrary*, QLibrary*> loadO
  #endif
  #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
      // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
@@ -22,7 +13,7 @@ index e2700df..a7ccf88 100644
      if (libcrypto->load() && libssl->load()) {
          // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
          return pair;
-@@ -658,8 +658,8 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl()
+@@ -658,8 +658,8 @@ static QPair<QLibrary*, QLibrary*> loadO
      //  OS X's /usr/lib/libssl.dylib, /usr/lib/libcrypto.dylib will be picked up in the third
      //    attempt, _after_ <bundle>/Contents/Frameworks has been searched.
      //  iOS does not ship a system libssl.dylib, libcrypto.dylib in the first place.
@@ -33,6 +24,3 @@ index e2700df..a7ccf88 100644
      if (libcrypto->load() && libssl->load()) {
          // libssl.so.0 and libcrypto.so.0 found
          return pair;
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-resolv.patch
new file mode 100644
index 000000000000..a79c806462f8
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/dlopen-resolv.patch
@@ -0,0 +1,26 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/network/kernel/qdnslookup_unix.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/network/kernel/qdnslookup_unix.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/network/kernel/qdnslookup_unix.cpp
+@@ -79,7 +79,7 @@ static void resolveLibrary()
+     if (!lib.load())
+ #endif
+     {
+-        lib.setFileName(QLatin1String("resolv"));
++        lib.setFileName(QLatin1String("@glibc/lib/resolv"));
+         if (!lib.load())
+             return;
+     }
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/network/kernel/qhostinfo_unix.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/network/kernel/qhostinfo_unix.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/network/kernel/qhostinfo_unix.cpp
+@@ -95,7 +95,7 @@ static void resolveLibrary()
+     if (!lib.load())
+ #endif
+     {
+-        lib.setFileName(QLatin1String("resolv"));
++        lib.setFileName(QLatin1String("@glibc@/lib/libresolv"));
+         if (!lib.load())
+             return;
+     }
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/mkspecs-libgl.patch
new file mode 100644
index 000000000000..10115e8144ad
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/mkspecs-libgl.patch
@@ -0,0 +1,15 @@
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/common/linux.conf
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/mkspecs/common/linux.conf
++++ qt-everywhere-opensource-src-5.5.1/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        =
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch
index 8eaf2f4ffac5..470526b1dcdb 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch
@@ -1,17 +1,8 @@
-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()
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/kernel/qcoreapplication.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp
+@@ -2498,6 +2498,21 @@ QStringList QCoreApplication::libraryPat
                  }
              }
          }
@@ -33,6 +24,3 @@ index ecafe91..96e3eb5 100644
      }
      return *(coreappdata()->app_libpaths);
  }
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/series b/pkgs/development/libraries/qt-5/5.5/qtbase/series
new file mode 100644
index 000000000000..d4b356a29189
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/series
@@ -0,0 +1,7 @@
+dlopen-resolv.patch
+tzdir.patch
+dlopen-libXcursor.patch
+dlopen-openssl.patch
+dlopen-dbus.patch
+xdg-config-dirs.patch
+nix-profiles-library-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/tzdir.patch
index c2564df4e1a1..92adeda82735 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/tzdir.patch
@@ -1,17 +1,8 @@
-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 04/11] tzdir
-
----
- qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
-
-diff --git a/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp b/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
-index 29f0e17..3878974 100644
---- a/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
-+++ b/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
-@@ -62,7 +62,10 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp
+@@ -62,7 +62,10 @@ typedef QHash<QByteArray, QTzTimeZone> Q
  // Parse zone.tab table, assume lists all installed zones, if not will need to read directories
  static QTzTimeZoneHash loadTzTimeZones()
  {
@@ -23,7 +14,7 @@ index 29f0e17..3878974 100644
      if (!QFile::exists(path))
          path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
  
-@@ -553,12 +556,18 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId)
+@@ -560,12 +563,18 @@ void QTzTimeZonePrivate::init(const QByt
          if (!tzif.open(QIODevice::ReadOnly))
              return;
      } else {
@@ -47,6 +38,3 @@ index 29f0e17..3878974 100644
          }
      }
  
--- 
-2.5.2
-
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/xdg-config-dirs.patch
index ebb572081bf1..24dc3bde148d 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/xdg-config-dirs.patch
@@ -1,18 +1,8 @@
-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 08/11] xdg config dirs
-
----
- qtbase/src/corelib/io/qsettings.cpp | 18 ++++++++++++++++++
- qtbase/src/corelib/io/qsettings_p.h |  2 +-
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/qtbase/src/corelib/io/qsettings.cpp b/qtbase/src/corelib/io/qsettings.cpp
-index 413f569..8ff4974 100644
---- a/qtbase/src/corelib/io/qsettings.cpp
-+++ b/qtbase/src/corelib/io/qsettings.cpp
-@@ -1131,6 +1131,24 @@ QConfFileSettingsPrivate::QConfFileSettingsPrivate(QSettings::Format format,
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qsettings.cpp
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/io/qsettings.cpp
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qsettings.cpp
+@@ -1131,6 +1131,24 @@ QConfFileSettingsPrivate::QConfFileSetti
      if (!application.isEmpty())
          confFiles[F_System | F_Application].reset(QConfFile::fromName(systemPath + appFile, false));
      confFiles[F_System | F_Organization].reset(QConfFile::fromName(systemPath + orgFile, false));
@@ -37,10 +27,10 @@ index 413f569..8ff4974 100644
  #else
      QString confName = getPath(format, QSettings::UserScope) + org;
      if (!application.isEmpty())
-diff --git a/qtbase/src/corelib/io/qsettings_p.h b/qtbase/src/corelib/io/qsettings_p.h
-index 93d63fd..160b197 100644
---- a/qtbase/src/corelib/io/qsettings_p.h
-+++ b/qtbase/src/corelib/io/qsettings_p.h
+Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qsettings_p.h
+===================================================================
+--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/io/qsettings_p.h
++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qsettings_p.h
 @@ -240,7 +240,7 @@ public:
          F_Organization = 0x1,
          F_User = 0x0,
@@ -50,6 +40,3 @@ index 93d63fd..160b197 100644
  #else
          SandboxConfFile = 0,
          NumConfFiles = 1
--- 
-2.5.2
-