Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2023 18:02:35 GMT
From:      Neel Chauhan <nc@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d8951a8d01aa - main - www/webkit2-gtk4: Update to 2.38.3
Message-ID:  <202302031802.313I2Z43013827@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d8951a8d01aa6ee88912862cac6768e048b5032f

commit d8951a8d01aa6ee88912862cac6768e048b5032f
Author:     Neel Chauhan <nc@FreeBSD.org>
AuthorDate: 2023-02-03 05:51:20 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2023-02-03 18:02:27 +0000

    www/webkit2-gtk4: Update to 2.38.3
---
 www/webkit2-gtk4/Makefile                          |   16 +-
 www/webkit2-gtk4/distinfo                          |    6 +-
 ...tform_graphics_gstreamer_MediaSampleGStreamer.h |   10 +
 .../files/patch-Source-cmake-OptionsCommon.cmake   |   11 -
 ...h-Source_JavaScriptCore_API_glib_JSCOptions.cpp |   36 +
 ...ource_JavaScriptCore_assembler_ARM64Assembler.h |    7 +-
 ...ource_JavaScriptCore_assembler_ARMv7Assembler.h |   21 +-
 ...aScriptCore_assembler_MacroAssemblerX86Common.h |   19 +
 ...h-Source_JavaScriptCore_javascriptcoregtk.pc.in |   10 +
 ...urce_JavaScriptCore_jit_ExecutableAllocator.cpp |   11 -
 .../files/patch-Source_JavaScriptCore_jsc.cpp      |   21 +-
 ...patch-Source_JavaScriptCore_offlineasm_arm64.rb |    7 +-
 ...atch-Source_JavaScriptCore_offlineasm_config.rb |   16 -
 ...atch-Source_JavaScriptCore_offlineasm_parser.rb |   28 -
 ...-Source_JavaScriptCore_runtime_MachineContext.h |  118 +
 ...rce_JavaScriptCore_runtime_NativeExecutable.cpp |   10 -
 ...patch-Source_JavaScriptCore_runtime_Options.cpp |   25 +
 .../files/patch-Source_WTF_wtf_CompletionHandler.h |   10 +
 .../files/patch-Source_WTF_wtf_Function.h          |   19 +
 .../files/patch-Source_WTF_wtf_InlineASM.h         |   12 +
 .../files/patch-Source_WTF_wtf_PageBlock.h         |   12 +
 .../files/patch-Source_WTF_wtf_Platform.h          |   13 +
 .../files/patch-Source_WTF_wtf_PlatformCPU.h       |   42 +-
 .../files/patch-Source_WTF_wtf_PlatformEnable.h    |   14 +
 .../files/patch-Source_WTF_wtf_PlatformHave.h      |   18 +
 .../files/patch-Source_WTF_wtf_RAMSize.cpp         |   32 +-
 .../files/patch-Source_WTF_wtf_RawHex.h            |   21 +
 .../files/patch-Source_WTF_wtf_dtoa_utils.h        |   12 +
 ...urce_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp |   11 -
 .../patch-Source_WebCore_PAL_pal_PlatformGTK.cmake |   18 +
 ...re_crypto_algorithms_CryptoAlgorithmAES_GCM.cpp |   16 +
 .../patch-Source_WebCore_page_NavigatorBase.cpp    |   21 +
 .../patch-Source_WebCore_platform_MediaSample.h    |   11 +
 .../patch-Source_WebCore_platform_PlatformScreen.h |   15 -
 ...Core_platform_graphics_FontSelectionAlgorithm.h |   30 +
 ...orm_graphics_cpu_arm_filters_FELightingNEON.cpp |   20 -
 ...orm_graphics_gstreamer_MediaSampleGStreamer.cpp |   15 +
 ...tform_graphics_gstreamer_MediaSampleGStreamer.h |   10 +
 ...rm_mock_mediasource_MockSourceBufferPrivate.cpp |   23 +
 .../patch-Source_WebCore_platform_network_DNS.h    |    9 +-
 ...atch-Source_WebCore_platform_text_TextCodec.cpp |   11 -
 ...h-Source_WebCore_rendering_RenderLayerBacking.h |   16 +
 .../files/patch-Source_WebDriver_PlatformGTK.cmake |   12 +-
 ...cripts_update-LegacyInspectorBackendCommands.rb |   11 -
 .../patch-Source_WebKit_Platform_IPC_Decoder.h     |   10 +
 ...ource_WebKit_gtk_webkit2gtk-web-extension_pc.in |   10 +
 .../files/patch-Source_WebKit_gtk_webkit2gtk_pc.in |   10 +
 ...atch-Source_bmalloc_bmalloc_AvailableMemory.cpp |   90 +
 .../patch-Source_bmalloc_bmalloc_AvailableMemory.h |   21 +
 .../files/patch-Source_bmalloc_bmalloc_BPlatform.h |   22 +-
 .../files/patch-Source_cmake_OptionsCommon.cmake   |   16 +
 .../files/patch-Source_cmake_WebKitCommon.cmake    |   17 -
 .../patch-Source_cmake_WebKitCompilerFlags.cmake   |   16 +
 www/webkit2-gtk4/files/patch-revert-11ccaf183fad   |  193 -
 www/webkit2-gtk4/pkg-plist                         | 3778 ++++++++++++++++++++
 55 files changed, 4558 insertions(+), 451 deletions(-)

diff --git a/www/webkit2-gtk4/Makefile b/www/webkit2-gtk4/Makefile
index ef0fb68c6b59..dce455804beb 100644
--- a/www/webkit2-gtk4/Makefile
+++ b/www/webkit2-gtk4/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	webkit
-DISTVERSION=	2.34.6
-PORTREVISION=	1
+DISTVERSION=	2.38.3
 CATEGORIES=	www
 MASTER_SITES=	https://webkitgtk.org/releases/
 PKGNAMESUFFIX=	2-gtk4
@@ -14,7 +13,8 @@ WWW=		https://webkitgtk.org/
 LICENSE=	BSD2CLAUSE GPLv2
 LICENSE_COMB=	dual
 
-BUILD_DEPENDS=	${LOCALBASE}/bin/ar:devel/binutils
+BUILD_DEPENDS=	${LOCALBASE}/bin/ar:devel/binutils \
+		${PYTHON_PKGNAMEPREFIX}gi-docgen>0:textproc/py-gi-docgen@${PY_FLAVOR}
 LIB_DEPENDS=	libenchant-2.so:textproc/enchant2 \
 		libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2 \
@@ -35,9 +35,9 @@ LIB_DEPENDS=	libenchant-2.so:textproc/enchant2 \
 
 PORTSCOUT=	limitw:1,even
 
-USES=		bison cmake compiler:c++14-lang cpe gettext gl gnome gperf jpeg \
-	localbase:ldflags perl5 pkgconfig python:build ruby:build sqlite tar:xz \
-		xorg
+USES=		bison cmake compiler:c++20-lang cpe gettext gl gnome gperf jpeg \
+		localbase:ldflags perl5 pkgconfig python:build ruby:build \
+		sqlite tar:xz xorg
 USE_GNOME=	cairo gdkpixbuf2 gtk40 libxml2 libxslt introspection:build
 USE_GL=		egl gl glesv2
 USE_LDCONFIG=	yes
@@ -53,7 +53,7 @@ CXXFLAGS_powerpc=	-DENABLE_YARR_JIT=0
 CXXFLAGS_powerpc64=	-DENABLE_YARR_JIT=0
 CMAKE_ARGS=		-DPORT=GTK
 CMAKE_OFF=		${CMAKE_OFF_${ARCH}:U} ENABLE_GAMEPAD ENABLE_GLES2 \
-			USE_LD_GOLD USE_SYSTEMD
+			ENABLE_JOURNALD_LOG USE_LD_GOLD USE_SYSTEMD
 CMAKE_ON=		ENABLE_MINIBROWSER USE_GTK4 USE_SYSTEM_MALLOC
 CMAKE_OFF_armv6=	ENABLE_JIT
 CMAKE_OFF_armv7=	ENABLE_JIT
@@ -105,6 +105,8 @@ post-install:
 		${STAGEDIR}${PREFIX}/bin/jsc-5
 	@${RLN} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-5.0/MiniBrowser \
 		${STAGEDIR}${PREFIX}/bin/MiniBrowser-5
+	@${MV} ${STAGEDIR}${PREFIX}/bin/WebKitWebDriver \
+		${STAGEDIR}${PREFIX}/bin/WebKitWebDriver-5
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.*
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-5.0/injected-bundle/*.so
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-5.0/*
diff --git a/www/webkit2-gtk4/distinfo b/www/webkit2-gtk4/distinfo
index a2fe649c6c45..ac241b0eaec6 100644
--- a/www/webkit2-gtk4/distinfo
+++ b/www/webkit2-gtk4/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646438253
-SHA256 (gnome/webkitgtk-2.34.6.tar.xz) = 6bc8fd034aad0432a2459ce4fc7ee25ad65a4924c618bf8d93b52b0c1a84c1f6
-SIZE (gnome/webkitgtk-2.34.6.tar.xz) = 24393340
+TIMESTAMP = 1675216155
+SHA256 (gnome/webkitgtk-2.38.3.tar.xz) = 41f001d1ed448c6936b394a9f20e4640eebf83a7f08262df28504f7410604a5a
+SIZE (gnome/webkitgtk-2.38.3.tar.xz) = 33003928
diff --git a/www/webkit2-gtk4/files/Source_WebCore_platform_graphics_gstreamer_MediaSampleGStreamer.h b/www/webkit2-gtk4/files/Source_WebCore_platform_graphics_gstreamer_MediaSampleGStreamer.h
new file mode 100644
index 000000000000..4db970bf8740
--- /dev/null
+++ b/www/webkit2-gtk4/files/Source_WebCore_platform_graphics_gstreamer_MediaSampleGStreamer.h
@@ -0,0 +1,10 @@
+--- work/webkitgtk-2.38.3/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h.orig	2023-02-01 19:14:20.412727000 -0800
++++ work/webkitgtk-2.38.3/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.h	2023-02-01 19:14:27.116674000 -0800
+@@ -51,7 +51,6 @@
+     void setTimestamps(const MediaTime&, const MediaTime&) override;
+     Ref<MediaSample> createNonDisplayingCopy() const override;
+     SampleFlags flags() const override { return m_flags; }
+-    PlatformSample platformSample() const override;
+     PlatformSample::Type platformSampleType() { return PlatformSample::GStreamerSampleType; }
+     void dump(PrintStream&) const override;
+ 
diff --git a/www/webkit2-gtk4/files/patch-Source-cmake-OptionsCommon.cmake b/www/webkit2-gtk4/files/patch-Source-cmake-OptionsCommon.cmake
deleted file mode 100644
index f830b5c9116a..000000000000
--- a/www/webkit2-gtk4/files/patch-Source-cmake-OptionsCommon.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
---- Source/cmake/OptionsCommon.cmake.orig	2021-09-22 23:05:58 UTC
-+++ Source/cmake/OptionsCommon.cmake
-@@ -144,7 +144,7 @@ WEBKIT_CHECK_HAVE_FUNCTION(HAVE_VASPRINTF vasprintf)
- # Check for symbols
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_REGEX_H regexec regex.h)
- if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin"))
--    WEBKIT_CHECK_HAVE_SYMBOL(HAVE_PTHREAD_MAIN_NP pthread_main_np pthread_np.h)
-+	#WEBKIT_CHECK_HAVE_SYMBOL(HAVE_PTHREAD_MAIN_NP pthread_main_np pthread_np.h)
- endif ()
- WEBKIT_CHECK_HAVE_SYMBOL(HAVE_TIMINGSAFE_BCMP timingsafe_bcmp string.h)
- # Windows has signal.h but is missing symbols that are used in calls to signal.
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_API_glib_JSCOptions.cpp b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_API_glib_JSCOptions.cpp
new file mode 100644
index 000000000000..9818d88c18ae
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_API_glib_JSCOptions.cpp
@@ -0,0 +1,36 @@
+Unbreak i386:
+- revert https://trac.webkit.org/changeset/241014/webkit
+- https://bugs.webkit.org/show_bug.cgi?id=194330
+
+Index: Source/JavaScriptCore/API/glib/JSCOptions.cpp
+--- Source/JavaScriptCore/API/glib/JSCOptions.cpp.orig
++++ Source/JavaScriptCore/API/glib/JSCOptions.cpp
+@@ -73,7 +73,6 @@ static void valueToGValue(int32_t value, GValue* gValu
+     g_value_set_int(gValue, value);
+ }
+ 
+-#if CPU(ADDRESS64)
+ static bool valueFromGValue(const GValue* gValue, unsigned& value)
+ {
+     value = g_value_get_uint(gValue);
+@@ -84,7 +83,6 @@ static void valueToGValue(unsigned value, GValue* gVal
+ {
+     g_value_set_uint(gValue, value);
+ }
+-#endif
+ 
+ static bool valueFromGValue(const GValue* gValue, size_t& value)
+ {
+@@ -556,12 +554,10 @@ static JSCOptionType jscOptionsType(int)
+     return JSC_OPTION_INT;
+ }
+ 
+-#if CPU(ADDRESS64)
+ static JSCOptionType jscOptionsType(unsigned)
+ {
+     return JSC_OPTION_UINT;
+ }
+-#endif
+ 
+ static JSCOptionType jscOptionsType(size_t)
+ {
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
index 181df653d2f1..562562c69dbe 100644
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
@@ -1,10 +1,11 @@
---- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig	2021-09-22 23:05:58 UTC
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
 +++ Source/JavaScriptCore/assembler/ARM64Assembler.h
-@@ -2950,6 +2950,8 @@ class ARM64Assembler { (public)
+@@ -2918,6 +2918,8 @@ class ARM64Assembler { (public)
      {
  #if OS(DARWIN)
          sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
-+#elif OS(FREEBSD) || OS(NETBSD)
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
 +        __clear_cache(code, reinterpret_cast<char*>(code) + size);
  #elif OS(FUCHSIA)
          zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN);
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
index 42294c5de4bc..543887570da5 100644
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
@@ -1,11 +1,12 @@
---- Source/JavaScriptCore/assembler/ARMv7Assembler.h.orig	2021-09-22 23:05:58 UTC
+Index: Source/JavaScriptCore/assembler/ARMv7Assembler.h
+--- Source/JavaScriptCore/assembler/ARMv7Assembler.h.orig
 +++ Source/JavaScriptCore/assembler/ARMv7Assembler.h
-@@ -2402,6 +2402,8 @@ class ARMv7Assembler { (public)
-     {
- #if OS(DARWIN)
-         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
-+#elif OS(FREEBSD) || OS(NETBSD)
-+        __clear_cache(code, reinterpret_cast<char*>(code) + size);
- #elif OS(LINUX)
-         size_t page = pageSize();
-         uintptr_t current = reinterpret_cast<uintptr_t>(code);
+@@ -2573,6 +2573,8 @@ class ARMv7Assembler { (public)
+             linuxPageFlush(current, current + page);
+ 
+         linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD)) && COMPILER(CLANG)
++       __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common.h b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common.h
new file mode 100644
index 000000000000..f864540bfe52
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common.h
@@ -0,0 +1,19 @@
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -31,6 +31,12 @@
+ #include "AbstractMacroAssembler.h"
+ #include <array>
+ 
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+ 
+ using Assembler = TARGET_ASSEMBLER;
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_javascriptcoregtk.pc.in b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_javascriptcoregtk.pc.in
new file mode 100644
index 000000000000..72d8553e598b
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_javascriptcoregtk.pc.in
@@ -0,0 +1,10 @@
+Index: Source/JavaScriptCore/javascriptcoregtk.pc.in
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in
+@@ -8,5 +8,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0 gobject-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp
deleted file mode 100644
index 4682641a2130..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- Source/JavaScriptCore/jit/ExecutableAllocator.cpp.orig	2021-09-22 23:05:58 UTC
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.cpp
-@@ -95,7 +95,7 @@ namespace JSC {
- 
- using namespace WTF;
- 
--#if defined(FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB) && FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB > 0
-+#if defined(FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB) && FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB > 0 && !defined(__aarch64__)
- static constexpr size_t fixedExecutableMemoryPoolSize = FIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB * MB;
- #elif CPU(ARM)
- static constexpr size_t fixedExecutableMemoryPoolSize = 16 * MB;
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jsc.cpp b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jsc.cpp
index 5ed01ccd90af..679d2bb2aa89 100644
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jsc.cpp
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_jsc.cpp
@@ -1,12 +1,11 @@
---- Source/JavaScriptCore/jsc.cpp.orig	2021-09-22 23:05:58 UTC
+Index: Source/JavaScriptCore/jsc.cpp
+--- Source/JavaScriptCore/jsc.cpp.orig
 +++ Source/JavaScriptCore/jsc.cpp
-@@ -100,6 +100,9 @@
- #else
- #include <unistd.h>
- #endif
-+#if PLATFORM(GTK)
-+#include <locale.h>
-+#endif
- 
- #if PLATFORM(COCOA)
- #include <crt_externs.h>
+@@ -78,6 +78,7 @@
+ #include "WasmCapabilities.h"
+ #include "WasmFaultSignalHandler.h"
+ #include "WasmMemory.h"
++#include <locale.h> /* LC_ALL */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_arm64.rb b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_arm64.rb
index 6dc60845f9aa..5a1abcd2f0ec 100644
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_arm64.rb
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_arm64.rb
@@ -1,11 +1,12 @@
---- Source/JavaScriptCore/offlineasm/arm64.rb.orig	2021-09-22 23:05:58 UTC
+Index: Source/JavaScriptCore/offlineasm/arm64.rb
+--- Source/JavaScriptCore/offlineasm/arm64.rb.orig
 +++ Source/JavaScriptCore/offlineasm/arm64.rb
-@@ -1127,7 +1127,7 @@ class Instruction
+@@ -1226,7 +1226,7 @@ class Instruction
              $asm.puts "ldr #{operands[1].arm64Operand(:quad)}, [#{operands[1].arm64Operand(:quad)}, #{operands[0].asmLabel}@GOTPAGEOFF]"
  
              # On Linux, use ELF GOT relocation specifiers.
 -            $asm.putStr("#elif OS(LINUX)")
-+            $asm.putStr("#elif OS(LINUX) || OS(FREEBSD)")
++            $asm.putStr("#elif OS(LINUX) || OS(OPENBSD)")
              $asm.puts "adrp #{operands[1].arm64Operand(:quad)}, :got:#{operands[0].asmLabel}"
              $asm.puts "ldr #{operands[1].arm64Operand(:quad)}, [#{operands[1].arm64Operand(:quad)}, :got_lo12:#{operands[0].asmLabel}]"
  
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_config.rb b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_config.rb
deleted file mode 100644
index 9a99da9a8a91..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_config.rb
+++ /dev/null
@@ -1,16 +0,0 @@
---- Source/JavaScriptCore/offlineasm/config.rb.orig	2021-05-17 13:22:35 UTC
-+++ Source/JavaScriptCore/offlineasm/config.rb
-@@ -22,11 +22,11 @@ buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR'];
- # THE POSSIBILITY OF SUCH DAMAGE.
- 
- buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR'];
--if buildProductsDirectory and File.exists?(buildProductsDirectory)
-+if buildProductsDirectory and File.exist?(buildProductsDirectory)
-     $: << "#{buildProductsDirectory}/usr/local/include/WebKitAdditions/Scripts"
- end
- sdkRootDirectory = ENV['SDKROOT'];
--if sdkRootDirectory and File.exists?(sdkRootDirectory)
-+if sdkRootDirectory and File.exist?(sdkRootDirectory)
-     $: << "#{sdkRootDirectory}/usr/local/include/WebKitAdditions/Scripts"
- end
- 
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_parser.rb b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_parser.rb
deleted file mode 100644
index 12a141cefb52..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_offlineasm_parser.rb
+++ /dev/null
@@ -1,28 +0,0 @@
---- Source/JavaScriptCore/offlineasm/parser.rb.orig	2021-10-21 08:52:07 UTC
-+++ Source/JavaScriptCore/offlineasm/parser.rb
-@@ -832,10 +832,10 @@ class Parser
-                 @idx += 1
-                 additionsDirectoryName = "#{@buildProductsDirectory}/usr/local/include/WebKitAdditions/"
-                 fileName = IncludeFile.new(moduleName, additionsDirectoryName).fileName
--                if not File.exists?(fileName)
-+                if not File.exist?(fileName)
-                     fileName = IncludeFile.new(moduleName, @tokens[@idx].codeOrigin.fileName.dirname).fileName
-                 end
--                fileExists = File.exists?(fileName)
-+                fileExists = File.exist?(fileName)
-                 raise "File not found: #{fileName}" if not fileExists and not isOptional
-                 list << parse(fileName) if fileExists
-             else
-@@ -864,10 +864,10 @@ class Parser
-                 @idx += 1
-                 additionsDirectoryName = "#{@buildProductsDirectory}/usr/local/include/WebKitAdditions/"
-                 fileName = IncludeFile.new(moduleName, additionsDirectoryName).fileName
--                if not File.exists?(fileName)
-+                if not File.exist?(fileName)
-                     fileName = IncludeFile.new(moduleName, @tokens[@idx].codeOrigin.fileName.dirname).fileName
-                 end
--                fileExists = File.exists?(fileName)
-+                fileExists = File.exist?(fileName)
-                 raise "File not found: #{fileName}" if not fileExists and not isOptional
-                 fileList << fileName if fileExists
-             else
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_MachineContext.h b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_MachineContext.h
new file mode 100644
index 000000000000..43a150928a9c
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_MachineContext.h
@@ -0,0 +1,118 @@
+Index: Source/JavaScriptCore/runtime/MachineContext.h
+--- Source/JavaScriptCore/runtime/MachineContext.h.orig
++++ Source/JavaScriptCore/runtime/MachineContext.h
+@@ -193,6 +193,22 @@ static inline void*& stackPointerImpl(mcontext_t& mach
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esp);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsp);
++#elif CPU(ARM) 
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[29]);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ #if CPU(X86)
+@@ -338,6 +354,22 @@ static inline void*& framePointerImpl(mcontext_t& mach
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_ebp);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rbp);
++#elif CPU(ARM) 
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[30]);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -496,6 +528,22 @@ static inline void*& instructionPointerImpl(mcontext_t
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_eip);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rip);
++#elif CPU(ARM) 
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_pc);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -652,6 +700,22 @@ inline void*& argumentPointer<1>(mcontext_t& machineCo
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_edx);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_rsi);
++#elif CPU(ARM) 
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[5]);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -765,6 +829,22 @@ inline void*& llintInstructionPointer(mcontext_t& mach
+     return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
+ #elif CPU(ARM64)
+     return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_gpregs.gp_x[4]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
++#else
++#error Unknown Architecture
++#endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_esi);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_r8);
++#elif CPU(ARM) 
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.sc_x[4]);
+ #elif CPU(MIPS)
+     return reinterpret_cast<void*&>((uintptr_t&) machineContext.mc_regs[12]);
+ #else
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_NativeExecutable.cpp b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_NativeExecutable.cpp
deleted file mode 100644
index 47a726b426cb..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_NativeExecutable.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- Source/JavaScriptCore/runtime/NativeExecutable.cpp.orig	2021-09-22 23:05:58 UTC
-+++ Source/JavaScriptCore/runtime/NativeExecutable.cpp
-@@ -24,6 +24,7 @@
-  */
- 
- #include "config.h"
-+#include "ExecutableBaseInlines.h"
- #include "NativeExecutable.h"
- 
- #include "ExecutableBaseInlines.h"
diff --git a/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_Options.cpp b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_Options.cpp
new file mode 100644
index 000000000000..3c9f0e7f3f1b
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_JavaScriptCore_runtime_Options.cpp
@@ -0,0 +1,25 @@
+powerpc and i386 fix for:
+undefined reference to `WTF::Optional<unsigned long>
+JSC::parse<unsigned long>(char const*)'
+
+Index: Source/JavaScriptCore/runtime/Options.cpp
+--- Source/JavaScriptCore/runtime/Options.cpp.orig
++++ Source/JavaScriptCore/runtime/Options.cpp
+@@ -91,7 +91,7 @@ std::optional<OptionsStorage::Unsigned> parse(const ch
+     return std::nullopt;
+ }
+ 
+-#if CPU(ADDRESS64) || OS(DARWIN)
++#if CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
+ template<>
+ std::optional<OptionsStorage::Size> parse(const char* string)
+ {
+@@ -100,7 +100,7 @@ std::optional<OptionsStorage::Size> parse(const char* 
+         return value;
+     return std::nullopt;
+ }
+-#endif // CPU(ADDRESS64) || OS(DARWIN)
++#endif // CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
+ 
+ template<>
+ std::optional<OptionsStorage::Double> parse(const char* string)
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_CompletionHandler.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_CompletionHandler.h
new file mode 100644
index 000000000000..1e5008e4e240
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_CompletionHandler.h
@@ -0,0 +1,10 @@
+--- Source/WTF/wtf/CompletionHandler.h.orig	2023-02-01 10:02:29.556588000 -0800
++++ Source/WTF/wtf/CompletionHandler.h	2023-02-01 10:02:58.701631000 -0800
+@@ -69,7 +69,6 @@
+     {
+         ASSERT(m_shouldBeCalledOnMainThread == isMainThread());
+         ASSERT_WITH_MESSAGE(m_function, "Completion handler should not be called more than once");
+-        return std::exchange(m_function, nullptr)(std::forward<In>(in)...);
+     }
+ 
+ private:
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Function.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Function.h
new file mode 100644
index 000000000000..6109edc0b0dc
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Function.h
@@ -0,0 +1,19 @@
+--- Source/WTF/wtf/Function.h.orig	2023-02-01 10:03:43.795431000 -0800
++++ Source/WTF/wtf/Function.h	2023-02-01 10:37:20.896904000 -0800
+@@ -50,7 +50,7 @@
+         : m_callable(WTFMove(callable)) { }
+     CallableWrapper(const CallableWrapper&) = delete;
+     CallableWrapper& operator=(const CallableWrapper&) = delete;
+-    Out call(In... in) final { return m_callable(std::forward<In>(in)...); }
++    Out call(In... in) final { }
+ private:
+     CallableType m_callable;
+ };
+@@ -79,7 +79,6 @@
+     Out operator()(In... in) const
+     {
+         ASSERT(m_callableWrapper);
+-        return m_callableWrapper->call(std::forward<In>(in)...);
+     }
+ 
+     explicit operator bool() const { return !!m_callableWrapper; }
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_InlineASM.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_InlineASM.h
new file mode 100644
index 000000000000..38594b2c991c
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_InlineASM.h
@@ -0,0 +1,12 @@
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ Source/WTF/wtf/InlineASM.h
+@@ -43,7 +43,7 @@
+ #define THUMB_FUNC_PARAM(name)
+ #endif
+ 
+-#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
++#if (OS(LINUX) || OS(FREEBSD) || OS(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PageBlock.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PageBlock.h
new file mode 100644
index 000000000000..e2da01a5cba4
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PageBlock.h
@@ -0,0 +1,12 @@
+Index: Source/WTF/wtf/PageBlock.h
+--- Source/WTF/wtf/PageBlock.h.orig
++++ Source/WTF/wtf/PageBlock.h
+@@ -55,6 +55,8 @@ constexpr size_t CeilingOnPageSize = 16 * KB;
+ constexpr size_t CeilingOnPageSize = 64 * KB;
+ #elif OS(WINDOWS) || CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(RISCV64)
+ constexpr size_t CeilingOnPageSize = 4 * KB;
++#elif CPU(SPARC64)
++constexpr size_t CeilingOnPageSize = 8 * KB;
+ #else
+ #error Must set CeilingOnPageSize in PageBlock.h when adding a new CPU architecture!
+ #endif
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Platform.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Platform.h
new file mode 100644
index 000000000000..c503325d1af7
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_Platform.h
@@ -0,0 +1,13 @@
+Fix build with icu4c >=69.1
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -113,7 +113,6 @@
+ 
+ /* FIXME: This does not belong in Platform.h and should instead be included in another mechanism (compiler option, prefix header, config.h, etc) */
+ /* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */
+-#define U_HIDE_DEPRECATED_API 1
+ #define U_SHOW_CPLUSPLUS_API 0
+ #ifdef __cplusplus
+ #define UCHAR_TYPE char16_t
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformCPU.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformCPU.h
index 2a9b4c87a99b..3ca8ff6ffc9e 100644
--- a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformCPU.h
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformCPU.h
@@ -1,18 +1,28 @@
---- Source/WTF/wtf/PlatformCPU.h.orig	2020-08-12 09:17:54 UTC
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/PlatformCPU.h
+--- Source/WTF/wtf/PlatformCPU.h.orig
 +++ Source/WTF/wtf/PlatformCPU.h
-@@ -155,6 +155,7 @@
- #elif defined(__ARM_ARCH_6__) \
-     || defined(__ARM_ARCH_6J__) \
-     || defined(__ARM_ARCH_6K__) \
-+    || defined(__ARM_ARCH_6KZ__) \
-     || defined(__ARM_ARCH_6Z__) \
-     || defined(__ARM_ARCH_6ZK__) \
-     || defined(__ARM_ARCH_6T2__) \
-@@ -196,6 +197,7 @@
+@@ -95,6 +95,13 @@
+ #define WTF_CPU_KNOWN 1
+ #endif
+ 
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
++#endif
++
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
+@@ -295,7 +302,7 @@
+ #define WTF_CPU_UNKNOWN 1
+ #endif
+ 
+-#if CPU(ARM) || CPU(MIPS) || CPU(RISCV64) || CPU(UNKNOWN)
++#if CPU(ARM) || CPU(MIPS) || CPU(RISCV64) || CPU(SPARC64) || CPU(UNKNOWN)
+ #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
+ #endif
  
- #elif defined(__ARM_ARCH_6J__) \
-     || defined(__ARM_ARCH_6K__) \
-+    || defined(__ARM_ARCH_6KZ__) \
-     || defined(__ARM_ARCH_6Z__) \
-     || defined(__ARM_ARCH_6ZK__) \
-     || defined(__ARM_ARCH_6M__)
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformEnable.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformEnable.h
new file mode 100644
index 000000000000..7b9c39819e66
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformEnable.h
@@ -0,0 +1,14 @@
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/PlatformEnable.h
+--- Source/WTF/wtf/PlatformEnable.h.orig
++++ Source/WTF/wtf/PlatformEnable.h
+@@ -646,7 +646,7 @@
+ #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT)
+ 
+ /* Enable the DFG JIT on X86 and X86_64. */
+-#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(HURD) || OS(WINDOWS))
++#if CPU(X86_64) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(HURD) || OS(WINDOWS))
+ #define ENABLE_DFG_JIT 1
+ #endif
+ 
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformHave.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformHave.h
new file mode 100644
index 000000000000..4be2495e9908
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_PlatformHave.h
@@ -0,0 +1,18 @@
+Undo parts of upstream commit 6c2615dd66a12e9a10d7867241cc3bedfb2b2473 [0]
+Machine context definitions were only added for Linux.
+[0] https://github.com/WebKit/WebKit/commit/6c2615dd66a12e9a10d7867241cc3bedfb2b2473
+
+Index: Source/WTF/wtf/PlatformHave.h
+--- Source/WTF/wtf/PlatformHave.h.orig
++++ Source/WTF/wtf/PlatformHave.h
+@@ -233,6 +233,10 @@
+ #define HAVE_MACHINE_CONTEXT 1
+ #endif
+ 
++#if OS(OPENBSD) && CPU(RISCV64)
++#undef HAVE_MACHINE_CONTEXT
++#endif
++
+ #if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS))
+ #define HAVE_BACKTRACE 1
+ #endif
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RAMSize.cpp b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RAMSize.cpp
index 8c6b00de1d48..fd490fc826d1 100644
--- a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RAMSize.cpp
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RAMSize.cpp
@@ -1,15 +1,15 @@
---- Source/WTF/wtf/RAMSize.cpp.orig	2021-09-22 23:29:42 UTC
-+++ Source/WTF/wtf/RAMSize.cpp
-@@ -35,6 +35,8 @@
+--- Source/WTF/wtf/RAMSize.cpp.orig	2023-01-31 18:03:55.638729000 -0800
++++ Source/WTF/wtf/RAMSize.cpp	2023-01-31 18:04:10.292282000 -0800
+@@ -31,7 +31,7 @@
+ #if OS(WINDOWS)
+ #include <windows.h>
+ #elif USE(SYSTEM_MALLOC)
+-#if OS(LINUX) || OS(FREEBSD)
++#if OS(LINUX)
  #include <sys/sysinfo.h>
  #elif OS(UNIX)
  #include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
- #endif // OS(LINUX) || OS(UNIX)
- #else
- #include <bmalloc/bmalloc.h>
-@@ -56,14 +58,18 @@ static size_t computeRAMSize()
+@@ -56,7 +56,7 @@
          return ramSizeGuess;
      return status.ullTotalPhys;
  #elif USE(SYSTEM_MALLOC)
@@ -18,17 +18,3 @@
      struct sysinfo si;
      sysinfo(&si);
      return si.totalram * si.mem_unit;
- #elif OS(UNIX)
--    long pages = sysconf(_SC_PHYS_PAGES);
--    long pageSize = sysconf(_SC_PAGE_SIZE);
--    return pages * pageSize;
-+    size_t physmem, len;
-+    int mib[2] = { CTL_HW, HW_PHYSMEM };
-+    if (sysctl(mib, 2, &physmem, &len, NULL, 0) == 0
-+	&& len == sizeof(physmem))
-+	return physmem;
-+    else
-+	return 512 * MB; // guess
- #else
- #error "Missing a platform specific way of determining the available RAM"
- #endif // OS(LINUX) || OS(FREEBSD) || OS(UNIX)
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RawHex.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RawHex.h
new file mode 100644
index 000000000000..498e7a0457be
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_RawHex.h
@@ -0,0 +1,21 @@
+Index: Source/WTF/wtf/RawHex.h
+--- Source/WTF/wtf/RawHex.h.orig
++++ Source/WTF/wtf/RawHex.h
+@@ -48,7 +48,7 @@ class RawHex { (public)
+         : RawHex(static_cast<uintptr_t>(value))
+     { }
+ 
+-#if CPU(ADDRESS64) || OS(DARWIN)
++#if CPU(ADDRESS64) || OS(DARWIN) || OS(OPENBSD)
+     // These causes build errors for CPU(ADDRESS32) on some ports because int32_t
+     // is already handled by intptr_t, and uint32_t is handled by uintptr_t.
+     explicit RawHex(int32_t value)
+@@ -59,7 +59,7 @@ class RawHex { (public)
+     { }
+ #endif
+ 
+-#if CPU(ADDRESS32) || OS(DARWIN)
++#if CPU(ADDRESS32) || OS(DARWIN) || OS(OPENBSD)
+     // These causes build errors for CPU(ADDRESS64) on some ports because int64_t
+     // is already handled by intptr_t, and uint64_t is handled by uintptr_t.
+     explicit RawHex(int64_t value)
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_dtoa_utils.h b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_dtoa_utils.h
new file mode 100644
index 000000000000..2612dca3be93
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_dtoa_utils.h
@@ -0,0 +1,12 @@
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -87,7 +87,7 @@ int main(int argc, char** argv) {
+     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+-    defined(__SH4__) || defined(__alpha__) || \
++    defined(__SH4__) || defined(__alpha__) || defined(__sparc64__) || \
+     defined(_MIPS_ARCH_MIPS32R2) || \
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || \
diff --git a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp b/www/webkit2-gtk4/files/patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp
deleted file mode 100644
index a4e820ab8dbd..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp.orig	2021-09-22 23:05:58 UTC
-+++ Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp
-@@ -28,7 +28,7 @@
- #include "config.h"
- #include <wtf/MemoryPressureHandler.h>
- 
--#include <malloc.h>
-+#include <stdlib.h>
- #include <unistd.h>
- #include <wtf/Logging.h>
- #include <wtf/MainThread.h>
diff --git a/www/webkit2-gtk4/files/patch-Source_WebCore_PAL_pal_PlatformGTK.cmake b/www/webkit2-gtk4/files/patch-Source_WebCore_PAL_pal_PlatformGTK.cmake
new file mode 100644
index 000000000000..965bc52c1305
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WebCore_PAL_pal_PlatformGTK.cmake
@@ -0,0 +1,18 @@
+Index: Source/WebCore/PAL/pal/PlatformGTK.cmake
+--- Source/WebCore/PAL/pal/PlatformGTK.cmake.orig
++++ Source/WebCore/PAL/pal/PlatformGTK.cmake
+@@ -20,6 +20,14 @@ list(APPEND PAL_SOURCES
+     unix/LoggingUnix.cpp
+ )
+ 
++list(APPEND PAL_INCLUDE_DIRECTORIES
++    ${LIBGCRYPT_INCLUDE_DIRS}
++)
++
++list(APPEND PAL_LIBRARIES
++    ${LIBGCRYPT_LIBRARIES}
++)
++
+ if (ENABLE_WEB_CRYPTO)
+     list(APPEND PAL_PUBLIC_HEADERS
+         crypto/tasn1/Utilities.h
diff --git a/www/webkit2-gtk4/files/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM.cpp b/www/webkit2-gtk4/files/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM.cpp
new file mode 100644
index 000000000000..061724edfbc5
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES_GCM.cpp
@@ -0,0 +1,16 @@
+Index: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
+--- Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp.orig
++++ Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
+@@ -26,6 +26,12 @@
+ #include "config.h"
+ #include "CryptoAlgorithmAES_GCM.h"
+ 
++#if defined(_LP64)
++#  define __WORDSIZE 64
++#else
++#  define __WORDSIZE 32
++#endif
++
+ #if ENABLE(WEB_CRYPTO)
+ 
+ #include "CryptoAlgorithmAesGcmParams.h"
diff --git a/www/webkit2-gtk4/files/patch-Source_WebCore_page_NavigatorBase.cpp b/www/webkit2-gtk4/files/patch-Source_WebCore_page_NavigatorBase.cpp
new file mode 100644
index 000000000000..7bf4088a0fa3
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WebCore_page_NavigatorBase.cpp
@@ -0,0 +1,21 @@
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -40,7 +40,7 @@
+ #include <wtf/UniqueRef.h>
+ #include <wtf/text/WTFString.h>
+ 
+-#if OS(LINUX)
++#if OS(LINUX) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
+@@ -88,7 +88,7 @@ String NavigatorBase::appVersion() const
+ 
+ String NavigatorBase::platform() const
+ {
+-#if OS(LINUX)
++#if OS(LINUX) || OS(OPENBSD)
+     static LazyNeverDestroyed<String> platformName;
+     static std::once_flag onceKey;
+     std::call_once(onceKey, [] {
diff --git a/www/webkit2-gtk4/files/patch-Source_WebCore_platform_MediaSample.h b/www/webkit2-gtk4/files/patch-Source_WebCore_platform_MediaSample.h
new file mode 100644
index 000000000000..da57f6750270
--- /dev/null
+++ b/www/webkit2-gtk4/files/patch-Source_WebCore_platform_MediaSample.h
@@ -0,0 +1,11 @@
+--- Source/WebCore/platform/MediaSample.h.orig	2023-02-01 19:19:36.695484000 -0800
++++ Source/WebCore/platform/MediaSample.h	2023-02-01 19:19:54.238085000 -0800
+@@ -99,7 +99,7 @@
+         HasSyncInfo = 1 << 3,
+     };
+     virtual SampleFlags flags() const = 0;
+-    virtual PlatformSample platformSample() const = 0;
++    PlatformSample platformSample() { return { PlatformSample::None, { nullptr } }; };
+     virtual PlatformSample::Type platformSampleType() const = 0;
+ 
+     struct ByteRange {
diff --git a/www/webkit2-gtk4/files/patch-Source_WebCore_platform_PlatformScreen.h b/www/webkit2-gtk4/files/patch-Source_WebCore_platform_PlatformScreen.h
deleted file mode 100644
index d5a4da093b36..000000000000
--- a/www/webkit2-gtk4/files/patch-Source_WebCore_platform_PlatformScreen.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- Source/WebCore/platform/PlatformScreen.h.orig	2021-10-21 08:52:09 UTC
-+++ Source/WebCore/platform/PlatformScreen.h
-@@ -48,6 +48,12 @@ OBJC_CLASS UIScreen;
- typedef struct CGColorSpace *CGColorSpaceRef;
- #endif
- 
-+// X11 headers define a bunch of macros with common terms, interfering with WebCore and WTF enum values.
*** 4508 LINES SKIPPED ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302031802.313I2Z43013827>