mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-26 23:27:29 +03:00
qt58.qtwebkit: use QLatin1String instead of QStringLiteral
This commit is contained in:
parent
b1dcd271d1
commit
c546c26e3a
@ -1,53 +0,0 @@
|
|||||||
From 862ce7d357a3ec32683ac6ec7c0ebdc9346b44ba Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 6a407d30357c2551abceac75c82f4a1688e47437 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 864020dd47c3b6d532d9f26b82185904cf9324f2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
|||||||
{ qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors
|
{ qtSubmodule, stdenv, copyPathsToStore, lib
|
||||||
|
, qtdeclarative, qtlocation, qtsensors
|
||||||
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
||||||
, sqlite, systemd, glib, gst_all_1
|
, sqlite, systemd, glib, gst_all_1
|
||||||
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
||||||
@ -7,7 +8,7 @@
|
|||||||
, flashplayerFix ? false
|
, flashplayerFix ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
let inherit (lib) optional optionals getLib; in
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtwebkit";
|
name = "qtwebkit";
|
||||||
@ -22,23 +23,15 @@ qtSubmodule {
|
|||||||
"/usr/lib/libicucore.dylib"
|
"/usr/lib/libicucore.dylib"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches =
|
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||||
let dlopen-webkit-nsplugin = substituteAll {
|
|
||||||
src = ./0001-dlopen-webkit-nsplugin.patch;
|
NIX_CFLAGS_COMPILE =
|
||||||
gtk = gtk2.out;
|
optionals flashplayerFix
|
||||||
gdk_pixbuf = gdk_pixbuf.out;
|
[
|
||||||
};
|
''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"''
|
||||||
dlopen-webkit-gtk = substituteAll {
|
''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"''
|
||||||
src = ./0002-dlopen-webkit-gtk.patch;
|
]
|
||||||
gtk = gtk2.out;
|
++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
|
||||||
};
|
|
||||||
dlopen-webkit-udev = substituteAll {
|
|
||||||
src = ./0003-dlopen-webkit-udev.patch;
|
|
||||||
libudev = systemd.lib;
|
|
||||||
};
|
|
||||||
in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ]
|
|
||||||
++ optionals (!stdenv.isDarwin) [ dlopen-webkit-udev ]
|
|
||||||
++ optionals (stdenv.isDarwin) [ ./0004-icucore-darwin.patch ];
|
|
||||||
|
|
||||||
# Hack to avoid TMPDIR in RPATHs.
|
# Hack to avoid TMPDIR in RPATHs.
|
||||||
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
|
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
===================================================================
|
||||||
|
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
+++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp
|
||||||
|
@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* modu
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
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");
|
||||||
|
Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
===================================================================
|
||||||
|
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
+++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp
|
||||||
|
@@ -697,7 +697,11 @@ 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());
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
===================================================================
|
||||||
|
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
+++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
|
||||||
|
@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
|
||||||
|
// The code below has the same effect as this one:
|
||||||
|
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
|
||||||
|
|
||||||
|
+#ifdef NIXPKGS_LIBGDK2
|
||||||
|
+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!library.load())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
===================================================================
|
||||||
|
--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
+++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
|
||||||
|
@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType typ
|
||||||
|
|
||||||
|
static bool initializeGtk()
|
||||||
|
{
|
||||||
|
+#ifdef NIXPKGS_LIBGTK2
|
||||||
|
+ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
|
||||||
|
+#else
|
||||||
|
QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
|
||||||
|
+#endif
|
||||||
|
if (!gtkLibrary.load())
|
||||||
|
return false;
|
||||||
|
typedef void* (*gtk_init_ptr)(void*, void*);
|
@ -1,6 +1,8 @@
|
|||||||
|
Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
||||||
|
===================================================================
|
||||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri
|
--- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri
|
||||||
+++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
+++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
||||||
@@ -12,7 +12,7 @@
|
@@ -12,7 +12,7 @@ mac {
|
||||||
# Mac OS does ship libicu but not the associated header files.
|
# Mac OS does ship libicu but not the associated header files.
|
||||||
# Therefore WebKit provides adequate header files.
|
# Therefore WebKit provides adequate header files.
|
||||||
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
3
pkgs/development/libraries/qt-5/5.8/qtwebkit/series
Normal file
3
pkgs/development/libraries/qt-5/5.8/qtwebkit/series
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
qtwebkit-dlopen-gtk.patch
|
||||||
|
qtwebkit-dlopen-udev.patch
|
||||||
|
qtwebkit-icucore-darwin.patch
|
Loading…
Reference in New Issue
Block a user