pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

webkit-gtk: Import webkit-gtk-2.36.0



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Apr 11 20:01:03 2022 +0200
Changeset:	d01a1e233141bbf798c9a6d835ad4b62dd18c009

Added Files:
	webkit-gtk/DESCR
	webkit-gtk/MESSAGE
	webkit-gtk/Makefile
	webkit-gtk/PLIST
	webkit-gtk/buildlink3.mk
	webkit-gtk/distinfo
	webkit-gtk/options.mk
	webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh
	webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh
	webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
	webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
	webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MarkedSpace.cpp
	webkit-gtk/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp
	webkit-gtk/patches/patch-Source_JavaScriptCore_offlineasm_arm64.rb
	webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_MachineContext.h
	webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp
	webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h
	webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h
	webkit-gtk/patches/patch-Source_WTF_wtf_Assertions.h
	webkit-gtk/patches/patch-Source_WTF_wtf_FileSystem.cpp
	webkit-gtk/patches/patch-Source_WTF_wtf_PlatformEnable.h
	webkit-gtk/patches/patch-Source_WTF_wtf_PlatformHave.h
	webkit-gtk/patches/patch-Source_WTF_wtf_PlatformOS.h
	webkit-gtk/patches/patch-Source_WTF_wtf_PlatformUse.h
	webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp
	webkit-gtk/patches/patch-Source_WebCore_Scripts_check-xcfilelists.sh
	webkit-gtk/patches/patch-Source_WebCore_Scripts_generate-unified-sources.sh
	webkit-gtk/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp
	webkit-gtk/patches/patch-Source_WebCore_inspector_InspectorFrontendHost.cpp
	webkit-gtk/patches/patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp
	webkit-gtk/patches/patch-Source_WebCore_platform_network_DNS.h
	webkit-gtk/patches/patch-Source_WebCore_rendering_RenderLayerBacking.h
	webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
	webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp
	webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
	webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp
	webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake
	webkit-gtk/patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp
	webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp
	webkit-gtk/patches/patch-Source_WebKit_Scripts_check-xcfilelists.sh
	webkit-gtk/patches/patch-Source_WebKit_Scripts_generate-unified-sources.sh
	webkit-gtk/patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp
	webkit-gtk/patches/patch-Source_bmalloc_bmalloc_BPlatform.h
	webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
	webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake
	webkit-gtk/patches/patch-Source_cmake_WebKitCommon.cmake
	webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh
	webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh
	webkit-gtk/patches/patch-aj

Log Message:
webkit-gtk: Import webkit-gtk-2.36.0

WebKit is an open source web browser engine. WebKit is also the name of
the Mac OS X system framework version of the engine that's used by
Safari, Dashboard, Mail, and many other OS X applications. WebKit's HTML
and JavaScript code began as a branch of the KHTML and KJS libraries
from KDE.

This is the GTK port of the engine.

Intended to be used to update www/webkit-gtk.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d01a1e233141bbf798c9a6d835ad4b62dd18c009

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 webkit-gtk/DESCR                                   |   7 +
 webkit-gtk/MESSAGE                                 |  14 +
 webkit-gtk/Makefile                                | 173 +++++++++++++
 webkit-gtk/PLIST                                   | 287 +++++++++++++++++++++
 webkit-gtk/buildlink3.mk                           |  41 +++
 webkit-gtk/distinfo                                |  47 ++++
 webkit-gtk/options.mk                              |  96 +++++++
 ...rce_JavaScriptCore_Scripts_check-xcfilelists.sh |  18 ++
 ...aScriptCore_Scripts_generate-unified-sources.sh |  15 ++
 ...ource_JavaScriptCore_assembler_ARM64Assembler.h |  17 ++
 ...ource_JavaScriptCore_assembler_ARMv7Assembler.h |  30 +++
 ...atch-Source_JavaScriptCore_heap_MarkedSpace.cpp |  15 ++
 ...urce_JavaScriptCore_jit_ExecutableAllocator.cpp |  19 ++
 ...patch-Source_JavaScriptCore_offlineasm_arm64.rb |  19 ++
 ...-Source_JavaScriptCore_runtime_MachineContext.h | 121 +++++++++
 ...c_common_third__party_smhasher_src_PMurHash.cpp |  16 ++
 ...rty_ANGLE_src_compiler_translator_SymbolTable.h |  14 +
 ...Party_gtest_include_gtest_internal_gtest-port.h |  20 ++
 .../patches/patch-Source_WTF_wtf_Assertions.h      |  15 ++
 .../patches/patch-Source_WTF_wtf_FileSystem.cpp    |  16 ++
 .../patches/patch-Source_WTF_wtf_PlatformEnable.h  |  22 ++
 .../patches/patch-Source_WTF_wtf_PlatformHave.h    |  15 ++
 .../patches/patch-Source_WTF_wtf_PlatformOS.h      |  26 ++
 .../patches/patch-Source_WTF_wtf_PlatformUse.h     |  15 ++
 .../patches/patch-Source_WTF_wtf_StackBounds.cpp   |  14 +
 ...tch-Source_WebCore_Scripts_check-xcfilelists.sh |  18 ++
 ...rce_WebCore_Scripts_generate-unified-sources.sh |  24 ++
 ...e_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp |  17 ++
 ...rce_WebCore_inspector_InspectorFrontendHost.cpp |  15 ++
 ...Core_platform_graphics_filters_FEMorphology.cpp |  15 ++
 .../patch-Source_WebCore_platform_network_DNS.h    |  14 +
 ...h-Source_WebCore_rendering_RenderLayerBacking.h |  17 ++
 ...Source_WebCore_rendering_shapes_RasterShape.cpp |  15 ++
 ...e_WebCore_rendering_shapes_ShapeOutsideInfo.cpp |  15 ++
 .../patches/patch-Source_WebKit_CMakeLists.txt     |  17 ++
 ...NetworkProcess_cache_NetworkCacheFileSystem.cpp |  19 ++
 .../patches/patch-Source_WebKit_PlatformGTK.cmake  |  15 ++
 ...rce_WebKit_Platform_IPC_unix_ConnectionUnix.cpp |  35 +++
 ...classifier_ResourceLoadStatisticsClassifier.cpp |  15 ++
 ...atch-Source_WebKit_Scripts_check-xcfilelists.sh |  18 ++
 ...urce_WebKit_Scripts_generate-unified-sources.sh |  15 ++
 ...atch-Source_bmalloc_bmalloc_AvailableMemory.cpp |  24 ++
 .../patch-Source_bmalloc_bmalloc_BPlatform.h       |  25 ++
 .../patch-Source_bmalloc_bmalloc_VMAllocate.h      |  28 ++
 .../patches/patch-Source_cmake_OptionsCommon.cmake |  21 ++
 .../patches/patch-Source_cmake_WebKitCommon.cmake  |  28 ++
 ...ools_TestWebKitAPI_Scripts_check-xcfilelists.sh |  18 ++
 ...stWebKitAPI_Scripts_generate-unified-sources.sh |  15 ++
 webkit-gtk/patches/patch-aj                        |  15 ++
 49 files changed, 1550 insertions(+)

diffs:
diff --git a/webkit-gtk/DESCR b/webkit-gtk/DESCR
new file mode 100644
index 0000000000..8f5106660f
--- /dev/null
+++ b/webkit-gtk/DESCR
@@ -0,0 +1,7 @@
+WebKit is an open source web browser engine. WebKit is also the name of
+the Mac OS X system framework version of the engine that's used by
+Safari, Dashboard, Mail, and many other OS X applications. WebKit's HTML
+and JavaScript code began as a branch of the KHTML and KJS libraries
+from KDE.
+
+This is the GTK port of the engine.
diff --git a/webkit-gtk/MESSAGE b/webkit-gtk/MESSAGE
new file mode 100644
index 0000000000..97df427a4e
--- /dev/null
+++ b/webkit-gtk/MESSAGE
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2020/04/23 17:01:16 nia Exp $
+
+WebKit needs GStreamer plugins to play web audio and video.
+
+Installing the following should be enough on BSD/Solaris:
+
+* gst-plugins1-libav
+* gst-plugins1-oss
+
+Installing gst-plugins1-alsa or gst-plugins1-pulse will be necessary
+for audio output on Linux.
+
+===========================================================================
diff --git a/webkit-gtk/Makefile b/webkit-gtk/Makefile
new file mode 100644
index 0000000000..782b06b7a3
--- /dev/null
+++ b/webkit-gtk/Makefile
@@ -0,0 +1,173 @@
+# $NetBSD: Makefile,v 1.223 2022/02/17 16:55:16 leot Exp $
+
+DISTNAME=	webkitgtk-2.36.0
+PKGNAME=	${DISTNAME:S/webkitgtk/webkit-gtk/}
+CATEGORIES=	www
+MASTER_SITES=	https://www.webkitgtk.org/releases/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://www.webkitgtk.org/
+COMMENT=	GTK port of the WebKit browser engine
+LICENSE=	2-clause-bsd AND gnu-lgpl-v2
+
+# shm_open(3) and shm_unlink(3) appeared in NetBSD 7.0
+NOT_FOR_PLATFORM=	NetBSD-[1-6].*-*
+
+TOOL_DEPENDS+=	gettext-tools>=0.18:../../devel/gettext-tools
+TOOL_DEPENDS+=	${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
+
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++17
+USE_TOOLS+=	automake bash bison flex gdbus-codegen gmake perl pkg-config msgfmt
+
+# Enabling -gdwarf-2 hits GNU ar limits on file size.
+CTF_SUPPORTED=	no
+
+# GCC >= 8 is required, it no longer builds with lower versions.
+GCC_REQD+=		8
+USE_GCC_RUNTIME=	yes
+
+.include "../../mk/bsd.prefs.mk"
+
+# This package will link against libstdc++.so from the pkgsrc GCC when the
+# base OS GCC doesn't meet the minimum requirement. Thus we do this so the
+# appropriate gcc-libs package will be captured as a dependency, otherwise
+# binary packages will be broken. See also PR pkg/56604.
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099915
+USE_PKGSRC_GCC=		yes
+USE_PKGSRC_GCC_RUNTIME=	yes
+.endif
+
+# Using ld.gold subverts Pkgsrc wrappers, and this package also crashes buggy
+# versions of ld.gold.
+CMAKE_ARGS+=	-DUSE_LD_GOLD=OFF
+
+PKGCONFIG_OVERRIDE+=	Source/JavaScriptCore/javascriptcoregtk.pc.in
+PKGCONFIG_OVERRIDE+=	Source/WebKit/gtk/webkit2gtk-web-extension.pc.in
+PKGCONFIG_OVERRIDE+=	Source/WebKit/gtk/webkit2gtk.pc.in
+
+CMAKE_ARGS+=		-DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+=		-DPORT=GTK
+CMAKE_ARGS+=		-DENABLE_X11_TARGET=ON
+CMAKE_ARGS+=		-DENABLE_MINIBROWSER=ON
+CMAKE_ARGS+=		-DENABLE_GAMEPAD=OFF
+CMAKE_ARGS+=		-DENABLE_GEOLOCATION=OFF
+CMAKE_ARGS+=		-DENABLE_JOURNALD_LOG=OFF
+CMAKE_ARGS+=		-DENABLE_BUBBLEWRAP_SANDBOX=OFF
+CMAKE_ARGS+=		-DUSE_GSTREAMER_GL=OFF
+CMAKE_ARGS+=		-DUSE_LIBHYPHEN=OFF
+CMAKE_ARGS+=		-DUSE_OPENJPEG=OFF
+CMAKE_ARGS+=		-DUSE_SOUP2=ON
+CMAKE_ARGS+=		-DUSE_SYSTEMD=OFF
+
+REPLACE_PERL+=	Source/JavaScriptCore/Scripts/*.pl
+REPLACE_PERL+=	Source/JavaScriptCore/create_hash_table
+REPLACE_PERL+=	Source/WebCore/Scripts/*.pl
+REPLACE_PERL+=	Source/WebCore/bindings/scripts/*.pl
+REPLACE_PERL+=	Source/WebCore/bindings/scripts/*.pm
+REPLACE_PERL+=	Source/WebCore/css/*.pl
+REPLACE_PERL+=	Source/WebCore/dom/*.pl
+REPLACE_PERL+=	Source/WebCore/make-hash-tools.pl
+REPLACE_PERL+=	Source/WebInspectorUI/Scripts/*.pl
+REPLACE_PERL+=	Source/WebKit/Scripts/*.pl
+REPLACE_PERL+=	Source/cmake/tools/scripts/*.pl
+
+REPLACE_PYTHON+=	Source/JavaScriptCore/Scripts/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/Scripts/wkbuiltins/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/inspector/scripts/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/inspector/scripts/codegen/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/wasm/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/yarr/*.py
+REPLACE_PYTHON+=	Source/JavaScriptCore/yarr/create_regex_tables
+REPLACE_PYTHON+=	Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode
+REPLACE_PYTHON+=	Source/ThirdParty/ANGLE/src/compiler/translator/*.py
+REPLACE_PYTHON+=	Source/ThirdParty/ANGLE/src/libANGLE/*.py
+REPLACE_PYTHON+=	Source/ThirdParty/gtest/scripts/*.py
+REPLACE_PYTHON+=	Source/ThirdParty/gtest/test/*.py
+REPLACE_PYTHON+=	Source/ThirdParty/gtest/xcode/Scripts/*.py
+REPLACE_PYTHON+=	Source/WebCore/css/*.py
+REPLACE_PYTHON+=	Source/WebCore/html/parser/create-html-entity-table
+REPLACE_PYTHON+=	Source/WebCore/platform/network/create-http-header-name-table
+REPLACE_PYTHON+=	Source/WebKit/Scripts/*.py
+REPLACE_PYTHON+=	Tools/glib/*.py
+REPLACE_PYTHON+=	Tools/gtkdoc/generate-gtkdoc
+
+REPLACE_BASH+=		Source/JavaScriptCore/postprocess-headers.sh
+REPLACE_BASH+=		Source/ThirdParty/ANGLE/adjust-angle-include-paths-rule
+REPLACE_BASH+=		Source/ThirdParty/gtest/xcode/Samples/FrameworkSample/runtests.sh
+REPLACE_BASH+=		Source/ThirdParty/gtest/xcode/Scripts/runtests.sh
+REPLACE_BASH+=		Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh
+REPLACE_BASH+=		Source/WebKit/Scripts/generate-https-upgrade-database.sh
+REPLACE_BASH+=		Source/WebKit/Scripts/process-entitlements.sh
+REPLACE_BASH+=		Tools/gtk/install-dependencies
+
+REPLACE_RUBY+=		Source/JavaScriptCore/b3/air/*.rb
+REPLACE_RUBY+=		Source/JavaScriptCore/offlineasm/*.rb
+REPLACE_RUBY+=		Source/WebCore/Scripts/*.rb
+REPLACE_RUBY+=		Source/WebCore/domjit/*.rb
+REPLACE_RUBY+=		Source/WebInspectorUI/Scripts/*.rb
+REPLACE_RUBY+=		Source/WebKit/Scripts/*.rb
+
+SUBST_CLASSES+=		python
+SUBST_FILES.python+=	Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
+SUBST_SED.python+=	-e 's,"python3","${PYTHONBIN}",'
+SUBST_STAGE.python=	pre-configure
+SUBST_MESSAGE.python=	Fixing path to python binary.
+
+.include "../../lang/ruby/rubyversion.mk"
+.include "../../lang/ruby/replace.mk"
+TOOL_DEPENDS+=	${RUBY_BASE}>=${RUBY_VERSION}:${RUBY_SRCDIR}
+CMAKE_ARGS+=	-DRUBY_EXECUTABLE=${RUBY}
+
+PYTHON_FOR_BUILD_ONLY=	yes
+.include "../../lang/python/application.mk"
+CMAKE_ARGS+=	-DPYTHON_EXECUTABLE=${PYTHONBIN}
+
+CXXFLAGS.SunOS+=	-fpermissive
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+CXXFLAGS+=	-Wno-c++11-narrowing
+.endif
+
+# This does not disable optimisations, merely avoids #error if there are none.
+CFLAGS+=	-DRELEASE_WITHOUT_OPTIMIZATIONS
+
+# Needed for JavaScript JIT
+NOT_PAX_MPROTECT_SAFE+=	libexec/webkit2gtk-4.0/WebKitWebProcess
+NOT_PAX_MPROTECT_SAFE+=	libexec/webkit2gtk-4.0/jsc
+
+.include "options.mk"
+
+BUILDLINK_API_DEPENDS.glib2+= glib2>=2.32.1
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/gperf/buildlink3.mk"
+.include "../../devel/pango/buildlink3.mk"
+.include "../../fonts/harfbuzz-icu/buildlink3.mk"
+.include "../../fonts/woff2/buildlink3.mk"
+.include "../../graphics/cairo-gobject/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
+BUILDLINK_API_DEPENDS.png+= png>=1.5.1beta08
+.include "../../graphics/png/buildlink3.mk"
+.include "../../multimedia/gstreamer1/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gst-plugins1-base+=	gst-plugins1-base>=1.0.3
+.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
+.include "../../multimedia/gst-plugins1-good/buildlink3.mk"
+.include "../../net/libsoup/buildlink3.mk"
+.include "../../security/libsecret/buildlink3.mk"
+.include "../../security/libtasn1/buildlink3.mk"
+.include "../../sysutils/libnotify/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/atomic64.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/webkit-gtk/PLIST b/webkit-gtk/PLIST
new file mode 100644
index 0000000000..375df440f1
--- /dev/null
+++ b/webkit-gtk/PLIST
@@ -0,0 +1,287 @@
+@comment $NetBSD: PLIST,v 1.82 2022/02/17 16:55:16 leot Exp $
+bin/WebKitWebDriver
+include/webkitgtk-4.0/JavaScriptCore/JSBase.h
+include/webkitgtk-4.0/JavaScriptCore/JSContextRef.h
+include/webkitgtk-4.0/JavaScriptCore/JSObjectRef.h
+include/webkitgtk-4.0/JavaScriptCore/JSStringRef.h
+include/webkitgtk-4.0/JavaScriptCore/JSTypedArray.h
+include/webkitgtk-4.0/JavaScriptCore/JSValueRef.h
+include/webkitgtk-4.0/JavaScriptCore/JavaScript.h
+include/webkitgtk-4.0/JavaScriptCore/WebKitAvailability.h
+include/webkitgtk-4.0/jsc/JSCAutocleanups.h
+include/webkitgtk-4.0/jsc/JSCClass.h
+include/webkitgtk-4.0/jsc/JSCContext.h
+include/webkitgtk-4.0/jsc/JSCDefines.h
+include/webkitgtk-4.0/jsc/JSCException.h
+include/webkitgtk-4.0/jsc/JSCOptions.h
+include/webkitgtk-4.0/jsc/JSCValue.h
+include/webkitgtk-4.0/jsc/JSCVersion.h
+include/webkitgtk-4.0/jsc/JSCVirtualMachine.h
+include/webkitgtk-4.0/jsc/JSCWeakValue.h
+include/webkitgtk-4.0/jsc/jsc.h
+include/webkitgtk-4.0/webkit2/WebKitApplicationInfo.h
+include/webkitgtk-4.0/webkit2/WebKitAuthenticationRequest.h
+include/webkitgtk-4.0/webkit2/WebKitAutocleanups.h
+include/webkitgtk-4.0/webkit2/WebKitAutomationSession.h
+include/webkitgtk-4.0/webkit2/WebKitBackForwardList.h
+include/webkitgtk-4.0/webkit2/WebKitBackForwardListItem.h
+include/webkitgtk-4.0/webkit2/WebKitColorChooserRequest.h
+include/webkitgtk-4.0/webkit2/WebKitConsoleMessage.h
+include/webkitgtk-4.0/webkit2/WebKitContextMenu.h
+include/webkitgtk-4.0/webkit2/WebKitContextMenuActions.h
+include/webkitgtk-4.0/webkit2/WebKitContextMenuItem.h
+include/webkitgtk-4.0/webkit2/WebKitCookieManager.h
+include/webkitgtk-4.0/webkit2/WebKitCredential.h
+include/webkitgtk-4.0/webkit2/WebKitDefines.h
+include/webkitgtk-4.0/webkit2/WebKitDeviceInfoPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitDownload.h
+include/webkitgtk-4.0/webkit2/WebKitEditingCommands.h
+include/webkitgtk-4.0/webkit2/WebKitEditorState.h
+include/webkitgtk-4.0/webkit2/WebKitEnumTypes.h
+include/webkitgtk-4.0/webkit2/WebKitError.h
+include/webkitgtk-4.0/webkit2/WebKitFaviconDatabase.h
+include/webkitgtk-4.0/webkit2/WebKitFileChooserRequest.h
+include/webkitgtk-4.0/webkit2/WebKitFindController.h
+include/webkitgtk-4.0/webkit2/WebKitFormSubmissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitForwardDeclarations.h
+include/webkitgtk-4.0/webkit2/WebKitFrame.h
+include/webkitgtk-4.0/webkit2/WebKitGeolocationManager.h
+include/webkitgtk-4.0/webkit2/WebKitGeolocationPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitHitTestResult.h
+include/webkitgtk-4.0/webkit2/WebKitInputMethodContext.h
+include/webkitgtk-4.0/webkit2/WebKitInstallMissingMediaPluginsPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h
+include/webkitgtk-4.0/webkit2/WebKitMediaKeySystemPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitMemoryPressureSettings.h
+include/webkitgtk-4.0/webkit2/WebKitMimeInfo.h
+include/webkitgtk-4.0/webkit2/WebKitNavigationAction.h
+include/webkitgtk-4.0/webkit2/WebKitNavigationPolicyDecision.h
+include/webkitgtk-4.0/webkit2/WebKitNetworkProxySettings.h
+include/webkitgtk-4.0/webkit2/WebKitNotification.h
+include/webkitgtk-4.0/webkit2/WebKitNotificationPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitOptionMenu.h
+include/webkitgtk-4.0/webkit2/WebKitOptionMenuItem.h
+include/webkitgtk-4.0/webkit2/WebKitPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitPlugin.h
+include/webkitgtk-4.0/webkit2/WebKitPointerLockPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitPolicyDecision.h
+include/webkitgtk-4.0/webkit2/WebKitPrintCustomWidget.h
+include/webkitgtk-4.0/webkit2/WebKitPrintOperation.h
+include/webkitgtk-4.0/webkit2/WebKitResponsePolicyDecision.h
+include/webkitgtk-4.0/webkit2/WebKitScriptDialog.h
+include/webkitgtk-4.0/webkit2/WebKitScriptWorld.h
+include/webkitgtk-4.0/webkit2/WebKitSecurityManager.h
+include/webkitgtk-4.0/webkit2/WebKitSecurityOrigin.h
+include/webkitgtk-4.0/webkit2/WebKitSettings.h
+include/webkitgtk-4.0/webkit2/WebKitURIRequest.h
+include/webkitgtk-4.0/webkit2/WebKitURIResponse.h
+include/webkitgtk-4.0/webkit2/WebKitURISchemeRequest.h
+include/webkitgtk-4.0/webkit2/WebKitURISchemeResponse.h
+include/webkitgtk-4.0/webkit2/WebKitURIUtilities.h
+include/webkitgtk-4.0/webkit2/WebKitUserContent.h
+include/webkitgtk-4.0/webkit2/WebKitUserContentFilterStore.h
+include/webkitgtk-4.0/webkit2/WebKitUserContentManager.h
+include/webkitgtk-4.0/webkit2/WebKitUserMediaPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitUserMessage.h
+include/webkitgtk-4.0/webkit2/WebKitVersion.h
+include/webkitgtk-4.0/webkit2/WebKitWebContext.h
+include/webkitgtk-4.0/webkit2/WebKitWebEditor.h
+include/webkitgtk-4.0/webkit2/WebKitWebExtension.h
+include/webkitgtk-4.0/webkit2/WebKitWebExtensionAutocleanups.h
+include/webkitgtk-4.0/webkit2/WebKitWebHitTestResult.h
+include/webkitgtk-4.0/webkit2/WebKitWebInspector.h
+include/webkitgtk-4.0/webkit2/WebKitWebPage.h
+include/webkitgtk-4.0/webkit2/WebKitWebProcessEnumTypes.h
+include/webkitgtk-4.0/webkit2/WebKitWebResource.h
+include/webkitgtk-4.0/webkit2/WebKitWebView.h
+include/webkitgtk-4.0/webkit2/WebKitWebViewBase.h
+include/webkitgtk-4.0/webkit2/WebKitWebViewSessionState.h
+include/webkitgtk-4.0/webkit2/WebKitWebsiteData.h
+include/webkitgtk-4.0/webkit2/WebKitWebsiteDataAccessPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitWebsiteDataManager.h
+include/webkitgtk-4.0/webkit2/WebKitWebsitePolicies.h
+include/webkitgtk-4.0/webkit2/WebKitWindowProperties.h
+include/webkitgtk-4.0/webkit2/webkit-web-extension.h
+include/webkitgtk-4.0/webkit2/webkit2.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMAttr.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMBlob.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCDATASection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCSSRule.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCSSRuleList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCSSStyleDeclaration.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCSSStyleSheet.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCSSValue.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCharacterData.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMClientRect.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMClientRectList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMComment.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCustom.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMCustomUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMImplementation.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMSelection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMTokenList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindowUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDeprecated.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDocument.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDocumentFragment.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDocumentFragmentUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDocumentType.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDocumentUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMEventTarget.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMFile.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMFileList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAnchorElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAppletElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAreaElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLBRElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLBaseElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLBodyElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLButtonElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLCanvasElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLCollection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLDListElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLDirectoryElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLDivElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLDocument.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLEmbedElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFieldSetElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFontElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFormElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFrameElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFrameSetElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLHRElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLHeadElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLHeadingElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLHtmlElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLIFrameElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLImageElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLInputElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLIElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLabelElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLegendElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLinkElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMapElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMarqueeElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMenuElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMetaElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLModElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLOListElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLObjectElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLOptGroupElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLOptionElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLOptionsCollection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLParagraphElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLParamElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLPreElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLQuoteElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLScriptElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLSelectElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLStyleElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableCaptionElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableCellElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableColElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableRowElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTableSectionElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTextAreaElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTitleElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLUListElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMKeyboardEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMouseEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNamedNodeMap.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNode.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNodeFilter.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNodeIterator.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNodeList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMObject.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMProcessingInstruction.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMRange.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMRangeUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStyleSheet.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStyleSheetList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMText.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTreeWalker.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMUIEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWheelEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMXPathExpression.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMXPathNSResolver.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMXPathResult.h
+include/webkitgtk-4.0/webkitdom/webkitdom.h
+include/webkitgtk-4.0/webkitdom/webkitdomautocleanups.h
+include/webkitgtk-4.0/webkitdom/webkitdomdefines.h
+${PLIST.introspection}lib/girepository-1.0/JavaScriptCore-4.0.typelib
+${PLIST.introspection}lib/girepository-1.0/WebKit2-4.0.typelib
+${PLIST.introspection}lib/girepository-1.0/WebKit2WebExtension-4.0.typelib
+lib/libjavascriptcoregtk-4.0.so
+lib/libjavascriptcoregtk-4.0.so.18
+lib/libjavascriptcoregtk-4.0.so.18.20.4
+lib/libwebkit2gtk-4.0.so
+lib/libwebkit2gtk-4.0.so.37
+lib/libwebkit2gtk-4.0.so.37.56.4
+lib/pkgconfig/javascriptcoregtk-4.0.pc
+lib/pkgconfig/webkit2gtk-4.0.pc
+lib/pkgconfig/webkit2gtk-web-extension-4.0.pc
+lib/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
+libexec/webkit2gtk-4.0/MiniBrowser
+libexec/webkit2gtk-4.0/WebKitNetworkProcess
+libexec/webkit2gtk-4.0/WebKitWebProcess
+libexec/webkit2gtk-4.0/jsc
+${PLIST.introspection}share/gir-1.0/JavaScriptCore-4.0.gir
+${PLIST.introspection}share/gir-1.0/WebKit2-4.0.gir
+${PLIST.introspection}share/gir-1.0/WebKit2WebExtension-4.0.gir
+share/locale/ar/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/as/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/bg/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ca/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/cs/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/da/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/de/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/el/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/en_CA/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/en_GB/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/eo/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/es/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/et/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/eu/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/fi/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/fr/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/gl/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/gu/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/he/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/hi/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/hu/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/id/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/it/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ja/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/kn/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ko/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/lt/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/lv/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ml/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/mr/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/nb/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/nl/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/or/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/pa/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/pl/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/pt/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/pt_BR/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ro/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ru/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/sl/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/sr/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/sr@latin/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/sv/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/ta/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/te/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/tr/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/uk/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/vi/LC_MESSAGES/WebKit2GTK-4.0.mo
+share/locale/zh_CN/LC_MESSAGES/WebKit2GTK-4.0.mo
diff --git a/webkit-gtk/buildlink3.mk b/webkit-gtk/buildlink3.mk
new file mode 100644
index 0000000000..5630a4c265
--- /dev/null
+++ b/webkit-gtk/buildlink3.mk
@@ -0,0 +1,41 @@
+# $NetBSD: buildlink3.mk,v 1.87 2022/01/13 03:57:27 gutteridge Exp $
+
+BUILDLINK_TREE+=	webkit-gtk
+
+.if !defined(WEBKIT_GTK_BUILDLINK3_MK)
+WEBKIT_GTK_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.webkit-gtk+=	webkit-gtk>=2.8
+BUILDLINK_ABI_DEPENDS.webkit-gtk?=	webkit-gtk>=2.34.2
+BUILDLINK_PKGSRCDIR.webkit-gtk?=	../../www/webkit-gtk
+
+# This is necessary to match the package requirement.
+GCC_REQD+=	8
+
+pkgbase := webkit-gtk
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.webkit-gtk:Menchant)
+.include "../../textproc/enchant2/buildlink3.mk"
+.endif
+
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/gperf/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../multimedia/gstreamer1/buildlink3.mk"
+.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
+.include "../../multimedia/gst-plugins1-good/buildlink3.mk"
+.include "../../net/libsoup/buildlink3.mk"
+.include "../../security/libsecret/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.endif # WEBKIT_GTK_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-webkit-gtk
diff --git a/webkit-gtk/distinfo b/webkit-gtk/distinfo
new file mode 100644
index 0000000000..1acf8516ad
--- /dev/null
+++ b/webkit-gtk/distinfo
@@ -0,0 +1,47 @@
+$NetBSD: distinfo,v 1.162 2022/02/17 16:55:16 leot Exp $
+
+BLAKE2s (webkitgtk-2.36.0.tar.xz) = c482ccf73d3e4b0ce68bf392097068769b85a7a6a8ada1fce54d97fc569daf36
+SHA512 (webkitgtk-2.36.0.tar.xz) = 0926a792da295b8efa8c0fb80fbb0cb27c43bb86011317d076fbe5eef347f2bc02e8afc4c75699a5c6a14363f4abcbfa2d941fdddd6646a63c7679e2380080da
+Size (webkitgtk-2.36.0.tar.xz) = 26900828 bytes
+SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = f4f117e6c1cd8eb8e4905f74946e0367156ed528
+SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697
+SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = 79c282ca90d0ba2ef4769da40d4648f5f709951b
+SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 70975aac175ec4131a4ed26a54dfe51e16ffb7cd
+SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = 8f324091df41be96b011bcbeed5fd64c4464f010
+SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 7f6c0c57d46478e83c4ff21dae2415f44085ba32
+SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93
+SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 3bf3c200917ba49573388081ea9c5f6c55605b9b
+SHA1 (patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp) = 73dfe781efe7e8aa7d49094af8820a87c501818f
+SHA1 (patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h) = 10debffda84bc752ed434657a337a466aad19a3a
+SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = ac07d4d8faa6dab606bcea31936340d260fcda33
+SHA1 (patch-Source_WTF_wtf_Assertions.h) = 427de20eba4627578087feaa7de2f23e80b9debf
+SHA1 (patch-Source_WTF_wtf_FileSystem.cpp) = 2fe7b7755646d9a1cc022aec3d01091766378aba
+SHA1 (patch-Source_WTF_wtf_PlatformEnable.h) = eb5598c20c8453314daba7897066f15827bbede7
+SHA1 (patch-Source_WTF_wtf_PlatformHave.h) = 56cec19c923ccb6539f2d321abafa1e167735b6a
+SHA1 (patch-Source_WTF_wtf_PlatformOS.h) = 80aa6ff20f10407d447fdb41606d4bb4989351aa
+SHA1 (patch-Source_WTF_wtf_PlatformUse.h) = 595486b48e7d89378208c0a209a121ef136415e6
+SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3
+SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = b292baf2494bcd459d9af91386263123046c6615
+SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 9b323aa1fa8e6e5599ac0a7ae08fbbed4348c70e
+SHA1 (patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp) = 03337c5eec54d6974dfea1766b14cb2c1b9f7750
+SHA1 (patch-Source_WebCore_inspector_InspectorFrontendHost.cpp) = daf6351a1a0b5a49592a2bb6db0d54620c7b09e3
+SHA1 (patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp) = 43f423af652533a64d0793ec6d15150b908da0f8
+SHA1 (patch-Source_WebCore_platform_network_DNS.h) = dd9fb67aae0029c6a452e7d8f09eeed1235d5700
+SHA1 (patch-Source_WebCore_rendering_RenderLayerBacking.h) = ecf722df1d1cca13573786b34fe1e3d85edf1e1e
+SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
+SHA1 (patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp) = 3a4d9415e7d3ac78a948b9e7eb5e0377575835c3
+SHA1 (patch-Source_WebKit_CMakeLists.txt) = 86d11b8a1142a1ab267e412873cca4f8924aaae8
+SHA1 (patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 14dfbee895aa7c70bf3b61b4dbb5bccd96d9583a
+SHA1 (patch-Source_WebKit_PlatformGTK.cmake) = 61d2b4942b83d3f3c1b642d122f109ba90bbff9d
+SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = f2ee81bf200fe1fe1bc59cb571e4459163a9cbde
+SHA1 (patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp) = 920376ec8697780637f376b2fff312b7e214a7f6
+SHA1 (patch-Source_WebKit_Scripts_check-xcfilelists.sh) = 22cc5ba1ababc6395aa0ef467db0c27c2fbf6878
+SHA1 (patch-Source_WebKit_Scripts_generate-unified-sources.sh) = def930cf3f706ac657b2f8835c8c0278ade8f663
+SHA1 (patch-Source_bmalloc_bmalloc_AvailableMemory.cpp) = 3e556090fc99a9767368eb24e277f356a43469e5
+SHA1 (patch-Source_bmalloc_bmalloc_BPlatform.h) = 28d1f657fde427062a729b26398e96825082fc4d
+SHA1 (patch-Source_bmalloc_bmalloc_VMAllocate.h) = 22c23689fa79c930145068ed7966844bbf92a6a9
+SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 7db9d7b06e7f784000e66b0dab23e98f6298107a
+SHA1 (patch-Source_cmake_WebKitCommon.cmake) = 73a0da491ef93d5cc25214e7733b54bbdacd487e
+SHA1 (patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh) = 6e8327bf46150806910b21b298767f313e1eb3ce
+SHA1 (patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh) = 06747f279263558f05bb01c8da9c994a357ce74a
+SHA1 (patch-aj) = ec60907df4336b755d1d1924c026b3041805f431
diff --git a/webkit-gtk/options.mk b/webkit-gtk/options.mk
new file mode 100644
index 0000000000..79bf23e3f6
--- /dev/null
+++ b/webkit-gtk/options.mk
@@ -0,0 +1,96 @@
+# $NetBSD: options.mk,v 1.21 2020/03/10 18:14:04 leot Exp $
+#
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.webkit-gtk
+PKG_SUPPORTED_OPTIONS=	debug enchant introspection opengl webkit-jit wayland
+PKG_SUGGESTED_OPTIONS=	enchant introspection opengl
+.include "../../devel/wayland/platform.mk"
+.if ${PLATFORM_SUPPORTS_WAYLAND} == "yes"
+PKG_SUGGESTED_OPTIONS+=	wayland
+.endif
+
+PLIST_VARS=	introspection
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+#
+# Platforms that support the webkit-jit option
+#
+# Please see:
+#  Source/cmake/WebKitFeatures.cmake
+#  Source/WTF/wtf/PlatformEnable.h
+#
+WEBKIT_JIT_MACHINE_PLATFORMS+=	Darwin-*-*
+WEBKIT_JIT_MACHINE_PLATFORMS+=	DragonFly-*-*
+WEBKIT_JIT_MACHINE_PLATFORMS+=	FreeBSD-*-x86_64 FreeBSD-*-aarch64
+WEBKIT_JIT_MACHINE_PLATFORMS+=	Linux-*-x86_64 Linux-*-arm*
+WEBKIT_JIT_MACHINE_PLATFORMS+=	Linux-*-aarch64 Linux-*-mips*
+WEBKIT_JIT_MACHINE_PLATFORMS+=	NetBSD-*-x86_64 NetBSD-*-aarch64
+
+.if !empty(WEBKIT_JIT_MACHINE_PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@)
+PKG_SUGGESTED_OPTIONS+=	webkit-jit
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+#
+# JIT support
+#
+.if !empty(PKG_OPTIONS:Mwebkit-jit)
+CMAKE_ARGS+=	-DENABLE_JIT=ON
+CMAKE_ARGS+=	-DENABLE_C_LOOP=OFF
+.else
+CMAKE_ARGS+=	-DENABLE_JIT=OFF
+.endif
+
+#
+# OpenGL support: enable support for GLX, WebGL and accelerated compositing
+#
+.if !empty(PKG_OPTIONS:Mopengl)
+CMAKE_ARGS+=	-DENABLE_OPENGL=ON
+.else
+CMAKE_ARGS+=	-DENABLE_OPENGL=OFF
+.endif
+
+#
+# Spellcheck support using enchant
+#
+.if !empty(PKG_OPTIONS:Menchant)
+CMAKE_ARGS+=	-DENABLE_SPELLCHECK=ON
+.include "../../textproc/enchant2/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DENABLE_SPELLCHECK=OFF
+.endif
+
+#
+# Debug build
+#
+.if !empty(PKG_OPTIONS:Mdebug)
+CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Debug
+.else
+CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+.endif
+
+#
+# Introspection
+#
+.if !empty(PKG_OPTIONS:Mintrospection)
+PLIST.introspection=				yes
+BUILDLINK_API_DEPENDS.gobject-introspection+=	gobject-introspection>=0.9.5
+BUILDLINK_DEPMETHOD.gobject-introspection+=	build
+.include "../../devel/gobject-introspection/buildlink3.mk"
+CMAKE_ARGS+=	-DENABLE_INTROSPECTION=ON
+.else
+CMAKE_ARGS+=	-DENABLE_INTROSPECTION=OFF
+.endif
+
+#
+# Wayland display server support
+#
+.if !empty(PKG_OPTIONS:Mwayland)
+CMAKE_ARGS+=	-DENABLE_WAYLAND_TARGET=ON
+CMAKE_ARGS+=	-DUSE_WPE_RENDERER=OFF # TODO
+.include "../../devel/wayland/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DENABLE_WAYLAND_TARGET=OFF
+.endif
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh b/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh
new file mode 100644
index 0000000000..b8e938b9ac
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh
@@ -0,0 +1,18 @@
+$NetBSD: patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh,v 1.2 2019/09/10 22:10:04 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/JavaScriptCore/Scripts/check-xcfilelists.sh.orig	2019-08-28 11:46:27.000000000 +0000
++++ Source/JavaScriptCore/Scripts/check-xcfilelists.sh
+@@ -1,8 +1,8 @@
+ #!/bin/sh
+ 
+-[ "${WK_DISABLE_CHECK_XCFILELISTS}" == "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
+-[ "${DEPLOYMENT_LOCATION}" == "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
+-[ "${USE_INTERNAL_SDK}" == "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
++[ "${WK_DISABLE_CHECK_XCFILELISTS}" = "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
++[ "${DEPLOYMENT_LOCATION}" = "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
++[ "${USE_INTERNAL_SDK}" = "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
+ 
+ SCRIPT="${BUILD_SCRIPTS_DIR}/generate-xcfilelists"
+ [ -f "${SCRIPT}" ] || SCRIPT="${PROJECT_DIR}/../../../${WK_ADDITIONAL_SCRIPTS_DIR}/generate-xcfilelists"
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh b/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh
new file mode 100644
index 0000000000..6bf6296dc4
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh,v 1.1 2019/03/13 20:49:40 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/JavaScriptCore/Scripts/generate-unified-sources.sh.orig	2019-02-12 11:21:03.000000000 +0000
++++ Source/JavaScriptCore/Scripts/generate-unified-sources.sh
+@@ -7,7 +7,7 @@ ARGS=("$@")
+ cd $SRCROOT
+ 
+ if [ -z "${BUILD_SCRIPTS_DIR}" ]; then
+-    if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
++    if [ "${DEPLOYMENT_LOCATION}" = "YES" ]; then
+         BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+     else
+         BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
new file mode 100644
index 0000000000..38e8011156
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler.h,v 1.5 2020/03/10 18:14:04 leot Exp $
+
+- Add support for FreeBSD and NetBSD.
+  Based on patch from FreeBSD ports but using __builtin___clear_cache()
+  instead of __clear_cache() (the former is also available in gcc).
+
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig	2020-02-04 10:23:58.000000000 +0000
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2809,6 +2809,8 @@ public:
+     {
+ #if OS(DARWIN)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD)
++        __builtin___clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(FUCHSIA)
+         zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN);
+ #elif OS(LINUX)
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
new file mode 100644
index 0000000000..2f20d189cf
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h
@@ -0,0 +1,30 @@
+$NetBSD: patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h,v 1.2 2019/09/10 22:10:04 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/JavaScriptCore/assembler/ARMv7Assembler.h.orig	2019-08-28 11:46:27.000000000 +0000
++++ Source/JavaScriptCore/assembler/ARMv7Assembler.h
+@@ -28,6 +28,11 @@
+ 
+ #if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2)
+ 
++#if OS(NETBSD)
++#include <sys/types.h>
++#include <machine/sysarch.h>
++#endif
++
+ #include "AssemblerBuffer.h"
+ #include "AssemblerCommon.h"
+ #include "RegisterInfo.h"
+@@ -2394,6 +2399,11 @@ public:
+             linuxPageFlush(current, current + page);
+ 
+         linuxPageFlush(current, end);
++#elif OS(NETBSD)
++	struct arm_sync_icache_args arg;
++	arg.addr = reinterpret_cast<uintptr_t>(code);
++	arg.len = size;
++	sysarch(ARM_SYNC_ICACHE, (void *)&arg);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MarkedSpace.cpp b/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MarkedSpace.cpp
new file mode 100644
index 0000000000..4c113366ae
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MarkedSpace.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_JavaScriptCore_heap_MarkedSpace.cpp,v 1.4 2021/09/28 22:11:54 leot Exp $
+
+Avoid ambiguous function call.
+
+--- Source/JavaScriptCore/heap/MarkedSpace.cpp.orig	2021-09-01 09:16:46.000000000 +0000
++++ Source/JavaScriptCore/heap/MarkedSpace.cpp
+@@ -29,6 +29,8 @@
+ #include <wtf/ListDump.h>
+ #include <wtf/SimpleStats.h>
+ 
++using std::pow;
++
+ namespace JSC {
+ 
+ std::array<unsigned, MarkedSpace::numSizeClasses> MarkedSpace::s_sizeClassForSizeStep;
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp b/webkit-gtk/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp
new file mode 100644
index 0000000000..0825520e9e
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp,v 1.5 2020/09/11 14:47:35 leot Exp $
+
+Avoid to (pre)allocate 1GB of memory on OpenBSD:
+
+ <https://bugs.webkit.org/show_bug.cgi?id=61137>
+
+From OpenBSD ports.
+
+--- Source/JavaScriptCore/jit/ExecutableAllocator.cpp.orig	2020-08-12 09:17:53.000000000 +0000
++++ Source/JavaScriptCore/jit/ExecutableAllocator.cpp
+@@ -93,7 +93,7 @@ static constexpr size_t maxIslandsPerReg
+ #else
+ static constexpr size_t fixedExecutableMemoryPoolSize = 128 * MB;
+ #endif
+-#elif CPU(X86_64)
++#elif CPU(X86_64) && !OS(OPENBSD)
+ static constexpr size_t fixedExecutableMemoryPoolSize = 1 * GB;
+ #else
+ static constexpr size_t fixedExecutableMemoryPoolSize = 32 * MB;
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_offlineasm_arm64.rb b/webkit-gtk/patches/patch-Source_JavaScriptCore_offlineasm_arm64.rb
new file mode 100644
index 0000000000..6521177f99
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_offlineasm_arm64.rb
@@ -0,0 +1,19 @@
+$NetBSD: patch-Source_JavaScriptCore_offlineasm_arm64.rb,v 1.2 2019/03/13 20:49:40 leot Exp $
+
+Add support for FreeBSD and NetBSD.
+
+From FreeBSD ports.
+
+--- Source/JavaScriptCore/offlineasm/arm64.rb.orig	2019-02-12 11:21:03.000000000 +0000
++++ Source/JavaScriptCore/offlineasm/arm64.rb
+@@ -1033,8 +1033,8 @@ class Instruction
+             $asm.puts "L_offlineasm_loh_ldr_#{uid}:"
+             $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)")
++            # On Linux, FreeBSD and NetBSD, use ELF GOT relocation specifiers.
++            $asm.putStr("#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD)")
+             $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/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_MachineContext.h b/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_MachineContext.h
new file mode 100644
index 0000000000..31388c8cf2
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_MachineContext.h
@@ -0,0 +1,121 @@
+$NetBSD: patch-Source_JavaScriptCore_runtime_MachineContext.h,v 1.2 2021/05/13 08:20:58 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/JavaScriptCore/runtime/MachineContext.h.orig	2021-05-05 05:33:24.000000000 +0000
++++ Source/JavaScriptCore/runtime/MachineContext.h
+@@ -196,6 +196,22 @@ static inline void*& stackPointerImpl(mc
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(NETBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_UESP]);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSP]);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ #if CPU(X86)
+@@ -347,6 +363,22 @@ static inline void*& framePointerImpl(mc
+ #error Unknown Architecture
+ #endif
+ 
++#elif OS(NETBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EBP]);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RBP]);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_S8]);
++#else
++#error Unknown Architecture
++#endif
++
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -497,6 +529,22 @@ static inline void*& instructionPointerI
+ #else
+ #error Unknown Architecture
+ #endif
++ 
++#elif OS(NETBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EIP]);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RIP]);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EPC]);
++#else
++#error Unknown Architecture
++#endif
+ 
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+@@ -655,6 +703,22 @@ inline void*& argumentPointer<1>(mcontex
+ #else
+ #error Unknown Architecture
+ #endif
++ 
++#elif OS(NETBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EDX]);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSI]);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_A1]);
++#else
++#error Unknown Architecture
++#endif
+ 
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
+@@ -772,6 +836,22 @@ inline void*& llintInstructionPointer(mc
+ #else
+ #error Unknown Architecture
+ #endif
++ 
++#elif OS(NETBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_ESI]);
++#elif CPU(X86_64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X4]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_T4]);
++#else
++#error Unknown Architecture
++#endif
+ 
+ #elif OS(FUCHSIA) || OS(LINUX)
+ 
diff --git a/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp b/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp
new file mode 100644
index 0000000000..0fd286a91a
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2021/01/12 15:21:31 jperkin Exp $
+
+Need endian.h on SunOS.
+
+--- Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp.orig	2020-08-12 09:17:53.000000000 +0000
++++ Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp
+@@ -48,6 +48,9 @@ on big endian machines, or a byte-by-byt
+ -----------------------------------------------------------------------------*/
+ 
+ #include "PMurHash.h"
++#ifdef __sun
++#include <endian.h>
++#endif
+ #include <stdint.h>
+ 
+ /* I used ugly type names in the header to avoid potential conflicts with
diff --git a/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h b/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h
new file mode 100644
index 0000000000..73e24a103e
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h,v 1.2 2020/03/10 18:14:04 leot Exp $
+
+Include <cmath> for is isinf/isnan used in SymbolTable_autogen.cpp.
+
+--- Source/ThirdParty/ANGLE/src/compiler/translator/SymbolTable.h.orig	2020-02-04 10:24:05.000000000 +0000
++++ Source/ThirdParty/ANGLE/src/compiler/translator/SymbolTable.h
+@@ -30,6 +30,7 @@
+ //   are tracked in the intermediate representation, not the symbol table.
+ //
+ 
++#include <cmath>
+ #include <limits>
+ #include <memory>
+ #include <set>
diff --git a/webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h b/webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h
new file mode 100644
index 0000000000..d6a33d4e5c
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h,v 1.5 2021/09/28 22:11:54 leot Exp $
+
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig	2021-09-01 09:16:47.000000000 +0000
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -42,6 +42,7 @@
+ 
+ #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
+ #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
++#include <ciso646>
+ 
+ // Environment-describing macros
+ // -----------------------------
+@@ -261,6 +262,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ 
+ #include <cerrno>
+ #include <cstdint>
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_Assertions.h b/webkit-gtk/patches/patch-Source_WTF_wtf_Assertions.h
new file mode 100644
index 0000000000..563c6c1d1c
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_Assertions.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WTF_wtf_Assertions.h,v 1.1 2021/01/12 15:21:31 jperkin Exp $
+
+Use regular static_assert on SunOS.
+
+--- Source/WTF/wtf/Assertions.h.orig	2020-08-12 09:17:54.000000000 +0000
++++ Source/WTF/wtf/Assertions.h
+@@ -452,7 +452,7 @@ constexpr bool assertionFailureDueToUnre
+ 
+ /* COMPILE_ASSERT */
+ #ifndef COMPILE_ASSERT
+-#if COMPILER_SUPPORTS(C_STATIC_ASSERT)
++#if COMPILER_SUPPORTS(C_STATIC_ASSERT) && !defined(__sun)
+ /* Unlike static_assert below, this also works in plain C code. */
+ #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
+ #else
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_FileSystem.cpp b/webkit-gtk/patches/patch-Source_WTF_wtf_FileSystem.cpp
new file mode 100644
index 0000000000..c1772527a1
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_FileSystem.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-Source_WTF_wtf_FileSystem.cpp,v 1.3 2020/09/11 14:47:35 leot Exp $
+
+Support MAP_FILE if unavailable.
+
+--- Source/WTF/wtf/FileSystem.cpp.orig	2020-08-12 09:17:54.000000000 +0000
++++ Source/WTF/wtf/FileSystem.cpp
+@@ -339,6 +339,9 @@ bool MappedFileData::mapFileHandle(Platf
+ #endif
+     }
+ 
++#ifndef MAP_FILE
++#define MAP_FILE	0
++#endif
+     void* data = mmap(0, size, pageProtection, MAP_FILE | (mapMode == MappedFileMode::Shared ? MAP_SHARED : MAP_PRIVATE), fd, 0);
+ 
+     if (data == MAP_FAILED) {
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformEnable.h b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformEnable.h
new file mode 100644
index 0000000000..95d347c82e
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformEnable.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-Source_WTF_wtf_PlatformEnable.h,v 1.1 2020/03/10 18:14:04 leot Exp $
+
+Enable the JIT on NetBSD.
+
+--- Source/WTF/wtf/PlatformEnable.h.orig	2020-02-04 10:24:07.000000000 +0000
++++ Source/WTF/wtf/PlatformEnable.h
+@@ -625,12 +625,12 @@
+ #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(NETBSD) || OS(HURD) || OS(WINDOWS))
+ #define ENABLE_DFG_JIT 1
+ #endif
+ 
+-/* Enable the DFG JIT on ARMv7.  Only tested on iOS, Linux, and FreeBSD. */
+-#if (CPU(ARM_THUMB2) || CPU(ARM64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD))
++/* Enable the DFG JIT on ARMv7.  Only tested on iOS, Linux, and FreeBSD and NetBSD. */
++#if (CPU(ARM_THUMB2) || CPU(ARM64)) && (OS(DARWIN) || OS(LINUX) || OS(FREEBSD) || OS(NETBSD))
+ #define ENABLE_DFG_JIT 1
+ #endif
+ 
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformHave.h b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformHave.h
new file mode 100644
index 0000000000..a388dbcc36
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformHave.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WTF_wtf_PlatformHave.h,v 1.2 2021/05/13 08:20:58 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/WTF/wtf/PlatformHave.h.orig	2022-02-23 08:58:57.000000000 +0000
++++ Source/WTF/wtf/PlatformHave.h
+@@ -229,7 +229,7 @@
+ #define HAVE_HOSTED_CORE_ANIMATION 1
+ #endif
+ 
+-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(OPENBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS) || CPU(RISCV64)))
++#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS) || CPU(RISCV64)))
+ #define HAVE_MACHINE_CONTEXT 1
+ #endif
+ 
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformOS.h b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformOS.h
new file mode 100644
index 0000000000..596754fbb7
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformOS.h
@@ -0,0 +1,26 @@
+$NetBSD: patch-Source_WTF_wtf_PlatformOS.h,v 1.1 2020/03/10 18:14:04 leot Exp $
+
+Add OS(SOLARIS) definition and add them to Unix systems.
+
+--- Source/WTF/wtf/PlatformOS.h.orig	2020-02-04 10:24:07.000000000 +0000
++++ Source/WTF/wtf/PlatformOS.h
+@@ -114,6 +114,11 @@
+ #define WTF_OS_OPENBSD 1
+ #endif
+ 
++/* OS(SOLARIS) - Solaris and derivatives */
++#ifdef __sun
++#define WTF_OS_SOLARIS 1
++#endif
++
+ /* OS(WINDOWS) - Any version of Windows */
+ #if defined(WIN32) || defined(_WIN32)
+ #define WTF_OS_WINDOWS 1
+@@ -129,6 +134,7 @@
+     || OS(LINUX)            \
+     || OS(NETBSD)           \
+     || OS(OPENBSD)          \
++    || OS(SOLARIS)          \
+     || defined(unix)        \
+     || defined(__unix)      \
+     || defined(__unix__)
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformUse.h b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformUse.h
new file mode 100644
index 0000000000..d2e4aa35eb
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_PlatformUse.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WTF_wtf_PlatformUse.h,v 1.1 2020/03/10 18:14:04 leot Exp $
+
+Avoid flock() on SunOS, not supported on older platforms.
+
+--- Source/WTF/wtf/PlatformUse.h.orig	2020-02-04 10:24:07.000000000 +0000
++++ Source/WTF/wtf/PlatformUse.h
+@@ -87,7 +87,7 @@
+ #define USE_CF 1
+ #endif
+ 
+-#if PLATFORM(COCOA) || (PLATFORM(GTK) || PLATFORM(WPE))
++#if (PLATFORM(COCOA) || (PLATFORM(GTK) || PLATFORM(WPE))) && !OS(SOLARIS)
+ #define USE_FILE_LOCK 1
+ #endif
+ 
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp b/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp
new file mode 100644
index 0000000000..043ef1520c
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_WTF_wtf_StackBounds.cpp,v 1.2 2018/10/24 18:31:07 leot Exp $
+
+SunOS does not have pthread_getattr_np.
+
+--- Source/WTF/wtf/StackBounds.cpp.orig	2018-02-19 07:45:30.000000000 +0000
++++ Source/WTF/wtf/StackBounds.cpp
+@@ -131,6 +131,7 @@ StackBounds StackBounds::newThreadStackB
+ #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
+     // e.g. on FreeBSD 5.4, neundorf%kde.org@localhost
+     pthread_attr_get_np(thread, &sattr);
++#elif OS(SOLARIS)
+ #else
+     // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
+     pthread_getattr_np(thread, &sattr);
diff --git a/webkit-gtk/patches/patch-Source_WebCore_Scripts_check-xcfilelists.sh b/webkit-gtk/patches/patch-Source_WebCore_Scripts_check-xcfilelists.sh
new file mode 100644
index 0000000000..1f242aa123
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_Scripts_check-xcfilelists.sh
@@ -0,0 +1,18 @@
+$NetBSD: patch-Source_WebCore_Scripts_check-xcfilelists.sh,v 1.2 2019/09/10 22:10:04 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/WebCore/Scripts/check-xcfilelists.sh.orig	2019-08-28 11:46:30.000000000 +0000
++++ Source/WebCore/Scripts/check-xcfilelists.sh
+@@ -1,8 +1,8 @@
+ #!/bin/sh
+ 
+-[ "${WK_DISABLE_CHECK_XCFILELISTS}" == "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
+-[ "${DEPLOYMENT_LOCATION}" == "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
+-[ "${USE_INTERNAL_SDK}" == "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
++[ "${WK_DISABLE_CHECK_XCFILELISTS}" = "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
++[ "${DEPLOYMENT_LOCATION}" = "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
++[ "${USE_INTERNAL_SDK}" = "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
+ 
+ SCRIPT="${BUILD_SCRIPTS_DIR}/generate-xcfilelists"
+ [ -f "${SCRIPT}" ] || SCRIPT="${PROJECT_DIR}/../../../${WK_ADDITIONAL_SCRIPTS_DIR}/generate-xcfilelists"
diff --git a/webkit-gtk/patches/patch-Source_WebCore_Scripts_generate-unified-sources.sh b/webkit-gtk/patches/patch-Source_WebCore_Scripts_generate-unified-sources.sh
new file mode 100644
index 0000000000..a13ff830e4
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_Scripts_generate-unified-sources.sh
@@ -0,0 +1,24 @@
+$NetBSD: patch-Source_WebCore_Scripts_generate-unified-sources.sh,v 1.2 2020/09/11 14:47:35 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/WebCore/Scripts/generate-unified-sources.sh.orig	2020-08-12 09:17:55.000000000 +0000
++++ Source/WebCore/Scripts/generate-unified-sources.sh
+@@ -7,7 +7,7 @@ ARGS=("$@")
+ cd $SRCROOT
+ 
+ if [ -z "${BUILD_SCRIPTS_DIR}" ]; then
+-    if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
++    if [ "${DEPLOYMENT_LOCATION}" = "YES" ]; then
+         BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+     else
+         BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
+@@ -22,7 +22,7 @@ if [ $# -eq 0 ]; then
+ fi
+ 
+ SOURCES="Sources.txt SourcesCocoa.txt"
+-if [ "${USE_INTERNAL_SDK}" == "YES" ]; then
++if [ "${USE_INTERNAL_SDK}" = "YES" ]; then
+     SOURCES="${SOURCES} SourcesCocoaInternalSDK.txt"
+ fi
+ 
diff --git a/webkit-gtk/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp b/webkit-gtk/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp
new file mode 100644
index 0000000000..fc20a3f8c3
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_WebCore_crypto_algorithms_CryptoAlgorithmAES__GCM.cpp,v 1.1 2020/07/28 14:24:03 leot Exp $
+
+Define non-stardard __WORDSIZE.
+
+--- Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp.orig	2020-02-04 10:24:07.000000000 +0000
++++ Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp
+@@ -26,6 +26,10 @@
+ #include "config.h"
+ #include "CryptoAlgorithmAES_GCM.h"
+ 
++#ifndef __WORDSIZE
++#define __WORDSIZE (__SIZEOF_LONG__ * 8)
++#endif
++
+ #if ENABLE(WEB_CRYPTO)
+ 
+ #include "CryptoAlgorithmAesGcmParams.h"
diff --git a/webkit-gtk/patches/patch-Source_WebCore_inspector_InspectorFrontendHost.cpp b/webkit-gtk/patches/patch-Source_WebCore_inspector_InspectorFrontendHost.cpp
new file mode 100644
index 0000000000..4d6971e9c5
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_inspector_InspectorFrontendHost.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebCore_inspector_InspectorFrontendHost.cpp,v 1.1 2018/10/24 18:31:07 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/WebCore/inspector/InspectorFrontendHost.cpp.orig	2018-08-06 14:07:41.000000000 +0000
++++ Source/WebCore/inspector/InspectorFrontendHost.cpp
+@@ -279,6 +279,8 @@ String InspectorFrontendHost::platform()
+     return "freebsd"_s;
+ #elif OS(OPENBSD)
+     return "openbsd"_s;
++#elif OS(NETBSD)
++    return "netbsd"_s;
+ #else
+     return "unknown"_s;
+ #endif
diff --git a/webkit-gtk/patches/patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp b/webkit-gtk/patches/patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp
new file mode 100644
index 0000000000..51e4ea0fe3
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp,v 1.1 2018/06/15 09:17:02 jperkin Exp $
+
+Avoid ambiguous function call.
+
+--- Source/WebCore/platform/graphics/filters/FEMorphology.cpp.orig	2022-02-23 08:59:02.000000000 +0000
++++ Source/WebCore/platform/graphics/filters/FEMorphology.cpp
+@@ -29,6 +29,8 @@
+ #include "FEMorphologySoftwareApplier.h"
+ #include <wtf/text/TextStream.h>
+ 
++using std::sqrt;
++
+ namespace WebCore {
+ 
+ Ref<FEMorphology> FEMorphology::create(MorphologyOperatorType type, float radiusX, float radiusY)
diff --git a/webkit-gtk/patches/patch-Source_WebCore_platform_network_DNS.h b/webkit-gtk/patches/patch-Source_WebCore_platform_network_DNS.h
new file mode 100644
index 0000000000..8185637aef
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_platform_network_DNS.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_WebCore_platform_network_DNS.h,v 1.2 2021/09/28 22:11:54 leot Exp $
+
+Include sys/socket.h for AF_*.
+
+--- Source/WebCore/platform/network/DNS.h.orig	2021-09-01 09:16:50.000000000 +0000
++++ Source/WebCore/platform/network/DNS.h
+@@ -34,6 +34,7 @@
+ #include <ws2tcpip.h>
+ #else
+ #include <netinet/in.h>
++#include <sys/socket.h>
+ #endif
+ 
+ namespace WebCore {
diff --git a/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderLayerBacking.h b/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderLayerBacking.h
new file mode 100644
index 0000000000..a5bc9bd4af
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_rendering_RenderLayerBacking.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_WebCore_rendering_RenderLayerBacking.h,v 1.1 2020/07/28 14:24:03 leot Exp $
+
+Define non-stardard __WORDSIZE.
+
+--- Source/WebCore/rendering/RenderLayerBacking.h.orig	2020-02-04 10:24:08.000000000 +0000
++++ Source/WebCore/rendering/RenderLayerBacking.h
+@@ -33,6 +33,10 @@
+ #include "RenderLayerCompositor.h"
+ #include "ScrollingCoordinator.h"
+ 
++#ifndef __WORDSIZE
++#define __WORDSIZE (__SIZEOF_LONG__ * 8)
++#endif
++
+ namespace WebCore {
+ 
+ class EventRegionContext;
diff --git a/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp b/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
new file mode 100644
index 0000000000..23109a78ef
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebCore_rendering_shapes_RasterShape.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Avoid ambiguous function call.
+
+--- Source/WebCore/rendering/shapes/RasterShape.cpp.orig	2016-04-11 06:18:44.000000000 +0000
++++ Source/WebCore/rendering/shapes/RasterShape.cpp
+@@ -142,7 +142,7 @@ const RasterShapeIntervals& RasterShape:
+         return *m_intervals;
+ 
+     int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin()));
+-    int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(2);
++    int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt((double)2);
+     if (!m_marginIntervals)
+         m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt));
+ 
diff --git a/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp b/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp
new file mode 100644
index 0000000000..fbe298c119
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp,v 1.1 2021/03/30 12:47:42 leot Exp $
+
+Properly calls std::isnan()
+
+--- Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp.orig	2021-02-26 09:57:14.000000000 +0000
++++ Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
+@@ -172,7 +172,7 @@ const Shape& ShapeOutsideInfo::computedS
+     WritingMode writingMode = containingBlockStyle.writingMode();
+     auto margin = [&] {
+         auto shapeMargin = floatValueForLength(m_renderer.style().shapeMargin(), m_renderer.containingBlock() ? m_renderer.containingBlock()->contentWidth() : 0_lu);
+-        return isnan(shapeMargin) ? 0.0f : shapeMargin;
++        return std::isnan(shapeMargin) ? 0.0f : shapeMargin;
+     }();
+     float shapeImageThreshold = style.shapeImageThreshold();
+     const ShapeValue& shapeValue = *style.shapeOutside();
diff --git a/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt b/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
new file mode 100644
index 0000000000..69b049b631
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_WebKit_CMakeLists.txt,v 1.2 2021/04/27 07:57:06 leot Exp $
+
+SunOS requires libsocket.
+
+--- Source/WebKit/CMakeLists.txt.orig	2021-03-25 13:27:32.000000000 +0000
++++ Source/WebKit/CMakeLists.txt
+@@ -362,6 +362,10 @@ if (UNIX)
+     endif ()
+ endif ()
+ 
++if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
++    list(APPEND WebKit_LIBRARIES socket)
++endif ()
++
+ macro(ADD_WEBKIT_PREFIX_HEADER _target)
+     if (WebKit_USE_PREFIX_HEADER)
+         get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
diff --git a/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp b/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp
new file mode 100644
index 0000000000..109f6e0dcc
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp,v 1.4 2020/09/11 14:47:35 leot Exp $
+
+SunOS does not support DT_{DIR,REG}
+
+--- Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp.orig	2020-08-12 09:17:56.000000000 +0000
++++ Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp
+@@ -36,6 +36,12 @@
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
++#ifndef DT_DIR
++#define DT_DIR	S_IFDIR
++#endif
++#ifndef DT_REG
++#define DT_REG	S_IFREG
++#endif
+ #else
+ #include <windows.h>
+ #endif
diff --git a/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake b/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake
new file mode 100644
index 0000000000..175dc3b51d
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_PlatformGTK.cmake,v 1.3 2019/03/13 20:49:41 leot Exp $
+
+SunOS ld does not support --version-script.
+
+--- Source/WebKit/PlatformGTK.cmake.orig	2019-02-20 11:21:53.000000000 +0000
++++ Source/WebKit/PlatformGTK.cmake
+@@ -22,7 +22,7 @@ add_definitions(-DLOCALEDIR="${CMAKE_INS
+ add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
+ add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
+ 
+-if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
++if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
+     WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
+ endif ()
+ 
diff --git a/webkit-gtk/patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp b/webkit-gtk/patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp
new file mode 100644
index 0000000000..ba5ed3e896
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp
@@ -0,0 +1,35 @@
+$NetBSD: patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp,v 1.3 2021/01/12 15:21:31 jperkin Exp $
+
+On NetBSD we see "Error sending IPC message: Message too long" due to
+the use of sendmsg with a large message body (EMSGSIZE).
+
+WebKit already uses shared memory to communicate the message body when
+the message is too large, so force it to always use this method to avoid
+encountering EMSGSIZE.
+
+--- Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp.orig	2020-08-12 09:17:56.000000000 +0000
++++ Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
+@@ -56,6 +56,10 @@
+ #endif
+ #endif // SOCK_SEQPACKET
+ 
++#ifndef MSG_NOSIGNAL
++#define MSG_NOSIGNAL	0
++#endif
++
+ namespace IPC {
+ 
+ static const size_t messageMaxSize = 4096;
+@@ -417,8 +421,12 @@ bool Connection::sendOutgoingMessage(std
+         return false;
+     }
+ 
++#if 0
+     size_t messageSizeWithBodyInline = sizeof(MessageInfo) + (outputMessage.attachments().size() * sizeof(AttachmentInfo)) + outputMessage.bodySize();
+     if (messageSizeWithBodyInline > messageMaxSize && outputMessage.bodySize()) {
++#else
++    {
++#endif
+         RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::allocate(encoder->bufferSize());
+         if (!oolMessageBody)
+             return false;
diff --git a/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp b/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp
new file mode 100644
index 0000000000..7da485db18
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+Avoid ambiguous function call.
+
+--- Source/WebKit/Platform/classifier/ResourceLoadStatisticsClassifier.cpp.orig	2018-02-20 07:38:30.000000000 +0000
++++ Source/WebKit/Platform/classifier/ResourceLoadStatisticsClassifier.cpp
+@@ -29,6 +29,8 @@
+ #include "Logging.h"
+ #include <WebCore/ResourceLoadStatistics.h>
+ 
++using std::sqrt;
++
+ namespace WebKit {
+ using namespace WebCore;
+ 
diff --git a/webkit-gtk/patches/patch-Source_WebKit_Scripts_check-xcfilelists.sh b/webkit-gtk/patches/patch-Source_WebKit_Scripts_check-xcfilelists.sh
new file mode 100644
index 0000000000..083291faba
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_Scripts_check-xcfilelists.sh
@@ -0,0 +1,18 @@
+$NetBSD: patch-Source_WebKit_Scripts_check-xcfilelists.sh,v 1.2 2019/09/10 22:10:04 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/WebKit/Scripts/check-xcfilelists.sh.orig	2019-08-28 11:46:32.000000000 +0000
++++ Source/WebKit/Scripts/check-xcfilelists.sh
+@@ -1,8 +1,8 @@
+ #!/bin/sh
+ 
+-[ "${WK_DISABLE_CHECK_XCFILELISTS}" == "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
+-[ "${DEPLOYMENT_LOCATION}" == "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
+-[ "${USE_INTERNAL_SDK}" == "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
++[ "${WK_DISABLE_CHECK_XCFILELISTS}" = "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
++[ "${DEPLOYMENT_LOCATION}" = "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
++[ "${USE_INTERNAL_SDK}" = "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
+ 
+ SCRIPT="${BUILD_SCRIPTS_DIR}/generate-xcfilelists"
+ [ -f "${SCRIPT}" ] || SCRIPT="${PROJECT_DIR}/../../../${WK_ADDITIONAL_SCRIPTS_DIR}/generate-xcfilelists"
diff --git a/webkit-gtk/patches/patch-Source_WebKit_Scripts_generate-unified-sources.sh b/webkit-gtk/patches/patch-Source_WebKit_Scripts_generate-unified-sources.sh
new file mode 100644
index 0000000000..26851b80d3
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_Scripts_generate-unified-sources.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_Scripts_generate-unified-sources.sh,v 1.1 2019/03/13 20:49:41 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Source/WebKit/Scripts/generate-unified-sources.sh.orig	2019-02-12 11:21:18.000000000 +0000
++++ Source/WebKit/Scripts/generate-unified-sources.sh
+@@ -7,7 +7,7 @@ ARGS=("$@")
+ cd $SRCROOT
+ 
+ if [ -z "${BUILD_SCRIPTS_DIR}" ]; then
+-    if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
++    if [ "${DEPLOYMENT_LOCATION}" = "YES" ]; then
+         BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+     else
+         BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
diff --git a/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp
new file mode 100644
index 0000000000..349cb4c15e
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+sysinfo() is used only on FreeBSD and Linux.
+
+--- Source/bmalloc/bmalloc/AvailableMemory.cpp.orig	2022-02-23 08:59:06.000000000 +0000
++++ Source/bmalloc/bmalloc/AvailableMemory.cpp
+@@ -44,15 +44,16 @@
+ #import <mach/mach_error.h>
+ #import <math.h>
+ #elif BOS(UNIX)
+-#include <sys/sysinfo.h>
+ #if BOS(LINUX)
+ #include <algorithm>
+ #include <fcntl.h>
++#include <sys/sysinfo.h>
+ #elif BOS(FREEBSD)
+ #include "VMAllocate.h"
+ #include <sys/sysctl.h>
+ #include <sys/types.h>
+ #include <sys/user.h>
++#include <sys/sysinfo.h>
+ #endif
+ #include <unistd.h>
+ #endif
diff --git a/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_BPlatform.h b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_BPlatform.h
new file mode 100644
index 0000000000..ded0539f8f
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_BPlatform.h
@@ -0,0 +1,25 @@
+$NetBSD: patch-Source_bmalloc_bmalloc_BPlatform.h,v 1.2 2019/09/10 22:10:04 leot Exp $
+
+Add BOS(SOLARIS) and BOS(NETBSD) definitions.
+
+--- Source/bmalloc/bmalloc/BPlatform.h.orig	2019-08-28 11:46:33.000000000 +0000
++++ Source/bmalloc/bmalloc/BPlatform.h
+@@ -48,10 +48,18 @@
+ #define BOS_LINUX 1
+ #endif
+ 
++#ifdef __sun
++#define BOS_SOLARIS 1
++#endif
++
+ #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ #define BOS_FREEBSD 1
+ #endif
+ 
++#if defined(__NetBSD__)
++#define BOS_NETBSD 1
++#endif
++
+ #if defined(WIN32) || defined(_WIN32)
+ #define BOS_WINDOWS 1
+ #endif
diff --git a/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
new file mode 100644
index 0000000000..f3c8fdb3cb
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_bmalloc_bmalloc_VMAllocate.h,v 1.4 2021/09/28 22:11:54 leot Exp $
+
+NetBSD has MADV_FREE too.
+Use posix_madvise on SunOS.
+
+--- Source/bmalloc/bmalloc/VMAllocate.h.orig	2021-09-01 09:16:51.000000000 +0000
++++ Source/bmalloc/bmalloc/VMAllocate.h
+@@ -201,8 +201,10 @@ inline void vmDeallocatePhysicalPages(vo
+     vmValidatePhysical(p, vmSize);
+ #if BOS(DARWIN)
+     SYSCALL(madvise(p, vmSize, MADV_FREE_REUSABLE));
+-#elif BOS(FREEBSD)
++#elif BOS(FREEBSD) || BOS(NETBSD)
+     SYSCALL(madvise(p, vmSize, MADV_FREE));
++#elif BOS(SOLARIS)
++    SYSCALL(posix_madvise(p, vmSize, MADV_DONTNEED));
+ #else
+     SYSCALL(madvise(p, vmSize, MADV_DONTNEED));
+ #if BOS(LINUX)
+@@ -220,6 +222,8 @@ inline void vmAllocatePhysicalPages(void
+     // For the Darwin platform, we don't need to call madvise(..., MADV_FREE_REUSE)
+     // to commit physical memory to back a range of allocated virtual memory.
+     // Instead the kernel will commit pages as they are touched.
++#elif BOS(SOLARIS)
++    SYSCALL(posix_madvise(p, vmSize, MADV_NORMAL));
+ #else
+     SYSCALL(madvise(p, vmSize, MADV_NORMAL));
+ #if BOS(LINUX)
diff --git a/webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake b/webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake
new file mode 100644
index 0000000000..7877a55083
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake
@@ -0,0 +1,21 @@
+$NetBSD: patch-Source_cmake_OptionsCommon.cmake,v 1.5 2021/03/30 12:47:42 leot Exp $
+
+Using the T option of GNU ar lead to malformed .a archive on NetBSD. Disable it.
+
+--- Source/cmake/OptionsCommon.cmake.orig	2022-02-23 08:59:06.000000000 +0000
++++ Source/cmake/OptionsCommon.cmake
+@@ -128,10 +128,10 @@ endif ()
+ option(USE_THIN_ARCHIVES "Produce all static libraries as thin archives" ${USE_THIN_ARCHIVES_DEFAULT})
+ 
+ if (USE_THIN_ARCHIVES)
+-    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
+-    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
+-    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
+-    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
++    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
++    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
++    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
++    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ endif ()
+ 
+ set(ENABLE_DEBUG_FISSION_DEFAULT OFF)
diff --git a/webkit-gtk/patches/patch-Source_cmake_WebKitCommon.cmake b/webkit-gtk/patches/patch-Source_cmake_WebKitCommon.cmake
new file mode 100644
index 0000000000..e9e21ff1a3
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_cmake_WebKitCommon.cmake
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_cmake_WebKitCommon.cmake,v 1.1 2021/03/30 12:47:42 leot Exp $
+
+- Fix support for arm
+- Fix support for ppc, from FreeBSD.
+
+--- Source/cmake/WebKitCommon.cmake.orig	2022-02-23 08:59:06.000000000 +0000
++++ Source/cmake/WebKitCommon.cmake
+@@ -88,7 +88,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
+     endif ()
+     if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(^aarch64|^arm64|^cortex-?[am][2-7][2-8])")
+         set(WTF_CPU_ARM64 1)
+-    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(^arm|^cortex)")
++    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(^arm|^cortex|^earm)")
+         set(WTF_CPU_ARM 1)
+     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
+         set(WTF_CPU_MIPS64 1)
+@@ -106,9 +106,9 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
+         endif ()
+     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+         set(WTF_CPU_X86 1)
+-    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+         set(WTF_CPU_PPC 1)
+-    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
++    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc64|powerpc64)")
+         set(WTF_CPU_PPC64 1)
+     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
+         set(WTF_CPU_PPC64LE 1)
diff --git a/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh b/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh
new file mode 100644
index 0000000000..fd052a0c10
--- /dev/null
+++ b/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh
@@ -0,0 +1,18 @@
+$NetBSD: patch-Tools_TestWebKitAPI_Scripts_check-xcfilelists.sh,v 1.1 2019/09/10 22:10:04 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Tools/TestWebKitAPI/Scripts/check-xcfilelists.sh.orig	2019-08-28 11:46:33.000000000 +0000
++++ Tools/TestWebKitAPI/Scripts/check-xcfilelists.sh
+@@ -1,8 +1,8 @@
+ #!/bin/sh
+ 
+-[ "${WK_DISABLE_CHECK_XCFILELISTS}" == "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
+-[ "${DEPLOYMENT_LOCATION}" == "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
+-[ "${USE_INTERNAL_SDK}" == "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
++[ "${WK_DISABLE_CHECK_XCFILELISTS}" = "1" ] && { echo "### Not running because WK_DISABLE_CHECK_XCFILELISTS is set"; exit 0; }
++[ "${DEPLOYMENT_LOCATION}" = "YES" ] && { echo "### Not running because DEPLOYMENT_LOCATION is YES"; exit 0; }
++[ "${USE_INTERNAL_SDK}" = "YES" ] || { echo "### Not running because USE_INTERNAL_SDK is not YES"; exit 0; }
+ 
+ SCRIPT="${BUILD_SCRIPTS_DIR}/generate-xcfilelists"
+ [ -f "${SCRIPT}" ] || SCRIPT="${PROJECT_DIR}/../../../${WK_ADDITIONAL_SCRIPTS_DIR}/generate-xcfilelists"
diff --git a/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh b/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh
new file mode 100644
index 0000000000..2e68384ca3
--- /dev/null
+++ b/webkit-gtk/patches/patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-Tools_TestWebKitAPI_Scripts_generate-unified-sources.sh,v 1.1 2019/09/10 22:10:04 leot Exp $
+
+Avoid unportable `==' test(1) operator.
+
+--- Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh.orig	2019-08-28 11:46:33.000000000 +0000
++++ Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh
+@@ -7,7 +7,7 @@ ARGS=("$@")
+ cd $SRCROOT
+ 
+ if [ -z "${BUILD_SCRIPTS_DIR}" ]; then
+-    if [ "${DEPLOYMENT_LOCATION}" == "YES" ]; then
++    if [ "${DEPLOYMENT_LOCATION}" = "YES" ]; then
+         BUILD_SCRIPTS_DIR="${SDKROOT}${WK_ALTERNATE_WEBKIT_SDK_PATH}/usr/local/include/wtf/Scripts"
+     else
+         BUILD_SCRIPTS_DIR="${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/Scripts"
diff --git a/webkit-gtk/patches/patch-aj b/webkit-gtk/patches/patch-aj
new file mode 100644
index 0000000000..127e1897ca
--- /dev/null
+++ b/webkit-gtk/patches/patch-aj
@@ -0,0 +1,15 @@
+$NetBSD: patch-aj,v 1.7 2018/10/24 18:31:08 leot Exp $
+
+Add support for NetBSD, OpenBSD and Solaris.
+
+--- Source/WTF/wtf/InlineASM.h.orig	2017-02-20 16:20:15.000000000 +0000
++++ Source/WTF/wtf/InlineASM.h
+@@ -40,7 +40,7 @@
+ #define THUMB_FUNC_PARAM(name)
+ #endif
+ 
+-#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
++#if ((OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD) || OS(SOLARIS)) && CPU(X86_64)) || (OS(SOLARIS) && CPU(X86)) 
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"



Home | Main Index | Thread Index | Old Index