lol

qt58.qtwebkit: use QLatin1String instead of QStringLiteral

+82 -129
-53
pkgs/development/libraries/qt-5/5.8/qtwebkit/0001-dlopen-webkit-nsplugin.patch
··· 1 - From 862ce7d357a3ec32683ac6ec7c0ebdc9346b44ba Mon Sep 17 00:00:00 2001 2 - From: Thomas Tuegel <ttuegel@gmail.com> 3 - Date: Sun, 23 Aug 2015 09:18:54 -0500 4 - Subject: [PATCH 1/3] dlopen webkit nsplugin 5 - 6 - --- 7 - Source/WebCore/plugins/qt/PluginPackageQt.cpp | 2 +- 8 - Source/WebCore/plugins/qt/PluginViewQt.cpp | 2 +- 9 - Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp | 2 +- 10 - 3 files changed, 3 insertions(+), 3 deletions(-) 11 - 12 - diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp 13 - index a923d49..2731d05 100644 14 - --- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp 15 - +++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp 16 - @@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0) 17 - } 18 - } 19 - 20 - - QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); 21 - + QLibrary library(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); 22 - if (library.load()) { 23 - typedef void *(*gtk_init_check_ptr)(int*, char***); 24 - gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); 25 - diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp 26 - index de06a2f..363bde5 100644 27 - --- a/Source/WebCore/plugins/qt/PluginViewQt.cpp 28 - +++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp 29 - @@ -697,7 +697,7 @@ static Display *getPluginDisplay() 30 - // support gdk based plugins (like flash) that use a different X connection. 31 - // The code below has the same effect as this one: 32 - // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); 33 - - QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); 34 - + QLibrary library(QLatin1String("@gdk_pixbuf@/lib/libgdk-x11-2.0"), 0); 35 - if (!library.load()) 36 - return 0; 37 - 38 - diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 39 - index d734ff6..62a2197 100644 40 - --- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 41 - +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 42 - @@ -64,7 +64,7 @@ static Display* getPluginDisplay() 43 - // The code below has the same effect as this one: 44 - // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); 45 - 46 - - QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); 47 - + QLibrary library(QLatin1String("@gdk_pixbuf@/libgdk-x11-2.0"), 0); 48 - if (!library.load()) 49 - return 0; 50 - 51 - -- 52 - 2.5.0 53 -
-25
pkgs/development/libraries/qt-5/5.8/qtwebkit/0002-dlopen-webkit-gtk.patch
··· 1 - From 6a407d30357c2551abceac75c82f4a1688e47437 Mon Sep 17 00:00:00 2001 2 - From: Thomas Tuegel <ttuegel@gmail.com> 3 - Date: Sun, 23 Aug 2015 09:19:16 -0500 4 - Subject: [PATCH 2/3] dlopen webkit gtk 5 - 6 - --- 7 - Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp | 2 +- 8 - 1 file changed, 1 insertion(+), 1 deletion(-) 9 - 10 - diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 11 - index 8de6521..0b25748 100644 12 - --- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 13 - +++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 14 - @@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr 15 - 16 - static bool initializeGtk() 17 - { 18 - - QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); 19 - + QLibrary gtkLibrary(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); 20 - if (!gtkLibrary.load()) 21 - return false; 22 - typedef void* (*gtk_init_ptr)(void*, void*); 23 - -- 24 - 2.5.0 25 -
-31
pkgs/development/libraries/qt-5/5.8/qtwebkit/0003-dlopen-webkit-udev.patch
··· 1 - From 864020dd47c3b6d532d9f26b82185904cf9324f2 Mon Sep 17 00:00:00 2001 2 - From: Thomas Tuegel <ttuegel@gmail.com> 3 - Date: Sun, 23 Aug 2015 09:19:29 -0500 4 - Subject: [PATCH 3/3] dlopen webkit udev 5 - 6 - --- 7 - Source/WebCore/platform/qt/GamepadsQt.cpp | 4 ++-- 8 - 1 file changed, 2 insertions(+), 2 deletions(-) 9 - 10 - diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform/qt/GamepadsQt.cpp 11 - index 60ff317..da8ac69 100644 12 - --- a/Source/WebCore/platform/qt/GamepadsQt.cpp 13 - +++ b/Source/WebCore/platform/qt/GamepadsQt.cpp 14 - @@ -111,12 +111,12 @@ private: 15 - bool load() 16 - { 17 - m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); 18 - - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); 19 - + m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); 20 - m_loaded = m_libUdev.load(); 21 - if (resolveMethods()) 22 - return true; 23 - 24 - - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); 25 - + m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); 26 - m_loaded = m_libUdev.load(); 27 - return resolveMethods(); 28 - } 29 - -- 30 - 2.5.0 31 -
+3 -1
pkgs/development/libraries/qt-5/5.8/qtwebkit/0004-icucore-darwin.patch pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch
··· 1 + Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri 2 + =================================================================== 1 3 --- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri 2 4 +++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri 3 - @@ -12,7 +12,7 @@ 5 + @@ -12,7 +12,7 @@ mac { 4 6 # Mac OS does ship libicu but not the associated header files. 5 7 # Therefore WebKit provides adequate header files. 6 8 INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
+12 -19
pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix
··· 1 - { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors 1 + { qtSubmodule, stdenv, copyPathsToStore, lib 2 + , qtdeclarative, qtlocation, qtsensors 2 3 , fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt 3 4 , sqlite, systemd, glib, gst_all_1 4 5 , bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby ··· 7 8 , flashplayerFix ? false 8 9 }: 9 10 10 - with stdenv.lib; 11 + let inherit (lib) optional optionals getLib; in 11 12 12 13 qtSubmodule { 13 14 name = "qtwebkit"; ··· 22 23 "/usr/lib/libicucore.dylib" 23 24 ]; 24 25 25 - patches = 26 - let dlopen-webkit-nsplugin = substituteAll { 27 - src = ./0001-dlopen-webkit-nsplugin.patch; 28 - gtk = gtk2.out; 29 - gdk_pixbuf = gdk_pixbuf.out; 30 - }; 31 - dlopen-webkit-gtk = substituteAll { 32 - src = ./0002-dlopen-webkit-gtk.patch; 33 - gtk = gtk2.out; 34 - }; 35 - dlopen-webkit-udev = substituteAll { 36 - src = ./0003-dlopen-webkit-udev.patch; 37 - libudev = systemd.lib; 38 - }; 39 - in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] 40 - ++ optionals (!stdenv.isDarwin) [ dlopen-webkit-udev ] 41 - ++ optionals (stdenv.isDarwin) [ ./0004-icucore-darwin.patch ]; 26 + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); 27 + 28 + NIX_CFLAGS_COMPILE = 29 + optionals flashplayerFix 30 + [ 31 + ''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"'' 32 + ''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"'' 33 + ] 34 + ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; 42 35 43 36 # Hack to avoid TMPDIR in RPATHs. 44 37 preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
+64
pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch
··· 1 + Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp 2 + =================================================================== 3 + --- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginPackageQt.cpp 4 + +++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp 5 + @@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* modu 6 + } 7 + } 8 + 9 + +#ifdef NIXPKGS_LIBGTK2 10 + + QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0); 11 + +#else 12 + QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); 13 + +#endif 14 + if (library.load()) { 15 + typedef void *(*gtk_init_check_ptr)(int*, char***); 16 + gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); 17 + Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp 18 + =================================================================== 19 + --- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginViewQt.cpp 20 + +++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp 21 + @@ -697,7 +697,11 @@ static Display *getPluginDisplay() 22 + // support gdk based plugins (like flash) that use a different X connection. 23 + // The code below has the same effect as this one: 24 + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); 25 + +#ifdef NIXPKGS_LIBGDK2 26 + + QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); 27 + +#else 28 + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); 29 + +#endif 30 + if (!library.load()) 31 + return 0; 32 + 33 + Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 34 + =================================================================== 35 + --- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 36 + +++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 37 + @@ -64,7 +64,11 @@ static Display* getPluginDisplay() 38 + // The code below has the same effect as this one: 39 + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); 40 + 41 + +#ifdef NIXPKGS_LIBGDK2 42 + + QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); 43 + +#else 44 + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); 45 + +#endif 46 + if (!library.load()) 47 + return 0; 48 + 49 + Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 50 + =================================================================== 51 + --- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 52 + +++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp 53 + @@ -53,7 +53,11 @@ static void messageHandler(QtMsgType typ 54 + 55 + static bool initializeGtk() 56 + { 57 + +#ifdef NIXPKGS_LIBGTK2 58 + + QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0); 59 + +#else 60 + QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); 61 + +#endif 62 + if (!gtkLibrary.load()) 63 + return false; 64 + typedef void* (*gtk_init_ptr)(void*, void*);
pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch

This is a binary file and will not be displayed.

+3
pkgs/development/libraries/qt-5/5.8/qtwebkit/series
··· 1 + qtwebkit-dlopen-gtk.patch 2 + qtwebkit-dlopen-udev.patch 3 + qtwebkit-icucore-darwin.patch