summaryrefslogtreecommitdiff
path: root/www/webkitgtk4/patches
diff options
context:
space:
mode:
Diffstat (limited to 'www/webkitgtk4/patches')
-rw-r--r--www/webkitgtk4/patches/CVS/Entries40
-rw-r--r--www/webkitgtk4/patches/CVS/Repository1
-rw-r--r--www/webkitgtk4/patches/CVS/Root1
-rw-r--r--www/webkitgtk4/patches/CVS/Tag1
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_API_glib_JSCOptions_cpp36
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h19
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_RISCV64Assembler_h55
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_heap_BlockDirectory_cpp14
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in10
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_cpp14
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_offlineasm_arm64_rb12
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h383
-rw-r--r--www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_Options_cpp25
-rw-r--r--www/webkitgtk4/patches/patch-Source_ThirdParty_ANGLE_src_common_platform_h20
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_InlineASM_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PageBlock_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformCPU_h28
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformEnable_h23
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h18
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_Platform_h13
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_RawHex_h21
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_dtoa_utils_h12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp15
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_CMakeLists_txt14
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_PAL_pal_PlatformGTK_cmake18
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM_cpp16
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_page_NavigatorBase_cpp21
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_platform_graphics_FontSelectionAlgorithm_h30
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_platform_network_DNS_h11
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebCore_rendering_RenderLayerBacking_h16
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebDriver_PlatformGTK_cmake17
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_Launcher_glib_ProcessLauncherGLib_cpp15
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_glib_WebProcessPoolGLib_cpp12
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk-web-process-extension_pc_in10
-rw-r--r--www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk_pc_in10
-rw-r--r--www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_cpp90
-rw-r--r--www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_h21
-rw-r--r--www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_BPlatform_h14
-rw-r--r--www/webkitgtk4/patches/patch-Source_cmake_OptionsCommon_cmake16
-rw-r--r--www/webkitgtk4/patches/patch-Source_cmake_WebKitCommon_cmake43
-rw-r--r--www/webkitgtk4/patches/patch-Source_cmake_WebKitCompilerFlags_cmake16
-rw-r--r--www/webkitgtk4/patches/patch-Source_cmake_WebKitFeatures_cmake12
45 files changed, 0 insertions, 1223 deletions
diff --git a/www/webkitgtk4/patches/CVS/Entries b/www/webkitgtk4/patches/CVS/Entries
deleted file mode 100644
index ab2eead..0000000
--- a/www/webkitgtk4/patches/CVS/Entries
+++ /dev/null
@@ -1,40 +0,0 @@
1/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h/1.7/Sat Mar 12 08:18:53 2022//
2/patch-Source_WTF_wtf_InlineASM_h/1.4/Sat Mar 12 08:18:53 2022//
3/patch-Source_WTF_wtf_Platform_h/1.19/Sat Mar 12 08:18:53 2022//
4/patch-Source_WebCore_PAL_pal_PlatformGTK_cmake/1.3/Sat Mar 12 08:18:53 2022//
5/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM_cpp/1.2/Sat Mar 12 08:18:53 2022//
6/patch-Source_WebCore_platform_graphics_FontSelectionAlgorithm_h/1.4/Sat Mar 12 08:18:53 2022//
7/patch-Source_WebDriver_PlatformGTK_cmake/1.2/Sat Mar 12 08:18:53 2022//
8/patch-Source_ThirdParty_ANGLE_src_common_platform_h/1.1/Sat Mar 26 16:11:56 2022//
9/patch-Source_WebCore_page_NavigatorBase_cpp/1.3/Sat Mar 26 17:21:26 2022//
10/patch-Source_bmalloc_bmalloc_AvailableMemory_h/1.1/Sat Mar 26 16:11:56 2022//
11/patch-Source_bmalloc_bmalloc_BPlatform_h/1.1/Sat Mar 26 16:11:56 2022//
12/patch-Source_JavaScriptCore_API_glib_JSCOptions_cpp/1.3/Sat Sep 17 17:18:54 2022//
13/patch-Source_WTF_wtf_PageBlock_h/1.7/Sat Sep 17 17:18:54 2022//
14/patch-Source_WTF_wtf_RawHex_h/1.1/Sat Sep 17 08:13:54 2022//
15/patch-Source_bmalloc_bmalloc_AvailableMemory_cpp/1.2/Sat Sep 17 17:18:54 2022//
16/patch-Source_JavaScriptCore_offlineasm_arm64_rb/1.10/Fri Apr 7 17:19:49 2023//
17/patch-Source_WTF_wtf_PlatformCPU_h/1.5/Fri Apr 7 17:19:49 2023//
18/patch-Source_WebCore_platform_network_DNS_h/1.4/Fri Apr 7 17:19:49 2023//
19/patch-Source_WebKit_UIProcess_Launcher_glib_ProcessLauncherGLib_cpp/1.1/Fri Apr 7 14:49:49 2023//
20/patch-Source_cmake_OptionsCommon_cmake/1.22/Fri Apr 7 17:19:49 2023//
21/patch-Source_cmake_WebKitCompilerFlags_cmake/1.13/Fri Apr 7 17:19:49 2023//
22/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in/1.6/Wed Jun 21 17:22:10 2023//
23/patch-Source_WebKit_gtk_webkitgtk-web-process-extension_pc_in/1.2/Wed Jun 21 17:22:10 2023//
24/patch-Source_WebKit_gtk_webkitgtk_pc_in/1.2/Wed Jun 21 17:22:10 2023//
25/patch-Source_JavaScriptCore_assembler_RISCV64Assembler_h/1.1/Wed Jul 19 16:37:05 2023//
26/patch-Source_JavaScriptCore_runtime_MachineContext_h/1.12/Wed Jul 19 17:24:51 2023//
27/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h/1.15/Sun Sep 17 17:22:08 2023//
28/patch-Source_JavaScriptCore_heap_BlockDirectory_cpp/1.3/Sun Sep 17 17:22:08 2023//
29/patch-Source_JavaScriptCore_runtime_Options_cpp/1.11/Sun Sep 17 17:22:08 2023//
30/patch-Source_WTF_wtf_PlatformEnable_h/1.10/Sun Sep 17 17:22:08 2023//
31/patch-Source_WTF_wtf_dtoa_utils_h/1.8/Sun Sep 17 17:22:08 2023//
32/patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp/1.1/Sun Sep 17 12:50:35 2023//
33/patch-Source_WebCore_CMakeLists_txt/1.2/Sun Sep 17 17:22:08 2023//
34/patch-Source_WebCore_rendering_RenderLayerBacking_h/1.3/Sun Sep 17 17:22:08 2023//
35/patch-Source_cmake_WebKitCommon_cmake/1.13/Sun Sep 17 17:22:08 2023//
36/patch-Source_cmake_WebKitFeatures_cmake/1.15/Sun Sep 17 17:22:08 2023//
37/patch-Source_WebKit_UIProcess_glib_WebProcessPoolGLib_cpp/1.1/Sun Nov 26 08:59:44 2023//
38/patch-Source_JavaScriptCore_assembler_ARMv7Assembler_h/1.11/Wed Feb 7 18:20:29 2024//
39/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_cpp/1.1/Sat Feb 10 00:02:54 2024//
40D
diff --git a/www/webkitgtk4/patches/CVS/Repository b/www/webkitgtk4/patches/CVS/Repository
deleted file mode 100644
index be284f0..0000000
--- a/www/webkitgtk4/patches/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
1ports/www/webkitgtk4/patches
diff --git a/www/webkitgtk4/patches/CVS/Root b/www/webkitgtk4/patches/CVS/Root
deleted file mode 100644
index 3811072..0000000
--- a/www/webkitgtk4/patches/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
1/cvs
diff --git a/www/webkitgtk4/patches/CVS/Tag b/www/webkitgtk4/patches/CVS/Tag
deleted file mode 100644
index d49d9f3..0000000
--- a/www/webkitgtk4/patches/CVS/Tag
+++ /dev/null
@@ -1 +0,0 @@
1TOPENBSD_7_4
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_API_glib_JSCOptions_cpp b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_API_glib_JSCOptions_cpp
deleted file mode 100644
index 9818d88..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_API_glib_JSCOptions_cpp
+++ /dev/null
@@ -1,36 +0,0 @@
1Unbreak i386:
2- revert https://trac.webkit.org/changeset/241014/webkit
3- https://bugs.webkit.org/show_bug.cgi?id=194330
4
5Index: Source/JavaScriptCore/API/glib/JSCOptions.cpp
6--- Source/JavaScriptCore/API/glib/JSCOptions.cpp.orig
7+++ Source/JavaScriptCore/API/glib/JSCOptions.cpp
8@@ -73,7 +73,6 @@ static void valueToGValue(int32_t value, GValue* gValu
9 g_value_set_int(gValue, value);
10 }
11
12-#if CPU(ADDRESS64)
13 static bool valueFromGValue(const GValue* gValue, unsigned& value)
14 {
15 value = g_value_get_uint(gValue);
16@@ -84,7 +83,6 @@ static void valueToGValue(unsigned value, GValue* gVal
17 {
18 g_value_set_uint(gValue, value);
19 }
20-#endif
21
22 static bool valueFromGValue(const GValue* gValue, size_t& value)
23 {
24@@ -556,12 +554,10 @@ static JSCOptionType jscOptionsType(int)
25 return JSC_OPTION_INT;
26 }
27
28-#if CPU(ADDRESS64)
29 static JSCOptionType jscOptionsType(unsigned)
30 {
31 return JSC_OPTION_UINT;
32 }
33-#endif
34
35 static JSCOptionType jscOptionsType(size_t)
36 {
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
deleted file mode 100644
index 1e31935..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
2--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
3+++ Source/JavaScriptCore/assembler/ARM64Assembler.h
4@@ -3598,6 +3598,8 @@ class ARM64Assembler { (public)
5 {
6 #if OS(DARWIN)
7 sys_icache_invalidate(code, size);
8+#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
9+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
10 #elif OS(FUCHSIA)
11 zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN);
12 #elif OS(LINUX)
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler_h
deleted file mode 100644
index 08f6f27..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler_h
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/JavaScriptCore/assembler/ARMv7Assembler.h
2--- Source/JavaScriptCore/assembler/ARMv7Assembler.h.orig
3+++ Source/JavaScriptCore/assembler/ARMv7Assembler.h
4@@ -2812,6 +2812,8 @@ class ARMv7Assembler { (public)
5 linuxPageFlush(current, current + page);
6
7 linuxPageFlush(current, end);
8+#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD)) && COMPILER(CLANG)
9+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
10 #else
11 #error "The cacheFlush support is missing on this platform."
12 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
deleted file mode 100644
index f864540..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
+++ /dev/null
@@ -1,19 +0,0 @@
1XXX error: macro "swap32" passed 2 arguments, but takes just 1
2XXX error: macro "swap64" passed 2 arguments, but takes just 1
3
4Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
5--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
6+++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
7@@ -31,6 +31,12 @@
8 #include "AbstractMacroAssembler.h"
9 #include <array>
10
11+/* conflicting definition in endian.h */
12+#if OS(OPENBSD)
13+#undef swap32
14+#undef swap64
15+#endif
16+
17 namespace JSC {
18
19 using Assembler = TARGET_ASSEMBLER;
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_RISCV64Assembler_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_RISCV64Assembler_h
deleted file mode 100644
index 06e5068..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_assembler_RISCV64Assembler_h
+++ /dev/null
@@ -1,55 +0,0 @@
1Add definitions to work around type assumptions: on OpenBSD intptr_t is a long
2and int64_t is a long long.
3
4Index: Source/JavaScriptCore/assembler/RISCV64Assembler.h
5--- Source/JavaScriptCore/assembler/RISCV64Assembler.h.orig
6+++ Source/JavaScriptCore/assembler/RISCV64Assembler.h
7@@ -186,7 +186,7 @@ struct ImmediateBase {
8
9 template<typename T>
10 static auto isValid(T immValue)
11- -> std::enable_if_t<(std::is_same_v<T, int32_t> || std::is_same_v<T, int64_t>), bool>
12+ -> std::enable_if_t<(std::is_same_v<T, int32_t> || std::is_same_v<T, int64_t> || std::is_same_v<T, intptr_t>), bool>
13 {
14 constexpr unsigned shift = sizeof(T) * 8 - immediateSize;
15 return immValue == ((immValue << shift) >> shift);
16@@ -209,6 +209,14 @@ struct ImmediateBase {
17 }
18
19 template<typename ImmediateType>
20+ static ImmediateType v(intptr_t immValue)
21+ {
22+ ASSERT(isValid(immValue));
23+ intptr_t value = *reinterpret_cast<intptr_t*>(&immValue);
24+ return ImmediateType(uint32_t(value & immediateMask<intptr_t>()));
25+ }
26+
27+ template<typename ImmediateType>
28 static ImmediateType v(int64_t immValue)
29 {
30 ASSERT(isValid(immValue));
31@@ -310,7 +318,7 @@ struct JImmediate : ImmediateBase<21> {
32 };
33
34 struct ImmediateDecomposition {
35- template<typename T, typename = std::enable_if_t<(std::is_same_v<T, int32_t> || std::is_same_v<T, int64_t>)>>
36+ template<typename T, typename = std::enable_if_t<(std::is_same_v<T, int32_t> || std::is_same_v<T, int64_t> || std::is_same_v<T, intptr_t>)>>
37 explicit ImmediateDecomposition(T immediate)
38 : upper(UImmediate(0))
39 , lower(IImmediate(0))
40@@ -2182,7 +2190,15 @@ class RISCV64Assembler { (public)
41 : ImmediateLoader(int64_t(imm))
42 { }
43
44+ ImmediateLoader(intptr_t imm)
45+ : ImmediateLoader(int64_t(imm))
46+ { }
47+
48 ImmediateLoader(PlaceholderTag, int32_t imm)
49+ : ImmediateLoader(Placeholder, int64_t(imm))
50+ { }
51+
52+ ImmediateLoader(PlaceholderTag, intptr_t imm)
53 : ImmediateLoader(Placeholder, int64_t(imm))
54 { }
55
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_heap_BlockDirectory_cpp b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_heap_BlockDirectory_cpp
deleted file mode 100644
index 1b397cd..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_heap_BlockDirectory_cpp
+++ /dev/null
@@ -1,14 +0,0 @@
1No mincore(2) on OpenBSD.
2
3Index: Source/JavaScriptCore/heap/BlockDirectory.cpp
4--- Source/JavaScriptCore/heap/BlockDirectory.cpp.orig
5+++ Source/JavaScriptCore/heap/BlockDirectory.cpp
6@@ -60,7 +60,7 @@ void BlockDirectory::setSubspace(Subspace* subspace)
7 void BlockDirectory::updatePercentageOfPagedOutPages(SimpleStats& stats)
8 {
9 // FIXME: We should figure out a solution for Windows and PlayStation.
10-#if OS(UNIX) && !PLATFORM(PLAYSTATION)
11+#if OS(UNIX) && !PLATFORM(PLAYSTATION) && !OS(OPENBSD)
12 size_t pageSize = WTF::pageSize();
13 ASSERT(!(MarkedBlock::blockSize % pageSize));
14 auto numberOfPagesInMarkedBlock = MarkedBlock::blockSize / pageSize;
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
deleted file mode 100644
index a0cb158..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
1Index: Source/JavaScriptCore/javascriptcoregtk.pc.in
2--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig
3+++ Source/JavaScriptCore/javascriptcoregtk.pc.in
4@@ -8,5 +8,5 @@ Name: JavaScriptCoreGTK+
5 Description: GTK+ version of the JavaScriptCore engine
6 Version: @PROJECT_VERSION@
7 Requires: glib-2.0 gobject-2.0
8-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
9+Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded -Wl,-z,nobtcfi
10 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_cpp b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_cpp
deleted file mode 100644
index 9d96dbd..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_cpp
+++ /dev/null
@@ -1,14 +0,0 @@
1https://github.com/WebKit/WebKit/pull/23066#issuecomment-1930060999
2
3Index: Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
4--- Source/JavaScriptCore/llint/LowLevelInterpreter.cpp.orig
5+++ Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
6@@ -336,8 +336,6 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* e
7 UNUSED_VARIABLE(t2);
8 UNUSED_VARIABLE(t3);
9 UNUSED_VARIABLE(t5);
10- UNUSED_VARIABLE(t6);
11- UNUSED_VARIABLE(t7);
12
13 struct StackPointerScope {
14 StackPointerScope(CLoopStack& stack)
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_offlineasm_arm64_rb b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_offlineasm_arm64_rb
deleted file mode 100644
index 8c5558c..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_offlineasm_arm64_rb
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/JavaScriptCore/offlineasm/arm64.rb
2--- Source/JavaScriptCore/offlineasm/arm64.rb.orig
3+++ Source/JavaScriptCore/offlineasm/arm64.rb
4@@ -1242,7 +1242,7 @@ class Instruction
5 $asm.puts "ldr #{operands[1].arm64Operand(:quad)}, [#{operands[1].arm64Operand(:quad)}, #{operands[0].asmLabel}@GOTPAGEOFF]"
6
7 # On Linux, use ELF GOT relocation specifiers.
8- $asm.putStr("#elif OS(LINUX)")
9+ $asm.putStr("#elif OS(LINUX) || OS(OPENBSD)")
10 $asm.puts "adrp #{operands[1].arm64Operand(:quad)}, :got:#{operands[0].asmLabel}"
11 $asm.puts "ldr #{operands[1].arm64Operand(:quad)}, [#{operands[1].arm64Operand(:quad)}, :got_lo12:#{operands[0].asmLabel}]"
12
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h
deleted file mode 100644
index 3eeb1ad..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_MachineContext_h
+++ /dev/null
@@ -1,383 +0,0 @@
1Index: Source/JavaScriptCore/runtime/MachineContext.h
2--- Source/JavaScriptCore/runtime/MachineContext.h.orig
3+++ Source/JavaScriptCore/runtime/MachineContext.h
4@@ -87,7 +87,7 @@ static inline void*& stackPointerImpl(PlatformRegister
5
6 #if CPU(X86)
7 return reinterpret_cast<void*&>(regs.__esp);
8-#elif CPU(X86_64)
9+#elif 1
10 return reinterpret_cast<void*&>(regs.__rsp);
11 #elif CPU(PPC) || CPU(PPC64)
12 return reinterpret_cast<void*&>(regs.__r1);
13@@ -101,7 +101,7 @@ static inline void*& stackPointerImpl(PlatformRegister
14
15 #if CPU(X86)
16 return reinterpret_cast<void*&>(regs.esp);
17-#elif CPU(X86_64)
18+#elif 1
19 return reinterpret_cast<void*&>(regs.rsp);
20 #elif CPU(PPC) || CPU(PPC64)
21 return reinterpret_cast<void*&>(regs.r1);
22@@ -119,7 +119,7 @@ static inline void*& stackPointerImpl(PlatformRegister
23 return reinterpret_cast<void*&>((uintptr_t&) regs.IntSp);
24 #elif CPU(X86)
25 return reinterpret_cast<void*&>((uintptr_t&) regs.Esp);
26-#elif CPU(X86_64)
27+#elif 1
28 return reinterpret_cast<void*&>((uintptr_t&) regs.Rsp);
29 #else
30 #error Unknown Architecture
31@@ -165,7 +165,7 @@ static inline void*& stackPointerImpl(mcontext_t& mach
32
33 #if CPU(X86)
34 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_esp);
35-#elif CPU(X86_64)
36+#elif 1
37 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_rsp);
38 #elif CPU(ARM)
39 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
40@@ -181,7 +181,7 @@ static inline void*& stackPointerImpl(mcontext_t& mach
41
42 #if CPU(X86)
43 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_UESP]);
44-#elif CPU(X86_64)
45+#elif 1
46 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSP]);
47 #elif CPU(ARM)
48 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
49@@ -193,11 +193,29 @@ static inline void*& stackPointerImpl(mcontext_t& mach
50 #error Unknown Architecture
51 #endif
52
53+#elif defined(__OpenBSD__)
54+
55+#if CPU(X86)
56+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esp);
57+#elif 1
58+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsp);
59+#elif CPU(ARM)
60+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
61+#elif CPU(ARM64)
62+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sp);
63+#elif CPU(MIPS)
64+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[29]);
65+#elif CPU(RISCV64)
66+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sp);
67+#else
68+#error Unknown Architecture
69+#endif
70+
71 #elif OS(FUCHSIA) || OS(LINUX)
72
73 #if CPU(X86)
74 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]);
75-#elif CPU(X86_64)
76+#elif 1
77 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_RSP]);
78 #elif CPU(ARM)
79 return reinterpret_cast<void*&>((uintptr_t&) machineContext.arm_sp);
80@@ -241,7 +259,7 @@ static inline void*& framePointerImpl(PlatformRegister
81
82 #if CPU(X86)
83 return reinterpret_cast<void*&>(regs.__ebp);
84-#elif CPU(X86_64)
85+#elif 1
86 return reinterpret_cast<void*&>(regs.__rbp);
87 #elif CPU(ARM_THUMB2)
88 return reinterpret_cast<void*&>(regs.__r[7]);
89@@ -257,7 +275,7 @@ static inline void*& framePointerImpl(PlatformRegister
90
91 #if CPU(X86)
92 return reinterpret_cast<void*&>(regs.esp);
93-#elif CPU(X86_64)
94+#elif 1
95 return reinterpret_cast<void*&>(regs.rsp);
96 #else
97 #error Unknown Architecture
98@@ -273,7 +291,7 @@ static inline void*& framePointerImpl(PlatformRegister
99 #error Dont know what to do with mips. Do we even need this?
100 #elif CPU(X86)
101 return reinterpret_cast<void*&>((uintptr_t&) regs.Ebp);
102-#elif CPU(X86_64)
103+#elif 1
104 return reinterpret_cast<void*&>((uintptr_t&) regs.Rbp);
105 #else
106 #error Unknown Architecture
107@@ -310,7 +328,7 @@ static inline void*& framePointerImpl(mcontext_t& mach
108
109 #if CPU(X86)
110 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_ebp);
111-#elif CPU(X86_64)
112+#elif 1
113 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_rbp);
114 #elif CPU(ARM)
115 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
116@@ -326,7 +344,7 @@ static inline void*& framePointerImpl(mcontext_t& mach
117
118 #if CPU(X86)
119 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EBP]);
120-#elif CPU(X86_64)
121+#elif 1
122 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RBP]);
123 #elif CPU(ARM)
124 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
125@@ -338,12 +356,30 @@ static inline void*& framePointerImpl(mcontext_t& mach
126 #error Unknown Architecture
127 #endif
128
129+#elif defined(__OpenBSD__)
130+
131+#if CPU(X86)
132+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_ebp);
133+#elif 1
134+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rbp);
135+#elif CPU(ARM)
136+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
137+#elif CPU(ARM64)
138+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[29]);
139+#elif CPU(MIPS)
140+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[30]);
141+#elif CPU(RISCV64)
142+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_s[0]);
143+#else
144+#error Unknown Architecture
145+#endif
146+
147 #elif OS(FUCHSIA) || OS(LINUX)
148
149 // The following sequence depends on glibc's sys/ucontext.h.
150 #if CPU(X86)
151 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_EBP]);
152-#elif CPU(X86_64)
153+#elif 1
154 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_RBP]);
155 #elif CPU(ARM)
156 return reinterpret_cast<void*&>((uintptr_t&) machineContext.arm_fp);
157@@ -387,7 +423,7 @@ static inline void*& instructionPointerImpl(PlatformRe
158
159 #if CPU(X86)
160 return reinterpret_cast<void*&>(regs.__eip);
161-#elif CPU(X86_64)
162+#elif 1
163 return reinterpret_cast<void*&>(regs.__rip);
164 #elif CPU(ARM_THUMB2) || CPU(ARM)
165 return reinterpret_cast<void*&>(regs.__pc);
166@@ -398,7 +434,7 @@ static inline void*& instructionPointerImpl(PlatformRe
167 #else // !__DARWIN_UNIX03
168 #if CPU(X86)
169 return reinterpret_cast<void*&>(regs.eip);
170-#elif CPU(X86_64)
171+#elif 1
172 return reinterpret_cast<void*&>(regs.rip);
173 #else
174 #error Unknown Architecture
175@@ -414,7 +450,7 @@ static inline void*& instructionPointerImpl(PlatformRe
176 #error Dont know what to do with mips. Do we even need this?
177 #elif CPU(X86)
178 return reinterpret_cast<void*&>((uintptr_t&) regs.Eip);
179-#elif CPU(X86_64)
180+#elif 1
181 return reinterpret_cast<void*&>((uintptr_t&) regs.Rip);
182 #else
183 #error Unknown Architecture
184@@ -468,7 +504,7 @@ static inline void*& instructionPointerImpl(mcontext_t
185
186 #if CPU(X86)
187 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_eip);
188-#elif CPU(X86_64)
189+#elif 1
190 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_rip);
191 #elif CPU(ARM)
192 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
193@@ -484,7 +520,7 @@ static inline void*& instructionPointerImpl(mcontext_t
194
195 #if CPU(X86)
196 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EIP]);
197-#elif CPU(X86_64)
198+#elif 1
199 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RIP]);
200 #elif CPU(ARM)
201 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
202@@ -496,12 +532,30 @@ static inline void*& instructionPointerImpl(mcontext_t
203 #error Unknown Architecture
204 #endif
205
206+#elif defined(__OpenBSD__)
207+
208+#if CPU(X86)
209+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_eip);
210+#elif 1
211+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rip);
212+#elif CPU(ARM)
213+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
214+#elif CPU(ARM64)
215+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_elr);
216+#elif CPU(MIPS)
217+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_pc);
218+#elif CPU(RISCV64)
219+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sepc);
220+#else
221+#error Unknown Architecture
222+#endif
223+
224 #elif OS(FUCHSIA) || OS(LINUX)
225
226 // The following sequence depends on glibc's sys/ucontext.h.
227 #if CPU(X86)
228 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_EIP]);
229-#elif CPU(X86_64)
230+#elif 1
231 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_RIP]);
232 #elif CPU(ARM)
233 return reinterpret_cast<void*&>((uintptr_t&) machineContext.arm_pc);
234@@ -566,7 +620,7 @@ inline void*& argumentPointer<1>(PlatformRegisters& re
235
236 #if CPU(X86)
237 return reinterpret_cast<void*&>(regs.__edx);
238-#elif CPU(X86_64)
239+#elif 1
240 return reinterpret_cast<void*&>(regs.__rsi);
241 #elif CPU(ARM_THUMB2) || CPU(ARM)
242 return reinterpret_cast<void*&>(regs.__r[1]);
243@@ -580,7 +634,7 @@ inline void*& argumentPointer<1>(PlatformRegisters& re
244
245 #if CPU(X86)
246 return reinterpret_cast<void*&>(regs.edx);
247-#elif CPU(X86_64)
248+#elif 1
249 return reinterpret_cast<void*&>(regs.rsi);
250 #else
251 #error Unknown Architecture
252@@ -596,7 +650,7 @@ inline void*& argumentPointer<1>(PlatformRegisters& re
253 #error Dont know what to do with mips. Do we even need this?
254 #elif CPU(X86)
255 return reinterpret_cast<void*&>((uintptr_t&) regs.Edx);
256-#elif CPU(X86_64)
257+#elif 1
258 return reinterpret_cast<void*&>((uintptr_t&) regs.Rdx);
259 #else
260 #error Unknown Architecture
261@@ -624,7 +678,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo
262
263 #if CPU(X86)
264 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_edx);
265-#elif CPU(X86_64)
266+#elif 1
267 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_rsi);
268 #elif CPU(ARM)
269 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
270@@ -636,11 +690,27 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo
271 #error Unknown Architecture
272 #endif
273
274+#elif defined(__OpenBSD__)
275+
276+#if CPU(X86)
277+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_edx);
278+#elif 1
279+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsi);
280+#elif CPU(ARM)
281+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
282+#elif CPU(ARM64)
283+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[1]);
284+#elif CPU(MIPS)
285+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[1]);
286+#else
287+#error Unknown Architecture
288+#endif
289+
290 #elif OS(NETBSD)
291
292 #if CPU(X86)
293 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EDX]);
294-#elif CPU(X86_64)
295+#elif 1
296 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSI]);
297 #elif CPU(ARM)
298 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
299@@ -657,7 +727,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo
300 // The following sequence depends on glibc's sys/ucontext.h.
301 #if CPU(X86)
302 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_EDX]);
303-#elif CPU(X86_64)
304+#elif 1
305 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_RSI]);
306 #elif CPU(ARM)
307 return reinterpret_cast<void*&>((uintptr_t&) machineContext.arm_r1);
308@@ -694,7 +764,7 @@ inline void*& llintInstructionPointer(PlatformRegister
309 #if CPU(X86)
310 static_assert(LLInt::LLIntPC == X86Registers::esi, "Wrong LLInt PC.");
311 return reinterpret_cast<void*&>(regs.__esi);
312-#elif CPU(X86_64)
313+#elif 1
314 static_assert(LLInt::LLIntPC == X86Registers::r8, "Wrong LLInt PC.");
315 return reinterpret_cast<void*&>(regs.__r8);
316 #elif CPU(ARM)
317@@ -711,7 +781,7 @@ inline void*& llintInstructionPointer(PlatformRegister
318 #if CPU(X86)
319 static_assert(LLInt::LLIntPC == X86Registers::esi, "Wrong LLInt PC.");
320 return reinterpret_cast<void*&>(regs.esi);
321-#elif CPU(X86_64)
322+#elif 1
323 static_assert(LLInt::LLIntPC == X86Registers::r8, "Wrong LLInt PC.");
324 return reinterpret_cast<void*&>(regs.r8);
325 #else
326@@ -730,7 +800,7 @@ inline void*& llintInstructionPointer(PlatformRegister
327 #elif CPU(X86)
328 static_assert(LLInt::LLIntPC == X86Registers::esi, "Wrong LLInt PC.");
329 return reinterpret_cast<void*&>((uintptr_t&) regs.Esi);
330-#elif CPU(X86_64)
331+#elif 1
332 static_assert(LLInt::LLIntPC == X86Registers::r10, "Wrong LLInt PC.");
333 return reinterpret_cast<void*&>((uintptr_t&) regs.R10);
334 #else
335@@ -759,7 +829,7 @@ inline void*& llintInstructionPointer(mcontext_t& mach
336
337 #if CPU(X86)
338 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_esi);
339-#elif CPU(X86_64)
340+#elif 1
341 return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_r8);
342 #elif CPU(ARM)
343 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
344@@ -771,11 +841,29 @@ inline void*& llintInstructionPointer(mcontext_t& mach
345 #error Unknown Architecture
346 #endif
347
348+#elif defined(__OpenBSD__)
349+
350+#if CPU(X86)
351+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi);
352+#elif 1
353+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8);
354+#elif CPU(ARM)
355+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
356+#elif CPU(ARM64)
357+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]);
358+#elif CPU(MIPS)
359+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
360+#elif CPU(RISCV64)
361+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_a[3]);
362+#else
363+#error Unknown Architecture
364+#endif
365+
366 #elif OS(NETBSD)
367
368 #if CPU(X86)
369 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_ESI]);
370-#elif CPU(X86_64)
371+#elif 1
372 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
373 #elif CPU(ARM)
374 return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
375@@ -792,7 +880,7 @@ inline void*& llintInstructionPointer(mcontext_t& mach
376 // The following sequence depends on glibc's sys/ucontext.h.
377 #if CPU(X86)
378 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESI]);
379-#elif CPU(X86_64)
380+#elif 1
381 return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_R8]);
382 #elif CPU(ARM)
383 return reinterpret_cast<void*&>((uintptr_t&) machineContext.arm_r8);
diff --git a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_Options_cpp b/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_Options_cpp
deleted file mode 100644
index 6b94b84..0000000
--- a/www/webkitgtk4/patches/patch-Source_JavaScriptCore_runtime_Options_cpp
+++ /dev/null
@@ -1,25 +0,0 @@
1powerpc and i386 fix for:
2undefined reference to `WTF::Optional<unsigned long>
3JSC::parse<unsigned long>(char const*)'
4
5Index: Source/JavaScriptCore/runtime/Options.cpp
6--- Source/JavaScriptCore/runtime/Options.cpp.orig
7+++ Source/JavaScriptCore/runtime/Options.cpp
8@@ -95,7 +95,7 @@ std::optional<OptionsStorage::Unsigned> parse(const ch
9 return std::nullopt;
10 }
11
12-#if CPU(ADDRESS64) || OS(DARWIN)
13+#if CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
14 template<>
15 std::optional<OptionsStorage::Size> parse(const char* string)
16 {
17@@ -104,7 +104,7 @@ std::optional<OptionsStorage::Size> parse(const char*
18 return value;
19 return std::nullopt;
20 }
21-#endif // CPU(ADDRESS64) || OS(DARWIN)
22+#endif // CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
23
24 template<>
25 std::optional<OptionsStorage::Double> parse(const char* string)
diff --git a/www/webkitgtk4/patches/patch-Source_ThirdParty_ANGLE_src_common_platform_h b/www/webkitgtk4/patches/patch-Source_ThirdParty_ANGLE_src_common_platform_h
deleted file mode 100644
index d211055..0000000
--- a/www/webkitgtk4/patches/patch-Source_ThirdParty_ANGLE_src_common_platform_h
+++ /dev/null
@@ -1,20 +0,0 @@
1Index: Source/ThirdParty/ANGLE/src/common/platform.h
2--- Source/ThirdParty/ANGLE/src/common/platform.h.orig
3+++ Source/ThirdParty/ANGLE/src/common/platform.h
4@@ -26,7 +26,15 @@
5 #elif defined(__linux__) || defined(EMSCRIPTEN)
6 # define ANGLE_PLATFORM_LINUX 1
7 # define ANGLE_PLATFORM_POSIX 1
8-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
9+#elif defined(__OpenBSD__)
10+# define ANGLE_PLATFORM_OPENBSD 1
11+# define ANGLE_PLATFORM_POSIX 1
12+# define ANGLE_PLATFORM_BSD 1
13+#elif defined(__FreeBSD__)
14+# define ANGLE_PLATFORM_FREEBSD 1
15+# define ANGLE_PLATFORM_POSIX 1
16+# define ANGLE_PLATFORM_BSD 1
17+#elif defined(__NetBSD__) || \
18 defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
19 defined(__QNX__) || defined(__Fuchsia__) || defined(__HAIKU__)
20 # define ANGLE_PLATFORM_POSIX 1
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_InlineASM_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_InlineASM_h
deleted file mode 100644
index 38594b2..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_InlineASM_h
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/WTF/wtf/InlineASM.h
2--- Source/WTF/wtf/InlineASM.h.orig
3+++ Source/WTF/wtf/InlineASM.h
4@@ -43,7 +43,7 @@
5 #define THUMB_FUNC_PARAM(name)
6 #endif
7
8-#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
9+#if (OS(LINUX) || OS(FREEBSD) || OS(OPENBSD)) && CPU(X86_64)
10 #define GLOBAL_REFERENCE(name) #name "@plt"
11 #elif CPU(X86) && COMPILER(MINGW)
12 #define GLOBAL_REFERENCE(name) "@" #name "@4"
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PageBlock_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PageBlock_h
deleted file mode 100644
index e2da01a..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PageBlock_h
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/WTF/wtf/PageBlock.h
2--- Source/WTF/wtf/PageBlock.h.orig
3+++ Source/WTF/wtf/PageBlock.h
4@@ -55,6 +55,8 @@ constexpr size_t CeilingOnPageSize = 16 * KB;
5 constexpr size_t CeilingOnPageSize = 64 * KB;
6 #elif OS(WINDOWS) || CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(RISCV64)
7 constexpr size_t CeilingOnPageSize = 4 * KB;
8+#elif CPU(SPARC64)
9+constexpr size_t CeilingOnPageSize = 8 * KB;
10 #else
11 #error Must set CeilingOnPageSize in PageBlock.h when adding a new CPU architecture!
12 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformCPU_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformCPU_h
deleted file mode 100644
index ff6bfa6..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformCPU_h
+++ /dev/null
@@ -1,28 +0,0 @@
1https://bugs.webkit.org/show_bug.cgi?id=129963
2
3Index: Source/WTF/wtf/PlatformCPU.h
4--- Source/WTF/wtf/PlatformCPU.h.orig
5+++ Source/WTF/wtf/PlatformCPU.h
6@@ -95,6 +95,13 @@
7 #define WTF_CPU_KNOWN 1
8 #endif
9
10+/* CPU(SPARC64) - SPARC V9 */
11+#if defined(__sparc64__)
12+#define WTF_CPU_KNOWN 1
13+#define WTF_CPU_SPARC64 1
14+#define WTF_CPU_BIG_ENDIAN 1
15+#endif
16+
17 /* CPU(X86) - i386 / x86 32-bit */
18 #if defined(__i386__) \
19 || defined(i386) \
20@@ -297,7 +304,7 @@
21 #define WTF_CPU_UNKNOWN 1
22 #endif
23
24-#if CPU(ARM) || CPU(MIPS) || CPU(RISCV64) || CPU(UNKNOWN)
25+#if CPU(ARM) || CPU(MIPS) || CPU(RISCV64) || CPU(SPARC64) || CPU(UNKNOWN)
26 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
27 #endif
28
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformEnable_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformEnable_h
deleted file mode 100644
index a27b025..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformEnable_h
+++ /dev/null
@@ -1,23 +0,0 @@
1https://bugs.webkit.org/show_bug.cgi?id=129963
2
3Index: Source/WTF/wtf/PlatformEnable.h
4--- Source/WTF/wtf/PlatformEnable.h.orig
5+++ Source/WTF/wtf/PlatformEnable.h
6@@ -661,7 +661,7 @@
7 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
8
9 /* Enable the DFG JIT on X86 and X86_64. */
10-#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD) || OS(WINDOWS))
11+#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(HURD) || OS(WINDOWS))
12 #define ENABLE_DFG_JIT 1
13 #endif
14
15@@ -713,7 +713,7 @@
16
17 /* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
18 #if ENABLE(FTL_JIT)
19-#define ENABLE_B3_JIT 1
20+#define ENABLE_B3_JIT 0
21 #endif
22
23 #if ENABLE(WEBASSEMBLY) && ENABLE(JIT) && CPU(ARM)
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h
deleted file mode 100644
index a068735..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformHave_h
+++ /dev/null
@@ -1,18 +0,0 @@
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@@ -233,6 +233,10 @@
9 #define HAVE_MACHINE_CONTEXT 1
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
deleted file mode 100644
index cade9db..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_PlatformUse_h
+++ /dev/null
@@ -1,12 +0,0 @@
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_WTF_wtf_Platform_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_Platform_h
deleted file mode 100644
index c503325..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_Platform_h
+++ /dev/null
@@ -1,13 +0,0 @@
1Fix build with icu4c >=69.1
2
3Index: Source/WTF/wtf/Platform.h
4--- Source/WTF/wtf/Platform.h.orig
5+++ Source/WTF/wtf/Platform.h
6@@ -113,7 +113,6 @@
7
8 /* FIXME: This does not belong in Platform.h and should instead be included in another mechanism (compiler option, prefix header, config.h, etc) */
9 /* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */
10-#define U_HIDE_DEPRECATED_API 1
11 #define U_SHOW_CPLUSPLUS_API 0
12 #ifdef __cplusplus
13 #define UCHAR_TYPE char16_t
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_RawHex_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_RawHex_h
deleted file mode 100644
index 498e7a0..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_RawHex_h
+++ /dev/null
@@ -1,21 +0,0 @@
1Index: Source/WTF/wtf/RawHex.h
2--- Source/WTF/wtf/RawHex.h.orig
3+++ Source/WTF/wtf/RawHex.h
4@@ -48,7 +48,7 @@ class RawHex { (public)
5 : RawHex(static_cast<uintptr_t>(value))
6 { }
7
8-#if CPU(ADDRESS64) || OS(DARWIN)
9+#if CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
10 // These causes build errors for CPU(ADDRESS32) on some ports because int32_t
11 // is already handled by intptr_t, and uint32_t is handled by uintptr_t.
12 explicit RawHex(int32_t value)
13@@ -59,7 +59,7 @@ class RawHex { (public)
14 { }
15 #endif
16
17-#if CPU(ADDRESS32) || OS(DARWIN)
18+#if CPU(ADDRESS32) || OS(DARWIN) || OS(OPENBSD)
19 // These causes build errors for CPU(ADDRESS64) on some ports because int64_t
20 // is already handled by intptr_t, and uint64_t is handled by uintptr_t.
21 explicit RawHex(int64_t value)
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_dtoa_utils_h b/www/webkitgtk4/patches/patch-Source_WTF_wtf_dtoa_utils_h
deleted file mode 100644
index dd59932..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_dtoa_utils_h
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/WTF/wtf/dtoa/utils.h
2--- Source/WTF/wtf/dtoa/utils.h.orig
3+++ Source/WTF/wtf/dtoa/utils.h
4@@ -86,7 +86,7 @@ int main(int argc, char** argv) {
5 defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
6 defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
7 defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
8- defined(__SH4__) || defined(__alpha__) || \
9+ defined(__SH4__) || defined(__alpha__) || defined(__sparc64__) || \
10 defined(_MIPS_ARCH_MIPS32R2) || \
11 defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
12 defined(__riscv) || \
diff --git a/www/webkitgtk4/patches/patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp b/www/webkitgtk4/patches/patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp
deleted file mode 100644
index de29a58..0000000
--- a/www/webkitgtk4/patches/patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp
+++ /dev/null
@@ -1,15 +0,0 @@
1Index: Source/WTF/wtf/posix/FileSystemPOSIX.cpp
2--- Source/WTF/wtf/posix/FileSystemPOSIX.cpp.orig
3+++ Source/WTF/wtf/posix/FileSystemPOSIX.cpp
4@@ -200,7 +200,11 @@ std::optional<WallTime> fileCreationTime(const String&
5 if (stat(fsRep.data(), &fileInfo) == -1)
6 return std::nullopt;
7
8+#if OS(OPENBSD)
9+ return WallTime::fromRawSeconds(fileInfo.__st_birthtime);
10+#else
11 return WallTime::fromRawSeconds(fileInfo.st_birthtime);
12+#endif
13 #endif
14 #endif
15
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_CMakeLists_txt b/www/webkitgtk4/patches/patch-Source_WebCore_CMakeLists_txt
deleted file mode 100644
index f76b470..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_CMakeLists_txt
+++ /dev/null
@@ -1,14 +0,0 @@
1Until we have eventfd, we need to link with epoll-shim.
2See patch-Source_WebCore_SourcesGTK_txt
3
4Index: Source/WebCore/CMakeLists.txt
5--- Source/WebCore/CMakeLists.txt.orig
6+++ Source/WebCore/CMakeLists.txt
7@@ -1816,6 +1816,7 @@ set(WebCore_LIBRARIES
8 LibXml2::LibXml2
9 SQLite::SQLite3
10 ZLIB::ZLIB
11+ "epoll-shim"
12 )
13 set(WebCore_FRAMEWORKS
14 JavaScriptCore
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_PAL_pal_PlatformGTK_cmake b/www/webkitgtk4/patches/patch-Source_WebCore_PAL_pal_PlatformGTK_cmake
deleted file mode 100644
index 965bc52..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_PAL_pal_PlatformGTK_cmake
+++ /dev/null
@@ -1,18 +0,0 @@
1Index: Source/WebCore/PAL/pal/PlatformGTK.cmake
2--- Source/WebCore/PAL/pal/PlatformGTK.cmake.orig
3+++ Source/WebCore/PAL/pal/PlatformGTK.cmake
4@@ -20,6 +20,14 @@ list(APPEND PAL_SOURCES
5 unix/LoggingUnix.cpp
6 )
7
8+list(APPEND PAL_INCLUDE_DIRECTORIES
9+ ${LIBGCRYPT_INCLUDE_DIRS}
10+)
11+
12+list(APPEND PAL_LIBRARIES
13+ ${LIBGCRYPT_LIBRARIES}
14+)
15+
16 if (ENABLE_WEB_CRYPTO)
17 list(APPEND PAL_PUBLIC_HEADERS
18 crypto/tasn1/Utilities.h
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM_cpp b/www/webkitgtk4/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM_cpp
deleted file mode 100644
index 061724e..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM_cpp
+++ /dev/null
@@ -1,16 +0,0 @@
1Index: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
2--- Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp.orig
3+++ Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
4@@ -26,6 +26,12 @@
5 #include "config.h"
6 #include "CryptoAlgorithmAES_GCM.h"
7
8+#if defined(_LP64)
9+# define __WORDSIZE 64
10+#else
11+# define __WORDSIZE 32
12+#endif
13+
14 #if ENABLE(WEB_CRYPTO)
15
16 #include "CryptoAlgorithmAesGcmParams.h"
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_page_NavigatorBase_cpp b/www/webkitgtk4/patches/patch-Source_WebCore_page_NavigatorBase_cpp
deleted file mode 100644
index 7bf4088..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_page_NavigatorBase_cpp
+++ /dev/null
@@ -1,21 +0,0 @@
1Index: Source/WebCore/page/NavigatorBase.cpp
2--- Source/WebCore/page/NavigatorBase.cpp.orig
3+++ Source/WebCore/page/NavigatorBase.cpp
4@@ -40,7 +40,7 @@
5 #include <wtf/UniqueRef.h>
6 #include <wtf/text/WTFString.h>
7
8-#if OS(LINUX)
9+#if OS(LINUX) || OS(OPENBSD)
10 #include "sys/utsname.h"
11 #include <wtf/StdLibExtras.h>
12 #endif
13@@ -88,7 +88,7 @@ String NavigatorBase::appVersion() const
14
15 String NavigatorBase::platform() const
16 {
17-#if OS(LINUX)
18+#if OS(LINUX) || OS(OPENBSD)
19 static LazyNeverDestroyed<String> platformName;
20 static std::once_flag onceKey;
21 std::call_once(onceKey, [] {
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_platform_graphics_FontSelectionAlgorithm_h b/www/webkitgtk4/patches/patch-Source_WebCore_platform_graphics_FontSelectionAlgorithm_h
deleted file mode 100644
index 37189ec..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_platform_graphics_FontSelectionAlgorithm_h
+++ /dev/null
@@ -1,30 +0,0 @@
1XXX libstdc++ from gcc-4.9.4 doesn't yet decorate std::min/std::max
2with constexpr
3
4Index: Source/WebCore/platform/graphics/FontSelectionAlgorithm.h
5--- Source/WebCore/platform/graphics/FontSelectionAlgorithm.h.orig
6+++ Source/WebCore/platform/graphics/FontSelectionAlgorithm.h
7@@ -49,7 +49,11 @@ class FontSelectionValue { (public)
8 explicit constexpr FontSelectionValue(float);
9
10 // Precision can be lost, but value will be clamped to the representable range.
11+#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20160726L
12+ static inline FontSelectionValue clampFloat(float);
13+#else
14 static constexpr FontSelectionValue clampFloat(float);
15+#endif
16
17 // Since floats have 23 mantissa bits, every value can be represented losslessly.
18 constexpr operator float() const;
19@@ -125,7 +129,11 @@ constexpr FontSelectionValue FontSelectionValue::minim
20 return { std::numeric_limits<BackingType>::min(), RawTag::RawTag };
21 }
22
23+#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20160726L
24+inline FontSelectionValue FontSelectionValue::clampFloat(float value)
25+#else
26 constexpr FontSelectionValue FontSelectionValue::clampFloat(float value)
27+#endif
28 {
29 return FontSelectionValue { std::max<float>(minimumValue(), std::min<float>(value, maximumValue())) };
30 }
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_platform_network_DNS_h b/www/webkitgtk4/patches/patch-Source_WebCore_platform_network_DNS_h
deleted file mode 100644
index b711955..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_platform_network_DNS_h
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: Source/WebCore/platform/network/DNS.h
2--- Source/WebCore/platform/network/DNS.h.orig
3+++ Source/WebCore/platform/network/DNS.h
4@@ -35,6 +35,7 @@
5 #include <ws2tcpip.h>
6 #else
7 #include <netinet/in.h>
8+#include <sys/socket.h> /* AF_INET, AF_INET6 */
9 #endif
10
11 namespace WebCore {
diff --git a/www/webkitgtk4/patches/patch-Source_WebCore_rendering_RenderLayerBacking_h b/www/webkitgtk4/patches/patch-Source_WebCore_rendering_RenderLayerBacking_h
deleted file mode 100644
index d4d9328..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebCore_rendering_RenderLayerBacking_h
+++ /dev/null
@@ -1,16 +0,0 @@
1Index: Source/WebCore/rendering/RenderLayerBacking.h
2--- Source/WebCore/rendering/RenderLayerBacking.h.orig
3+++ Source/WebCore/rendering/RenderLayerBacking.h
4@@ -33,6 +33,12 @@
5 #include "RenderLayerCompositor.h"
6 #include "ScrollingCoordinator.h"
7
8+#if defined(_LP64)
9+# define __WORDSIZE 64
10+#else
11+# define __WORDSIZE 32
12+#endif
13+
14 namespace WebCore {
15
16 class KeyframeList;
diff --git a/www/webkitgtk4/patches/patch-Source_WebDriver_PlatformGTK_cmake b/www/webkitgtk4/patches/patch-Source_WebDriver_PlatformGTK_cmake
deleted file mode 100644
index 66cbf89..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebDriver_PlatformGTK_cmake
+++ /dev/null
@@ -1,17 +0,0 @@
1Index: Source/WebDriver/PlatformGTK.cmake
2--- Source/WebDriver/PlatformGTK.cmake.orig
3+++ Source/WebDriver/PlatformGTK.cmake
4@@ -5,6 +5,7 @@ add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIB
5 list(APPEND WebDriver_SYSTEM_INCLUDE_DIRECTORIES
6 "${GLIB_INCLUDE_DIRS}"
7 "${LIBSOUP_INCLUDE_DIRS}"
8+ "${ICU_INCLUDE_DIRS}"
9 )
10
11 list(APPEND WebDriver_SOURCES
12@@ -18,4 +19,5 @@ list(APPEND WebDriver_SOURCES
13
14 list(APPEND WebDriver_LIBRARIES
15 ${LIBSOUP_LIBRARIES}
16+ ${ICU_LIBRARIES}
17 )
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_Launcher_glib_ProcessLauncherGLib_cpp b/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_Launcher_glib_ProcessLauncherGLib_cpp
deleted file mode 100644
index 884a023..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_Launcher_glib_ProcessLauncherGLib_cpp
+++ /dev/null
@@ -1,15 +0,0 @@
1This file only '#include "valgrind.h"' for OS(LINUX) and RUNNING_ON_VALGRIND
2will be left undefined.
3
4Index: Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
5--- Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp.orig
6+++ Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
7@@ -91,7 +91,7 @@ static int connectionOptions()
8
9 static bool isSandboxEnabled(const ProcessLauncher::LaunchOptions& launchOptions)
10 {
11-#if !USE(SYSTEM_MALLOC)
12+#if !USE(SYSTEM_MALLOC) && OS(LINUX)
13 if (RUNNING_ON_VALGRIND)
14 return false;
15 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_glib_WebProcessPoolGLib_cpp b/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_glib_WebProcessPoolGLib_cpp
deleted file mode 100644
index 5630c2f..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_UIProcess_glib_WebProcessPoolGLib_cpp
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
2--- Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp.orig
3+++ Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
4@@ -96,7 +96,7 @@ void WebProcessPool::platformInitializeWebProcess(cons
5
6 #if PLATFORM(WAYLAND)
7 if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland && parameters.dmaBufRendererBufferMode.isEmpty()) {
8- wpe_loader_init("libWPEBackend-fdo-1.0.so.1");
9+ wpe_loader_init("libWPEBackend-fdo-1.0.so");
10 if (AcceleratedBackingStoreWayland::checkRequirements()) {
11 parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt };
12 parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk-web-process-extension_pc_in b/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk-web-process-extension_pc_in
deleted file mode 100644
index da68d40..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk-web-process-extension_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
1Index: Source/WebKit/gtk/webkitgtk-web-process-extension.pc.in
2--- Source/WebKit/gtk/webkitgtk-web-process-extension.pc.in.orig
3+++ Source/WebKit/gtk/webkitgtk-web-process-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} -lwebkit@WEBKITGTK_API_INFIX@gtk-@WEBKITGTK_API_VERSION@
9+Libs: -L${libdir} -lwebkit@WEBKITGTK_API_INFIX@gtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded -Wl,-z,nobtcfi
10 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
diff --git a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk_pc_in b/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk_pc_in
deleted file mode 100644
index 338d4b1..0000000
--- a/www/webkitgtk4/patches/patch-Source_WebKit_gtk_webkitgtk_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
1Index: Source/WebKit/gtk/webkitgtk.pc.in
2--- Source/WebKit/gtk/webkitgtk.pc.in.orig
3+++ Source/WebKit/gtk/webkitgtk.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} -lwebkit@WEBKITGTK_API_INFIX@gtk-@WEBKITGTK_API_VERSION@
9+Libs: -L${libdir} -lwebkit@WEBKITGTK_API_INFIX@gtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded -Wl,-z,nobtcfi
10 Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
diff --git a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_cpp b/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_cpp
deleted file mode 100644
index 107220b..0000000
--- a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_cpp
+++ /dev/null
@@ -1,90 +0,0 @@
1Index: Source/bmalloc/bmalloc/AvailableMemory.cpp
2--- Source/bmalloc/bmalloc/AvailableMemory.cpp.orig
3+++ Source/bmalloc/bmalloc/AvailableMemory.cpp
4@@ -44,13 +44,15 @@
5 #import <mach/mach_error.h>
6 #import <math.h>
7 #elif BOS(UNIX)
8-#if BOS(FREEBSD) || BOS(LINUX)
9+#if BOS(OPENBSD)
10+#include <kvm.h>
11+#elif BOS(FREEBSD) || BOS(LINUX)
12 #include <sys/sysinfo.h>
13 #endif
14 #if BOS(LINUX)
15 #include <algorithm>
16 #include <fcntl.h>
17-#elif BOS(FREEBSD)
18+#elif BOS(FREEBSD) || BOS(OPENBSD)
19 #include "VMAllocate.h"
20 #include <sys/sysctl.h>
21 #include <sys/types.h>
22@@ -166,6 +168,24 @@ static size_t computeAvailableMemory()
23 if (!sysinfo(&info))
24 return info.totalram * info.mem_unit;
25 return availableMemoryGuess;
26+#elif BOS(OPENBSD)
27+ struct uvmexp uvmexp;
28+ size_t length;
29+ static int uvmexp_mib [] = { CTL_VM, VM_UVMEXP };
30+ long pages;
31+ long pageSize = sysconf(_SC_PAGE_SIZE);
32+ if (pageSize == -1)
33+ return availableMemoryGuess;
34+ length = sizeof (uvmexp);
35+ if (sysctl(uvmexp_mib, std::size(uvmexp_mib), &uvmexp, &length, NULL, 0) == 0)
36+ return uvmexp.npages * pageSize;
37+ else {
38+ bzero(&uvmexp, sizeof(length));
39+ pages = sysconf(_SC_PHYS_PAGES);
40+ if (pages == -1)
41+ return availableMemoryGuess;
42+ return pages * pageSize;
43+ }
44 #elif BOS(UNIX)
45 long pages = sysconf(_SC_PHYS_PAGES);
46 long pageSize = sysconf(_SC_PAGE_SIZE);
47@@ -180,14 +200,19 @@ static size_t computeAvailableMemory()
48 size_t availableMemory()
49 {
50 static size_t availableMemory;
51+#if BOS(OPENBSD)
52+ // We always calculate the available memory because we take care...
53+ availableMemory = computeAvailableMemory();
54+#else
55 static std::once_flag onceFlag;
56 std::call_once(onceFlag, [] {
57 availableMemory = computeAvailableMemory();
58 });
59+#endif
60 return availableMemory;
61 }
62
63-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD)
64+#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) || BOS(OPENBSD)
65 MemoryStatus memoryStatus()
66 {
67 #if BPLATFORM(IOS_FAMILY)
68@@ -213,6 +238,22 @@ MemoryStatus memoryStatus()
69 size_t memoryFootprint = 0;
70 if (!sysctl(mib, 4, &info, &infolen, nullptr, 0))
71 memoryFootprint = static_cast<size_t>(info.ki_rssize) * vmPageSize();
72+#elif BOS(OPENBSD)
73+ size_t memoryFootprint = 0, length;
74+ struct kinfo_proc *info;
75+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), sizeof(struct kinfo_proc), 0 };
76+
77+ if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) == 0) {
78+ info = (struct kinfo_proc *)malloc(length);
79+ mib[5] = (length / sizeof(struct kinfo_proc));
80+ if (sysctl(mib, std::size(mib), info, &length, NULL, 0) == 0) {
81+ memoryFootprint = static_cast<size_t>(
82+ info->p_vm_tsize +
83+ info->p_vm_dsize +
84+ info->p_vm_ssize) * vmPageSize();
85+ }
86+ free(info);
87+ }
88 #endif
89
90 double percentInUse = static_cast<double>(memoryFootprint) / static_cast<double>(availableMemory());
diff --git a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_h b/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_h
deleted file mode 100644
index fab7c0c..0000000
--- a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_AvailableMemory_h
+++ /dev/null
@@ -1,21 +0,0 @@
1Index: Source/bmalloc/bmalloc/AvailableMemory.h
2--- Source/bmalloc/bmalloc/AvailableMemory.h.orig
3+++ Source/bmalloc/bmalloc/AvailableMemory.h
4@@ -32,7 +32,7 @@ namespace bmalloc {
5
6 BEXPORT size_t availableMemory();
7
8-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD)
9+#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) || BOS(OPENBSD)
10 struct MemoryStatus {
11 MemoryStatus(size_t memoryFootprint, double percentAvailableMemoryInUse)
12 : memoryFootprint(memoryFootprint)
13@@ -61,7 +61,7 @@ inline double percentAvailableMemoryInUse()
14
15 inline bool isUnderMemoryPressure()
16 {
17-#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD)
18+#if BPLATFORM(IOS_FAMILY) || BOS(LINUX) || BOS(FREEBSD) || BOS(OPENBSD)
19 return percentAvailableMemoryInUse() > memoryPressureThreshold;
20 #else
21 return false;
diff --git a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_BPlatform_h b/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_BPlatform_h
deleted file mode 100644
index 076f6f3..0000000
--- a/www/webkitgtk4/patches/patch-Source_bmalloc_bmalloc_BPlatform_h
+++ /dev/null
@@ -1,14 +0,0 @@
1Index: Source/bmalloc/bmalloc/BPlatform.h
2--- Source/bmalloc/bmalloc/BPlatform.h.orig
3+++ Source/bmalloc/bmalloc/BPlatform.h
4@@ -52,6 +52,10 @@
5 #define BOS_FREEBSD 1
6 #endif
7
8+#if defined(__OpenBSD__)
9+#define BOS_OPENBSD 1
10+#endif
11+
12 #if defined(WIN32) || defined(_WIN32)
13 #define BOS_WINDOWS 1
14 #endif
diff --git a/www/webkitgtk4/patches/patch-Source_cmake_OptionsCommon_cmake b/www/webkitgtk4/patches/patch-Source_cmake_OptionsCommon_cmake
deleted file mode 100644
index b3e3e1b..0000000
--- a/www/webkitgtk4/patches/patch-Source_cmake_OptionsCommon_cmake
+++ /dev/null
@@ -1,16 +0,0 @@
1Put the internal library path first so that we can
2build with an older webkitgtk4 package installed.
3
4Index: Source/cmake/OptionsCommon.cmake
5--- Source/cmake/OptionsCommon.cmake.orig
6+++ Source/cmake/OptionsCommon.cmake
7@@ -210,6 +210,9 @@ if (NOT PORT STREQUAL "GTK" AND NOT PORT STREQUAL "WPE
8 set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to install executables executed by the library")
9 endif ()
10
11+# make sure that the internal library dir is the first in the path
12+link_directories("${CMAKE_BINARY_DIR}/lib")
13+
14 # Check whether features.h header exists.
15 # Including glibc's one defines __GLIBC__, that is used in Platform.h
16 WEBKIT_CHECK_HAVE_INCLUDE(HAVE_FEATURES_H features.h)
diff --git a/www/webkitgtk4/patches/patch-Source_cmake_WebKitCommon_cmake b/www/webkitgtk4/patches/patch-Source_cmake_WebKitCommon_cmake
deleted file mode 100644
index 8728620..0000000
--- a/www/webkitgtk4/patches/patch-Source_cmake_WebKitCommon_cmake
+++ /dev/null
@@ -1,43 +0,0 @@
1Index: Source/cmake/WebKitCommon.cmake
2--- Source/cmake/WebKitCommon.cmake.orig
3+++ Source/cmake/WebKitCommon.cmake
4@@ -110,7 +110,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
5 endif ()
6 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
7 set(WTF_CPU_X86 1)
8- elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
9+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
10 set(WTF_CPU_PPC 1)
11 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
12 set(WTF_CPU_PPC64 1)
13@@ -120,6 +120,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
14 set(WTF_CPU_RISCV64 1)
15 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch64")
16 set(WTF_CPU_LOONGARCH64 1)
17+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
18+ set(WTF_CPU_SPARC64 1)
19 else ()
20 set(WTF_CPU_UNKNOWN 1)
21 endif ()
22@@ -191,9 +193,9 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
23 # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
24 # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
25 # for finding only the Ruby interpreter.
26- find_package(Ruby 2.5)
27- if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 2.5)
28- message(FATAL_ERROR "Ruby 2.5 or higher is required.")
29+ find_package(Ruby ${MODRUBY_LIBREV})
30+ if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS ${MODRUBY_LIBREV})
31+ message(FATAL_ERROR "Ruby ${MODRUBY_LIBREV} or higher is required.")
32 endif ()
33
34 # -----------------------------------------------------------------------------
35@@ -206,7 +208,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
36 include(CheckCXXCompilerFlag)
37 include(CheckCXXSourceCompiles)
38 include(CheckFunctionExists)
39- include(CheckIncludeFile)
40+ include(CheckIncludeFiles)
41 include(CheckSymbolExists)
42 include(CheckStructHasMember)
43 include(CheckTypeSize)
diff --git a/www/webkitgtk4/patches/patch-Source_cmake_WebKitCompilerFlags_cmake b/www/webkitgtk4/patches/patch-Source_cmake_WebKitCompilerFlags_cmake
deleted file mode 100644
index 30ff864..0000000
--- a/www/webkitgtk4/patches/patch-Source_cmake_WebKitCompilerFlags_cmake
+++ /dev/null
@@ -1,16 +0,0 @@
1Index: Source/cmake/WebKitCompilerFlags.cmake
2--- Source/cmake/WebKitCompilerFlags.cmake.orig
3+++ Source/cmake/WebKitCompilerFlags.cmake
4@@ -275,9 +275,9 @@ if (NOT MSVC)
5 string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
6 endif ()
7
8-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
9- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
10-endif ()
11+#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
12+# set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
13+#endif ()
14
15
16 if (MSVC)
diff --git a/www/webkitgtk4/patches/patch-Source_cmake_WebKitFeatures_cmake b/www/webkitgtk4/patches/patch-Source_cmake_WebKitFeatures_cmake
deleted file mode 100644
index 4dae8ac..0000000
--- a/www/webkitgtk4/patches/patch-Source_cmake_WebKitFeatures_cmake
+++ /dev/null
@@ -1,12 +0,0 @@
1Index: Source/cmake/WebKitFeatures.cmake
2--- Source/cmake/WebKitFeatures.cmake.orig
3+++ Source/cmake/WebKitFeatures.cmake
4@@ -445,7 +445,7 @@ macro(CREATE_CONFIGURATION_HEADER)
5 endmacro()
6
7 macro(WEBKIT_CHECK_HAVE_INCLUDE _variable _header)
8- check_include_file(${_header} ${_variable}_value)
9+ check_include_files("${_header}" ${_variable}_value)
10 SET_AND_EXPOSE_TO_BUILD(${_variable} ${${_variable}_value})
11 endmacro()
12