diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix index a84a429695c8..aa2cbb921698 100644 --- a/pkgs/development/libraries/qt-5/5.7/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/default.nix @@ -90,6 +90,7 @@ let qttranslations = callPackage ./qttranslations.nix {}; qtwebchannel = callPackage ./qtwebchannel.nix {}; qtwebengine = callPackage ./qtwebengine.nix {}; + qtwebkit = callPackage ./qtwebkit {}; qtwebsockets = callPackage ./qtwebsockets.nix {}; qtx11extras = callPackage ./qtx11extras.nix {}; qtxmlpatterns = callPackage ./qtxmlpatterns.nix {}; diff --git a/pkgs/development/libraries/qt-5/5.7/qtwebkit/0001-dlopen-webkit-nsplugin.patch b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0001-dlopen-webkit-nsplugin.patch new file mode 100644 index 000000000000..0eeacce1bc05 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0001-dlopen-webkit-nsplugin.patch @@ -0,0 +1,53 @@ +From 862ce7d357a3ec32683ac6ec7c0ebdc9346b44ba Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Sun, 23 Aug 2015 09:18:54 -0500 +Subject: [PATCH 1/3] dlopen webkit nsplugin + +--- + Source/WebCore/plugins/qt/PluginPackageQt.cpp | 2 +- + Source/WebCore/plugins/qt/PluginViewQt.cpp | 2 +- + Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp +index a923d49..2731d05 100644 +--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp ++++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp +@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0) + } + } + +- QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); ++ QLibrary library(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); + if (library.load()) { + typedef void *(*gtk_init_check_ptr)(int*, char***); + gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); +diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp +index de06a2f..363bde5 100644 +--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp ++++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp +@@ -697,7 +697,7 @@ static Display *getPluginDisplay() + // support gdk based plugins (like flash) that use a different X connection. + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); +- QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++ QLibrary library(QLatin1String("@gdk_pixbuf@/lib/libgdk-x11-2.0"), 0); + if (!library.load()) + return 0; + +diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +index d734ff6..62a2197 100644 +--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp ++++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +@@ -64,7 +64,7 @@ static Display* getPluginDisplay() + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); + +- QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++ QLibrary library(QLatin1String("@gdk_pixbuf@/libgdk-x11-2.0"), 0); + if (!library.load()) + return 0; + +-- +2.5.0 + diff --git a/pkgs/development/libraries/qt-5/5.7/qtwebkit/0002-dlopen-webkit-gtk.patch b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0002-dlopen-webkit-gtk.patch new file mode 100644 index 000000000000..bb5d1f74364c --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0002-dlopen-webkit-gtk.patch @@ -0,0 +1,25 @@ +From 6a407d30357c2551abceac75c82f4a1688e47437 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Sun, 23 Aug 2015 09:19:16 -0500 +Subject: [PATCH 2/3] dlopen webkit gtk + +--- + Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +index 8de6521..0b25748 100644 +--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp ++++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr + + static bool initializeGtk() + { +- QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); ++ QLibrary gtkLibrary(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); + if (!gtkLibrary.load()) + return false; + typedef void* (*gtk_init_ptr)(void*, void*); +-- +2.5.0 + diff --git a/pkgs/development/libraries/qt-5/5.7/qtwebkit/0003-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0003-dlopen-webkit-udev.patch new file mode 100644 index 000000000000..1c360cd81aa2 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.7/qtwebkit/0003-dlopen-webkit-udev.patch @@ -0,0 +1,31 @@ +From 864020dd47c3b6d532d9f26b82185904cf9324f2 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Sun, 23 Aug 2015 09:19:29 -0500 +Subject: [PATCH 3/3] dlopen webkit udev + +--- + Source/WebCore/platform/qt/GamepadsQt.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform/qt/GamepadsQt.cpp +index 60ff317..da8ac69 100644 +--- a/Source/WebCore/platform/qt/GamepadsQt.cpp ++++ b/Source/WebCore/platform/qt/GamepadsQt.cpp +@@ -111,12 +111,12 @@ private: + bool load() + { + m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); +- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); + m_loaded = m_libUdev.load(); + if (resolveMethods()) + return true; + +- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); + m_loaded = m_libUdev.load(); + return resolveMethods(); + } +-- +2.5.0 + diff --git a/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix new file mode 100644 index 000000000000..2e92391f4c08 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.7/qtwebkit/default.nix @@ -0,0 +1,34 @@ +{ qtSubmodule, stdenv, qtdeclarative, qtlocation, qtmultimedia, qtsensors +, fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt +, sqlite, libudev +, bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby +, substituteAll +, flashplayerFix ? false +}: + +with stdenv.lib; + +qtSubmodule { + name = "qtwebkit"; + qtInputs = [ qtdeclarative qtlocation qtmultimedia qtsensors ]; + buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite ]; + nativeBuildInputs = [ + bison2 flex gdb gperf perl pkgconfig python ruby + ]; + patches = + let dlopen-webkit-nsplugin = substituteAll { + src = ./0001-dlopen-webkit-nsplugin.patch; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; + }; + dlopen-webkit-gtk = substituteAll { + src = ./0002-dlopen-webkit-gtk.patch; + gtk = gtk.out; + }; + dlopen-webkit-udev = substituteAll { + src = ./0003-dlopen-webkit-udev.patch; + libudev = libudev.out; + }; + in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] + ++ [ dlopen-webkit-udev ]; +} diff --git a/pkgs/development/libraries/qt-5/5.7/srcs.nix b/pkgs/development/libraries/qt-5/5.7/srcs.nix index 38334fa77f18..e7710ce82d6a 100644 --- a/pkgs/development/libraries/qt-5/5.7/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.7/srcs.nix @@ -2,6 +2,14 @@ { fetchurl, mirror }: { + qtwebkit = { + version = "5.7.0"; + src = fetchurl { + url = "${mirror}/community_releases/5.7/5.7.0/qtwebkit-opensource-src-5.7.0.tar.xz"; + sha256 = "1prlpl3zslzpr1iv7m3irvxjxn3v8nlxh21v9k2kaq4fpwy2b8y7"; + name = "qtwebkit-opensource-src-5.7.0.tar.xz"; + }; + }; qt3d = { version = "5.7.0"; src = fetchurl { @@ -146,14 +154,6 @@ name = "qtpurchasing-opensource-src-5.7.0.tar.xz"; }; }; - qtquickcontrols = { - version = "5.7.0"; - src = fetchurl { - url = "${mirror}/official_releases/qt/5.7/5.7.0/submodules/qtquickcontrols-opensource-src-5.7.0.tar.xz"; - sha256 = "0cpcrmz9n5b4bgmshmk093lirl9xwqb23inchnai1zqg21vrmqfq"; - name = "qtquickcontrols-opensource-src-5.7.0.tar.xz"; - }; - }; qtquickcontrols2 = { version = "5.7.0"; src = fetchurl { @@ -162,6 +162,14 @@ name = "qtquickcontrols2-opensource-src-5.7.0.tar.xz"; }; }; + qtquickcontrols = { + version = "5.7.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.7/5.7.0/submodules/qtquickcontrols-opensource-src-5.7.0.tar.xz"; + sha256 = "0cpcrmz9n5b4bgmshmk093lirl9xwqb23inchnai1zqg21vrmqfq"; + name = "qtquickcontrols-opensource-src-5.7.0.tar.xz"; + }; + }; qtscript = { version = "5.7.0"; src = fetchurl {