lol

qt56.qtwebkit: use QLatin1String instead of QStringLiteral

+104 -23
+3 -3
pkgs/development/libraries/qt-5/5.6/qtwebkit/0003-dlopen-webkit-udev.patch
··· 11 11 index 60ff317..da8ac69 100644 12 12 --- a/Source/WebCore/platform/qt/GamepadsQt.cpp 13 13 +++ b/Source/WebCore/platform/qt/GamepadsQt.cpp 14 - @@ -111,12 +111,12 @@ private: 14 + @@ -111,13 +111,12 @@ private: 15 15 bool load() 16 16 { 17 17 m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); 18 18 - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); 19 - + m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); 19 + + m_libUdev.setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); 20 20 m_loaded = m_libUdev.load(); 21 21 if (resolveMethods()) 22 22 return true; 23 23 24 24 - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); 25 - + m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); 25 + + m_libUdev.setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); 26 26 m_loaded = m_libUdev.load(); 27 27 return resolveMethods(); 28 28 }
+21 -20
pkgs/development/libraries/qt-5/5.6/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 6 + , darwin 5 7 , substituteAll 6 8 , flashplayerFix ? false 7 9 }: 8 10 9 - with stdenv.lib; 11 + let inherit (lib) optional optionals getLib; in 10 12 11 13 qtSubmodule { 12 14 name = "qtwebkit"; 13 15 qtInputs = [ qtdeclarative qtlocation qtsensors ]; 14 - buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]; 16 + buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ] 17 + ++ optionals (stdenv.isDarwin) (with darwin.apple_sdk.frameworks; [ OpenGL ]); 15 18 nativeBuildInputs = [ 16 19 bison2 flex gdb gperf perl pkgconfig python2 ruby 17 20 ]; 18 - patches = 19 - let dlopen-webkit-nsplugin = substituteAll { 20 - src = ./0001-dlopen-webkit-nsplugin.patch; 21 - gtk = gtk2.out; 22 - gdk_pixbuf = gdk_pixbuf.out; 23 - }; 24 - dlopen-webkit-gtk = substituteAll { 25 - src = ./0002-dlopen-webkit-gtk.patch; 26 - gtk = gtk2.out; 27 - }; 28 - dlopen-webkit-udev = substituteAll { 29 - src = ./0003-dlopen-webkit-udev.patch; 30 - libudev = systemd.lib; 31 - }; 32 - in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] 33 - ++ [ dlopen-webkit-udev ]; 21 + 22 + __impureHostDeps = optionals (stdenv.isDarwin) [ 23 + "/usr/lib/libicucore.dylib" 24 + ]; 25 + 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"''; 34 35 35 36 # Hack to avoid TMPDIR in RPATHs. 36 37 preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; 37 38 38 - meta.maintainers = with stdenv.lib.maintainers; [ abbradar ]; 39 + meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ]; 39 40 }
+64
pkgs/development/libraries/qt-5/5.6/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.6/qtwebkit/qtwebkit-dlopen-udev.patch

This is a binary file and will not be displayed.

+13
pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icucore-darwin.patch
··· 1 + Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri 2 + =================================================================== 3 + --- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri 4 + +++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri 5 + @@ -12,7 +12,7 @@ mac { 6 + # Mac OS does ship libicu but not the associated header files. 7 + # Therefore WebKit provides adequate header files. 8 + INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH 9 + - LIBS += -licucore 10 + + LIBS += /usr/lib/libicucore.dylib 11 + } else:!use?(wchar_unicode): { 12 + win32 { 13 + CONFIG(static, static|shared) {
+3
pkgs/development/libraries/qt-5/5.6/qtwebkit/series
··· 1 + qtwebkit-dlopen-gtk.patch 2 + qtwebkit-dlopen-udev.patch 3 + qtwebkit-icucore-darwin.patch