summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/webkitgtk4/Makefile127
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_jsc_cpp11
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h56
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h.orig128
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h2
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h.orig18
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_Platform_IPC_ArgumentCoders_h115
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk-web-extension_pc_in10
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk_pc_in10
10 files changed, 252 insertions, 237 deletions
diff --git a/www/webkitgtk4/Makefile b/www/webkitgtk4/Makefile
index cb3a020..ae22d49 100644
--- a/www/webkitgtk4/Makefile
+++ b/www/webkitgtk4/Makefile
@@ -10,7 +10,7 @@ BROKEN-arm = JavaScriptCore/runtime/MachineContext.h, various sigcontext-relate
10 10
11PORTROACH = limitw:1,even 11PORTROACH = limitw:1,even
12 12
13COMMENT = GTK+ port of the WebKit (${API}) rendering engine 13COMMENT = GTK+ port of the WebKit (4.0) rendering engine
14 14
15V = 2.42.5 15V = 2.42.5
16DISTNAME = webkitgtk-${V} 16DISTNAME = webkitgtk-${V}
@@ -33,20 +33,20 @@ HOMEPAGE = https://webkitgtk.org/
33 33
34MAINTAINER = Antoine Jacoutot <ajacoutot@openbsd.org> 34MAINTAINER = Antoine Jacoutot <ajacoutot@openbsd.org>
35 35
36
36# LGPLv2 and BSD 37# LGPLv2 and BSD
37PERMIT_PACKAGE = Yes 38PERMIT_PACKAGE = Yes
38 39
39WANTLIB += ${COMPILER_LIBCXX} WPEBackend-fdo-1.0 X11 Xcomposite 40WANTLIB += ${COMPILER_LIBCXX} X11 Xcomposite
40WANTLIB += Xdamage Xrender Xt avif c cairo cairo-gobject drm enchant-2 41WANTLIB += Xdamage Xrender Xt c cairo cairo-gobject drm
41WANTLIB += epoll-shim epoxy fontconfig freetype gbm gcrypt gdk_pixbuf-2.0 42WANTLIB += epoll-shim epoxy fontconfig freetype gcrypt gdk_pixbuf-2.0
42WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error 43WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gpg-error
43WANTLIB += gstallocators-1.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 44WANTLIB += gstallocators-1.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0
44WANTLIB += gstfft-1.0 gstgl-1.0 gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 45WANTLIB += gstfft-1.0 gstgl-1.0 gstpbutils-1.0 gstreamer-1.0 gsttag-1.0
45WANTLIB += gsttranscoder-1.0 gstvideo-1.0 harfbuzz harfbuzz-icu 46WANTLIB += gsttranscoder-1.0 gstvideo-1.0 harfbuzz harfbuzz-icu
46WANTLIB += hyphen icudata icui18n icuuc intl jpeg jxl lcms2 m 47WANTLIB += icudata icui18n icuuc intl jpeg m
47WANTLIB += openjp2 pango-1.0 pangocairo-1.0 png secret-1 sqlite3 48WANTLIB += openjp2 pango-1.0 pangocairo-1.0 png sqlite3
48WANTLIB += tasn1 wayland-client wayland-egl wayland-server webp 49WANTLIB += tasn1 xml2 z gdk-3 gtk-3 soup-2.4
49WANTLIB += webpdemux woff2dec wpe-1.0 xml2 xslt z
50 50
51SITES = https://webkitgtk.org/releases/ 51SITES = https://webkitgtk.org/releases/
52 52
@@ -57,7 +57,6 @@ MODULES = devel/cmake \
57 lang/ruby \ 57 lang/ruby \
58 x11/gnome 58 x11/gnome
59 59
60MODGNOME_TOOLS = gi-docgen gobject-introspection
61MODPY_RUNDEP = No 60MODPY_RUNDEP = No
62MODRUBY_RUNDEP = No 61MODRUBY_RUNDEP = No
63 62
@@ -67,52 +66,64 @@ NO_TEST = Yes
67 66
68BUILD_DEPENDS = devel/bison \ 67BUILD_DEPENDS = devel/bison \
69 devel/gettext,-tools \ 68 devel/gettext,-tools \
70 devel/gperf \ 69 devel/gperf
71 geo/geoclue2 \ 70
72 wayland/wayland-protocols 71RUN_DEPENDS = multimedia/gstreamer1/plugins-good
73 72
74RUN_DEPENDS = geo/geoclue2 \ 73LIB_DEPENDS = devel/harfbuzz,-icu \
75 multimedia/gstreamer1/plugins-good 74 devel/libsoup \
76
77LIB_DEPENDS = archivers/woff2 \
78 devel/harfbuzz,-icu \
79 graphics/libavif \
80 graphics/libjxl \
81 graphics/libwebp \
82 graphics/openjp2 \ 75 graphics/openjp2 \
83 multimedia/gstreamer1/plugins-base \ 76 multimedia/gstreamer1/plugins-base \
84 multimedia/gstreamer1/plugins-bad \ 77 multimedia/gstreamer1/plugins-bad \
85 textproc/enchant2 \ 78 x11/gtk+3
86 textproc/hyphen \
87 textproc/libxslt \
88 www/wpebackend-fdo \
89 x11/gnome/libsecret
90 79
91CONFIGURE_ENV = WK_USE_CCACHE=NO 80CONFIGURE_ENV = WK_USE_CCACHE=NO
92CONFIGURE_ARGS = -DPORT=GTK \ 81CONFIGURE_ARGS = -DPORT=GTK \
93 -DENABLE_MINIBROWSER=ON \ 82 -DENABLE_3D_TRANSFORMS=OFF \
94 -DENABLE_JOURNALD_LOG=OFF 83 -DENABLE_ACCESSIBILITY=OFF \
95 84 -DENABLE_DARK_MODE_CSS=ON \
96# until proven useful 85 -DENABLE_DOCUMENTATION=OFF \
97# see defaults in Source/WTF/wtf/PlatformEnable.h 86 -DENABLE_GAMEPAD=OFF \
98#CONFIGURE_ARGS += -DENABLE_WEBASSEMBLY=ON 87 -DENABLE_GEOLOCATION=OFF \
99#CONFIGURE_ARGS += -DENABLE_WEBASSEMBLY_B3JIT=ON 88 -DENABLE_INTROSPECTION=OFF \
89 -DENABLE_JOURNALD_LOG=OFF \
90 -DENABLE_MANAGED_MEDIA_SOURCE=ON \
91 -DENABLE_MATHML=ON \
92 -DENABLE_MINIBROWSER=OFF \
93 -DENABLE_MODERN_MEDIA_CONTROLS=OFF \
94 -DENABLE_JOURNALD_LOG=OFF \
95 -DENABLE_PDFJS=OFF \
96 -DENABLE_QUARTZ_TARGET=OFF \
97 -DENABLE_REMOTE_INSPECTOR=OFF \
98 -DENABLE_SMOOTH_SCROLLING=OFF \
99 -DENABLE_SPELLCHECK=OFF \
100 -DENABLE_WAYLAND_TARGET=OFF \
101 -DENABLE_WEBASSEMBLY=OFF \
102 -DENABLE_WEBDRIVER=OFF \
103 -DENABLE_WEBP=OFF \
104 -DENABLE_WEBGL=OFF \
105 -DENABLE_WEBINSPECTORUI=ON \
106 -DENABLE_XSLT=OFF \
107 -DUSE_ATSPI=OFF \
108 -DUSE_AVIF=OFF \
109 -DUSE_GBM=OFF \
110 -DUSE_GSTREAMER_TRANSCODER=OFF \
111 -DUSE_GTK4=OFF \
112 -DUSE_LCMS=OFF \
113 -DUSE_JPEGXL=OFF \
114 -DUSE_LIBEPOXY=ON \
115 -DUSE_LIBHYPHEN=OFF \
116 -DUSE_LIBSECRET=OFF \
117 -DUSE_LIBWEBRTC=OFF \
118 -DUSE_SOUP2=ON \
119 -DUSE_THEME_ADWAITA=OFF \
120 -DUSE_WPE_RENDERER=OFF \
121 -DUSE_WOFF2=OFF \
122 -DUSER_AGENT_BRANDING=""
100 123
101# XXX broken at runtime 124# XXX broken at runtime
102#CONFIGURE_ARGS += -DUSE_SYSTEM_MALLOC=ON 125#CONFIGURE_ARGS += -DUSE_SYSTEM_MALLOC=ON
103 126
104# required for faking a better user-agent
105.if ${MACHINE_ARCH} == "amd64"
106CPUARCH = x86_64
107.else
108CPUARCH = ${ARCH}
109.endif
110#XXXTODO CONFIGURE_ARGS += -DUSER_AGENT_BRANDING="Linux ${CPUARCH}; OpenBSD ${ARCH}"
111CONFIGURE_ARGS += -DUSER_AGENT_BRANDING="Linux ${CPUARCH}"
112
113# Needs GUdev
114CONFIGURE_ARGS += -DENABLE_GAMEPAD=OFF
115
116# sync with Source/JavaScriptCore/assembler/MacroAssembler.h 127# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
117.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \ 128.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
118 ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \ 129 ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
@@ -157,32 +168,6 @@ LDFLAGS += -Wl,--no-keep-memory
157DPB_PROPERTIES = parallel parallel2 lonesome 168DPB_PROPERTIES = parallel parallel2 lonesome
158.endif 169.endif
159 170
160FLAVORS = webkitgtk41 webkitgtk60
161FLAVOR ?=
162
163.if ${FLAVOR:Mwebkitgtk41}
164API = 4.1
165WANTLIB += atk-1.0 gdk-3 gtk-3 soup-3.0
166LIB_DEPENDS += devel/libsoup3 \
167 x11/gtk+3
168CONFIGURE_ARGS += -DUSE_SOUP2=OFF \
169 -DENABLE_WEBDRIVER=OFF
170.elif ${FLAVOR:Mwebkitgtk60}
171API = 6.0
172WANTLIB += graphene-1.0 gtk-4 soup-3.0
173LIB_DEPENDS += devel/libsoup3 \
174 x11/gtk+4
175CONFIGURE_ARGS += -DUSE_SOUP2=OFF \
176 -DUSE_GTK4=ON
177.else
178API = 4.0
179WANTLIB += atk-1.0 gdk-3 gtk-3 soup-2.4
180LIB_DEPENDS += devel/libsoup \
181 x11/gtk+3
182CONFIGURE_ARGS += -DUSE_SOUP2=ON \
183 -DENABLE_WEBDRIVER=OFF
184.endif
185
186post-extract: 171post-extract:
187 ln -sf ${RUBY} ${WRKDIR}/bin/ruby 172 ln -sf ${RUBY} ${WRKDIR}/bin/ruby
188 173
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_jsc_cpp b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_jsc_cpp
deleted file mode 100644
index 679d2bb..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_jsc_cpp
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: Source/JavaScriptCore/jsc.cpp
2--- Source/JavaScriptCore/jsc.cpp.orig
3+++ Source/JavaScriptCore/jsc.cpp
4@@ -78,6 +78,7 @@
5 #include "WasmCapabilities.h"
6 #include "WasmFaultSignalHandler.h"
7 #include "WasmMemory.h"
8+#include <locale.h> /* LC_ALL */
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h
index a08d371..695ab2e 100644
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h
+++ b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h
@@ -76,35 +76,53 @@ Index: Source/JavaScriptCore/runtime/MachineContext.h
76 #elif OS(FUCHSIA) || OS(LINUX) 76 #elif OS(FUCHSIA) || OS(LINUX)
77 77
78 // The following sequence depends on glibc's sys/ucontext.h. 78 // The following sequence depends on glibc's sys/ucontext.h.
79@@ -652,6 +706,24 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo 79@@ -771,6 +825,42 @@ inline void*& llintInstructionPointer(mcontext_t& mach
80 #error Unknown Architecture 80 #error Unknown Architecture
81 #endif 81 #endif
82 82
83+#elif OS(OPENBSD) 83+#elif OS(OPENBSD)
84+ 84+
85+#if CPU(X86) 85+#if CPU(X86)
86+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_edx); 86+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi);
87+#elif CPU(X86_64) 87+#elif CPU(X86_64)
88+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsi); 88+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8);
89+#elif CPU(ARM) 89+#elif CPU(ARM)
90+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]); 90+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
91+#elif CPU(ARM64) 91+#elif CPU(ARM64)
92+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[1]); 92+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]);
93+#elif CPU(MIPS) 93+#elif CPU(MIPS)
94+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[5]); 94+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
95+#elif CPU(RISCV64) 95+#elif CPU(RISCV64)
96+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[1]); 96+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[3]);
97+#else 97+#else
98+#error Unknown Architecture 98+#error Unknown Architecture
99+#endif 99+#endif
100+ 100+
101 #elif OS(FUCHSIA) || OS(LINUX) 101+#elif OS(OPENBSD)
102+
103+#if CPU(X86)
104+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi);
105+#elif CPU(X86_64)
106+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8);
107+#elif CPU(ARM)
108+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
109+#elif CPU(ARM64)
110+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]);
111+#elif CPU(MIPS)
112+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
113+#elif CPU(RISCV64)
114+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[3]);
115+#else
116+#error Unknown Architecture
117+#endif
118+
119 #elif OS(NETBSD)
102 120
103 // The following sequence depends on glibc's sys/ucontext.h. 121 #if CPU(X86)
104@@ -767,6 +839,24 @@ inline void*& llintInstructionPointer(mcontext_t& mach 122@@ -783,6 +873,24 @@ inline void*& llintInstructionPointer(mcontext_t& mach
105 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_gpregs.gp_x[4]); 123 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X4]);
106 #elif CPU(MIPS) 124 #elif CPU(MIPS)
107 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]); 125 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_T4]);
108+#else 126+#else
109+#error Unknown Architecture 127+#error Unknown Architecture
110+#endif 128+#endif
@@ -112,17 +130,17 @@ Index: Source/JavaScriptCore/runtime/MachineContext.h
112+#elif OS(OPENBSD) 130+#elif OS(OPENBSD)
113+ 131+
114+#if CPU(X86) 132+#if CPU(X86)
115+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi); 133+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_edx);
116+#elif CPU(X86_64) 134+#elif CPU(X86_64)
117+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8); 135+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsi);
118+#elif CPU(ARM) 136+#elif CPU(ARM)
119+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]); 137+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
120+#elif CPU(ARM64) 138+#elif CPU(ARM64)
121+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]); 139+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[1]);
122+#elif CPU(MIPS) 140+#elif CPU(MIPS)
123+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]); 141+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[5]);
124+#elif CPU(RISCV64) 142+#elif CPU(RISCV64)
125+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[3]); 143+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[1]);
126 #else 144 #else
127 #error Unknown Architecture 145 #error Unknown Architecture
128 #endif 146 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h.orig b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h.orig
new file mode 100644
index 0000000..a08d371
--- /dev/null
+++ b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h.orig
@@ -0,0 +1,128 @@
1Index: Source/JavaScriptCore/runtime/MachineContext.h
2--- Source/JavaScriptCore/runtime/MachineContext.h.orig
3+++ Source/JavaScriptCore/runtime/MachineContext.h
4@@ -193,6 +193,24 @@ static inline void*& stackPointerImpl(mcontext_t& mach
5 #error Unknown Architecture
6 #endif
7
8+#elif OS(OPENBSD)
9+
10+#if CPU(X86)
11+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esp);
12+#elif CPU(X86_64)
13+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsp);
14+#elif CPU(ARM)
15+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
16+#elif CPU(ARM64)
17+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sp);
18+#elif CPU(MIPS)
19+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[29]);
20+#elif CPU(RISCV64)
21+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sp);
22+#else
23+#error Unknown Architecture
24+#endif
25+
26 #elif OS(FUCHSIA) || OS(LINUX)
27
28 #if CPU(X86)
29@@ -338,6 +356,24 @@ static inline void*& framePointerImpl(mcontext_t& mach
30 #error Unknown Architecture
31 #endif
32
33+#elif OS(OPENBSD)
34+
35+#if CPU(X86)
36+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_ebp);
37+#elif CPU(X86_64)
38+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rbp);
39+#elif CPU(ARM)
40+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
41+#elif CPU(ARM64)
42+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[29]);
43+#elif CPU(MIPS)
44+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[30]);
45+#elif CPU(RISCV64)
46+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_s[0]);
47+#else
48+#error Unknown Architecture
49+#endif
50+
51 #elif OS(FUCHSIA) || OS(LINUX)
52
53 // The following sequence depends on glibc's sys/ucontext.h.
54@@ -496,6 +532,24 @@ static inline void*& instructionPointerImpl(mcontext_t
55 #error Unknown Architecture
56 #endif
57
58+#elif OS(OPENBSD)
59+
60+#if CPU(X86)
61+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_eip);
62+#elif CPU(X86_64)
63+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rip);
64+#elif CPU(ARM)
65+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
66+#elif CPU(ARM64)
67+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_elr);
68+#elif CPU(MIPS)
69+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_pc);
70+#elif CPU(RISCV64)
71+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sepc);
72+#else
73+#error Unknown Architecture
74+#endif
75+
76 #elif OS(FUCHSIA) || OS(LINUX)
77
78 // The following sequence depends on glibc's sys/ucontext.h.
79@@ -652,6 +706,24 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo
80 #error Unknown Architecture
81 #endif
82
83+#elif OS(OPENBSD)
84+
85+#if CPU(X86)
86+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_edx);
87+#elif CPU(X86_64)
88+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsi);
89+#elif CPU(ARM)
90+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
91+#elif CPU(ARM64)
92+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[1]);
93+#elif CPU(MIPS)
94+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[5]);
95+#elif CPU(RISCV64)
96+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[1]);
97+#else
98+#error Unknown Architecture
99+#endif
100+
101 #elif OS(FUCHSIA) || OS(LINUX)
102
103 // The following sequence depends on glibc's sys/ucontext.h.
104@@ -767,6 +839,24 @@ inline void*& llintInstructionPointer(mcontext_t& mach
105 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_gpregs.gp_x[4]);
106 #elif CPU(MIPS)
107 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
108+#else
109+#error Unknown Architecture
110+#endif
111+
112+#elif OS(OPENBSD)
113+
114+#if CPU(X86)
115+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi);
116+#elif CPU(X86_64)
117+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8);
118+#elif CPU(ARM)
119+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
120+#elif CPU(ARM64)
121+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]);
122+#elif CPU(MIPS)
123+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
124+#elif CPU(RISCV64)
125+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[3]);
126 #else
127 #error Unknown Architecture
128 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h
index 4be2495..a068735 100644
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h
+++ b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h
@@ -15,4 +15,4 @@ Index: Source/WTF/wtf/PlatformHave.h
15+ 15+
16 #if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS)) 16 #if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS))
17 #define HAVE_BACKTRACE 1 17 #define HAVE_BACKTRACE 1
18 #endif 18 #define HAVE_BACKTRACE_SYMBOLS 1
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h.orig b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h.orig
new file mode 100644
index 0000000..4e7d746
--- /dev/null
+++ b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h.orig
@@ -0,0 +1,18 @@
1Undo parts of upstream commit 6c2615dd66a12e9a10d7867241cc3bedfb2b2473 [0]
2Machine context definitions were only added for Linux.
3[0] https://github.com/WebKit/WebKit/commit/6c2615dd66a12e9a10d7867241cc3bedfb2b2473
4
5Index: Source/WTF/wtf/PlatformHave.h
6--- Source/WTF/wtf/PlatformHave.h.orig
7+++ Source/WTF/wtf/PlatformHave.h
8@@ -241,6 +241,10 @@
9 #undef HAVE_MACHINE_CONTEXT
10 #endif
11
12+#if OS(OPENBSD) && CPU(RISCV64)
13+#undef HAVE_MACHINE_CONTEXT
14+#endif
15+
16 #if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS))
17 #define HAVE_BACKTRACE 1
18 #define HAVE_BACKTRACE_SYMBOLS 1
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h
new file mode 100644
index 0000000..cade9db
--- /dev/null
+++ b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h
@@ -0,0 +1,12 @@
1Index: Source/WTF/wtf/PlatformUse.h
2--- Source/WTF/wtf/PlatformUse.h.orig
3+++ Source/WTF/wtf/PlatformUse.h
4@@ -83,7 +83,7 @@
5 #endif
6
7 #if PLATFORM(GTK) || PLATFORM(WPE)
8-#define USE_WEBP 1
9+#define USE_WEBP 0
10 #endif
11
12 #if PLATFORM(COCOA)
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_Platform_IPC_ArgumentCoders_h b/www/webkitgtk4/patches/patch-Source_WebKit_Platform_IPC_ArgumentCoders_h
deleted file mode 100644
index c564b39..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_Platform_IPC_ArgumentCoders_h
+++ /dev/null
@@ -1,115 +0,0 @@
1https://bugs.webkit.org/show_bug.cgi?id=245044
2REVERT:
3From: "zan@falconsigh.net" <zan@falconsigh.net@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
4Date: Tue, 12 Apr 2022 06:30:51 +0000
5Subject: [PATCH] [WK2] Simplify IPC encoding, decoding of tuples https://bugs.webkit.org/show_bug.cgi?id=239062
6
7Index: Source/WebKit/Platform/IPC/ArgumentCoders.h
8--- Source/WebKit/Platform/IPC/ArgumentCoders.h.orig
9+++ Source/WebKit/Platform/IPC/ArgumentCoders.h
10@@ -495,26 +495,38 @@ template<typename T> struct ArgumentCoder<Ref<T>> {
11 }
12 };
13
14-template<typename... Elements>
15+template<size_t index, typename... Elements>
16 struct TupleEncoder {
17 template<typename Encoder>
18 static void encode(Encoder& encoder, const std::tuple<Elements...>& tuple)
19 {
20- encode(encoder, tuple, std::index_sequence_for<Elements...> { });
21+ encoder << std::get<sizeof...(Elements) - index>(tuple);
22+ TupleEncoder<index - 1, Elements...>::encode(encoder, tuple);
23 }
24+};
25
26- template<typename Encoder, size_t... Indices>
27- static void encode(Encoder& encoder, const std::tuple<Elements...>& tuple, std::index_sequence<Indices...>)
28+template<typename... Elements>
29+struct TupleEncoder<0, Elements...> {
30+ template<typename Encoder>
31+ static void encode(Encoder&, const std::tuple<Elements...>&)
32 {
33- if constexpr (sizeof...(Indices) > 0)
34- (encoder << ... << std::get<Indices>(tuple));
35 }
36 };
37
38-template<typename... Elements> struct TupleDecoder;
39+template <typename T, typename... Elements, size_t... Indices>
40+auto tupleFromTupleAndObject(T&& object, std::tuple<Elements...>&& tuple, std::index_sequence<Indices...>)
41+{
42+ return std::make_tuple(WTFMove(object), WTFMove(std::get<Indices>(tuple))...);
43+}
44
45+template <typename T, typename... Elements>
46+auto tupleFromTupleAndObject(T&& object, std::tuple<Elements...>&& tuple)
47+{
48+ return tupleFromTupleAndObject(WTFMove(object), WTFMove(tuple), std::index_sequence_for<Elements...>());
49+}
50+
51 template<typename Type, typename... Types>
52-struct TupleDecoder<Type, Types...> {
53+struct TupleDecoderImpl {
54 template<typename Decoder>
55 static std::optional<std::tuple<Type, Types...>> decode(Decoder& decoder)
56 {
57@@ -523,16 +535,38 @@ struct TupleDecoder<Type, Types...> {
58 if (!optional)
59 return std::nullopt;
60
61- std::optional<std::tuple<Types...>> remainder = TupleDecoder<Types...>::decode(decoder);
62- if (!remainder)
63+ std::optional<std::tuple<Types...>> subTuple = TupleDecoderImpl<Types...>::decode(decoder);
64+ if (!subTuple)
65 return std::nullopt;
66
67- return std::tuple_cat(std::make_tuple(WTFMove(*optional)), WTFMove(*remainder));
68+ return tupleFromTupleAndObject(WTFMove(*optional), WTFMove(*subTuple));
69 }
70 };
71
72+template<typename Type>
73+struct TupleDecoderImpl<Type> {
74+ template<typename Decoder>
75+ static std::optional<std::tuple<Type>> decode(Decoder& decoder)
76+ {
77+ std::optional<Type> optional;
78+ decoder >> optional;
79+ if (!optional)
80+ return std::nullopt;
81+ return std::make_tuple(WTFMove(*optional));
82+ }
83+};
84+
85+template<size_t size, typename... Elements>
86+struct TupleDecoder {
87+ template<typename Decoder>
88+ static std::optional<std::tuple<Elements...>> decode(Decoder& decoder)
89+ {
90+ return TupleDecoderImpl<Elements...>::decode(decoder);
91+ }
92+};
93+
94 template<>
95-struct TupleDecoder<> {
96+struct TupleDecoder<0> {
97 template<typename Decoder>
98 static std::optional<std::tuple<>> decode(Decoder&)
99 {
100@@ -544,13 +578,13 @@ template<typename... Elements> struct ArgumentCoder<st
101 template<typename Encoder>
102 static void encode(Encoder& encoder, const std::tuple<Elements...>& tuple)
103 {
104- TupleEncoder<Elements...>::encode(encoder, tuple);
105+ TupleEncoder<sizeof...(Elements), Elements...>::encode(encoder, tuple);
106 }
107
108 template<typename Decoder>
109 static std::optional<std::tuple<Elements...>> decode(Decoder& decoder)
110 {
111- return TupleDecoder<Elements...>::decode(decoder);
112+ return TupleDecoder<sizeof...(Elements), Elements...>::decode(decoder);
113 }
114 };
115
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk-web-extension_pc_in b/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk-web-extension_pc_in
deleted file mode 100644
index f3426ac..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk-web-extension_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
1Index: Source/WebKit/gtk/webkit2gtk-web-extension.pc.in
2--- Source/WebKit/gtk/webkit2gtk-web-extension.pc.in.orig
3+++ Source/WebKit/gtk/webkit2gtk-web-extension.pc.in
4@@ -9,5 +9,5 @@ Description: Web content engine for GTK - web process
5 URL: https://webkitgtk.org
6 Version: @PROJECT_VERSION@
7 Requires: glib-2.0 @GTK_PC_NAME@ libsoup-@SOUP_API_VERSION@ javascriptcoregtk-@WEBKITGTK_API_VERSION@
8-Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@
9+Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
10 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk_pc_in b/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk_pc_in
deleted file mode 100644
index 563d209..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkit2gtk_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
1Index: Source/WebKit/gtk/webkit2gtk.pc.in
2--- Source/WebKit/gtk/webkit2gtk.pc.in.orig
3+++ Source/WebKit/gtk/webkit2gtk.pc.in
4@@ -9,5 +9,5 @@ Description: Web content engine for GTK
5 URL: https://webkitgtk.org
6 Version: @PROJECT_VERSION@
7 Requires: glib-2.0 @GTK_PC_NAME@ libsoup-@SOUP_API_VERSION@ javascriptcoregtk-@WEBKITGTK_API_VERSION@
8-Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@
9+Libs: -L${libdir} -lwebkit2gtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
10 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@