diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-05-16 03:39:27 -0400 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2021-05-23 01:26:33 -0400 |
commit | 61e49ba58b487b49832028a1829f50fd2abcab06 (patch) | |
tree | f2bb42b808a032a033e17bcf9014f08aee4ca6f5 /pkgs/development/libraries/webkitgtk | |
parent | c4ff610b31f5c08af749bc2e4fe5d10d43bdce8c (diff) |
webkitgtk: fix on darwin
Diffstat (limited to 'pkgs/development/libraries/webkitgtk')
-rw-r--r-- | pkgs/development/libraries/webkitgtk/428774.patch | 86 | ||||
-rw-r--r-- | pkgs/development/libraries/webkitgtk/default.nix | 36 |
2 files changed, 122 insertions, 0 deletions
diff --git a/pkgs/development/libraries/webkitgtk/428774.patch b/pkgs/development/libraries/webkitgtk/428774.patch new file mode 100644 index 0000000000000..85da185dc4e42 --- /dev/null +++ b/pkgs/development/libraries/webkitgtk/428774.patch @@ -0,0 +1,86 @@ +diff -aru a/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp b/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp +--- a/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp 2021-05-16 14:45:32.000000000 -0400 +@@ -87,7 +87,7 @@ + if (!m_store.createSharedMemoryHandle(handle)) + return; + +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + uint64_t dataSize = handle.size(); + #else + uint64_t dataSize = 0; +diff -aru a/Source/WebKit/Platform/IPC/IPCSemaphore.cpp b/Source/WebKit/Platform/IPC/IPCSemaphore.cpp +--- a/Source/WebKit/Platform/IPC/IPCSemaphore.cpp 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/IPC/IPCSemaphore.cpp 2021-05-16 15:54:53.000000000 -0400 +@@ -26,8 +26,6 @@ + #include "config.h" + #include "IPCSemaphore.h" + +-#if !OS(DARWIN) +- + namespace IPC { + + Semaphore::Semaphore() = default; +@@ -46,5 +44,3 @@ + } + + } +- +-#endif +diff -aru a/Source/WebKit/Platform/IPC/IPCSemaphore.h b/Source/WebKit/Platform/IPC/IPCSemaphore.h +--- a/Source/WebKit/Platform/IPC/IPCSemaphore.h 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/IPC/IPCSemaphore.h 2021-05-16 14:46:13.000000000 -0400 +@@ -29,7 +29,7 @@ + #include <wtf/Optional.h> + #include <wtf/Seconds.h> + +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + #include <mach/semaphore.h> + #include <wtf/MachSendRight.h> + #endif +@@ -51,7 +51,7 @@ + void encode(Encoder&) const; + static Optional<Semaphore> decode(Decoder&); + +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + explicit Semaphore(MachSendRight&&); + + void signal(); +@@ -64,7 +64,7 @@ + #endif + + private: +-#if OS(DARWIN) ++#if PLATFORM(COCOA) + void destroy(); + MachSendRight m_sendRight; + semaphore_t m_semaphore { SEMAPHORE_NULL }; +Only in b/Source/WebKit/Platform/IPC: IPCSemaphore.h.orig +diff -aru a/Source/WebKit/Platform/SharedMemory.h b/Source/WebKit/Platform/SharedMemory.h +--- a/Source/WebKit/Platform/SharedMemory.h 2021-02-26 04:57:15.000000000 -0500 ++++ b/Source/WebKit/Platform/SharedMemory.h 2021-05-16 14:45:32.000000000 -0400 +@@ -75,7 +75,7 @@ + + bool isNull() const; + +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + size_t size() const { return m_size; } + #endif + +diff -aru a/Source/WebKit/UIProcess/VisitedLinkStore.cpp b/Source/WebKit/UIProcess/VisitedLinkStore.cpp +--- a/Source/WebKit/UIProcess/VisitedLinkStore.cpp 2021-02-26 04:57:16.000000000 -0500 ++++ b/Source/WebKit/UIProcess/VisitedLinkStore.cpp 2021-05-16 14:45:32.000000000 -0400 +@@ -119,7 +119,7 @@ + return; + + // FIXME: Get the actual size of data being sent from m_linkHashStore and send it in the SharedMemory::IPCHandle object. +-#if OS(DARWIN) || OS(WINDOWS) ++#if (OS(DARWIN) || OS(WINDOWS)) && !USE(UNIX_DOMAIN_SOCKETS) + uint64_t dataSize = handle.size(); + #else + uint64_t dataSize = 0; +Only in b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics: DrawingAreaCoordinatedGraphics.cpp.orig diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index f37ba500a2278..40f51d6f48a3f 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -1,5 +1,7 @@ { lib, stdenv +, runCommandNoCC , fetchurl +, fetchpatch , perl , python3 , ruby @@ -34,6 +36,7 @@ , libidn , libedit , readline +, sdk , libGL , libGLU , mesa @@ -78,6 +81,32 @@ stdenv.mkDerivation rec { inherit (addOpenGLRunpath) driverLink; }) ./libglvnd-headers.patch + ] ++ lib.optionals stdenv.isDarwin [ + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/94cdcd289b993ed4d39c17d4b8b90db7c81a9b10.diff"; + sha256 = "sha256-ywrTEjf3ATqI0Vvs60TeAZ+m58kCibum4DamRWrQfaA="; + excludes = [ "Source/WebKit/ChangeLog" ]; + }) + + # https://bugs.webkit.org/show_bug.cgi?id=225856 + (fetchpatch { + url = "https://bug-225856-attachments.webkit.org/attachment.cgi?id=428797"; + sha256 = "sha256-ffo5p2EyyjXe3DxdrvAcDKqxwnoqHtYBtWod+1fOjMU="; + excludes = [ "Source/WebCore/ChangeLog" ]; + }) + + # https://bugs.webkit.org/show_bug.cgi?id=225850 + ./428774.patch # https://bug-225850-attachments.webkit.org/attachment.cgi?id=428774 + (fetchpatch { + url = "https://bug-225850-attachments.webkit.org/attachment.cgi?id=428776"; + sha256 = "sha256-ryNRYMsk72SL0lNdh6eaAdDV3OT8KEqVq1H0j581jmQ="; + excludes = [ "Source/WTF/ChangeLog" ]; + }) + (fetchpatch { + url = "https://bug-225850-attachments.webkit.org/attachment.cgi?id=428778"; + sha256 = "sha256-78iP+T2vaIufO8TmIPO/tNDgmBgzlDzalklrOPrtUeo="; + excludes = [ "Source/WebKit/ChangeLog" ]; + }) ]; preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' @@ -96,6 +125,7 @@ stdenv.mkDerivation rec { gperf ninja perl + perl.pkgs.FileCopyRecursive # used by copy-user-interface-resources.pl pkg-config python3 ruby @@ -143,6 +173,12 @@ stdenv.mkDerivation rec { ]) ++ lib.optionals stdenv.isDarwin [ libedit readline + # Pull a header that contains a definition of proc_pid_rusage(). + # (We pick just that one because using the other headers from `sdk` is not + # compatible with our C++ standard library) + (runCommandNoCC "${pname}_headers" {} '' + install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h + '') ] ++ lib.optionals stdenv.isLinux [ bubblewrap libseccomp |