pkgsrc-WIP-changes archive

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

webkit-gtk: Import webkit-gtk-2.31.91 as wip/gtk



Module Name:	pkgsrc-wip
Committed By:	Dan CÃirnat <cirnatdan%NetBSD.org@localhost>
Pushed By:	cirnatdan
Date:		Wed Mar 24 22:20:12 2021 +0100
Changeset:	d76a6e0fbc94bf7466a61a24d0997bebacf916d0

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_BPlatform.h
	webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
	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.31.91 as wip/gtk

Update from www/webkit-gtk

This is a development release leading toward 2.32 series.

What’s new in the WebKitGTK 2.31.91 release?
Make WebKitSecurityOrigin a simple data store for <protocol, host, port>
and deprecate webkit_security_origin_is_opaque().
Fix user agent again to work on several google websites.
Fix web view url on web process terminate signals.
Fix preferred language overrides sent to the web process.
Fix the build in i386.
Translation updates: Simplified Chinese.

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

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                                | 160 ++++++++++++
 webkit-gtk/PLIST                                   | 285 +++++++++++++++++++++
 webkit-gtk/buildlink3.mk                           |  39 +++
 webkit-gtk/distinfo                                |  45 ++++
 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 |  36 +++
 .../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 |  13 +
 .../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 ++
 .../patch-Source_bmalloc_bmalloc_BPlatform.h       |  25 ++
 .../patch-Source_bmalloc_bmalloc_VMAllocate.h      |  28 ++
 ...ools_TestWebKitAPI_Scripts_check-xcfilelists.sh |  18 ++
 ...stWebKitAPI_Scripts_generate-unified-sources.sh |  15 ++
 webkit-gtk/patches/patch-aj                        |  15 ++
 46 files changed, 1472 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..abcb6e9b5d
--- /dev/null
+++ b/webkit-gtk/Makefile
@@ -0,0 +1,160 @@
+# $NetBSD: Makefile,v 1.202 2021/03/18 14:56:21 leot Exp $
+
+DISTNAME=	webkitgtk-2.31.91
+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++11
+USE_TOOLS+=	automake bash bison flex gmake perl pkg-config msgfmt
+
+# Enabling -gdwarf-2 hits GNU ar limits on file size.
+CTF_SUPPORTED=	no
+
+# GCC >= 7.3.0 is required, checked via CMakeLists.txt
+GCC_REQD+=		7
+USE_GCC_RUNTIME=	yes
+
+# 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_GEOLOCATION=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_SYSTEMD=OFF
+CMAKE_ARGS+=		-DENABLE_GAMEPAD=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,\(.\)python.;,\1${PYTHONBIN}\1;,'
+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"
+BUILDLINK_API_DEPENDS.png+= png>=1.5.1beta08
+.include "../../graphics/png/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gstreamer1+=	gstreamer1>=1.0.3
+.include "../../multimedia/gstreamer1/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gst-plugins1-base+=	gst-plugins1-base>=1.0.3
+.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libsoup+= libsoup>=2.42.2nb3
+.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..3f41037594
--- /dev/null
+++ b/webkit-gtk/PLIST
@@ -0,0 +1,285 @@
+@comment $NetBSD$
+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/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/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
+lib/girepository-1.0/JavaScriptCore-4.0.typelib
+lib/girepository-1.0/WebKit2-4.0.typelib
+lib/girepository-1.0/WebKit2WebExtension-4.0.typelib
+lib/libjavascriptcoregtk-4.0.${RUBY_DLEXT}
+lib/libjavascriptcoregtk-4.0.so.18
+lib/libjavascriptcoregtk-4.0.so.18.18.3
+lib/libwebkit2gtk-4.0.${RUBY_DLEXT}
+lib/libwebkit2gtk-4.0.so.37
+lib/libwebkit2gtk-4.0.so.37.53.0
+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.${RUBY_DLEXT}
+libexec/webkit2gtk-4.0/MiniBrowser
+libexec/webkit2gtk-4.0/WebKitNetworkProcess
+libexec/webkit2gtk-4.0/WebKitWebProcess
+libexec/webkit2gtk-4.0/jsc
+share/gir-1.0/JavaScriptCore-4.0.gir
+share/gir-1.0/WebKit2-4.0.gir
+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..8c73331d79
--- /dev/null
+++ b/webkit-gtk/buildlink3.mk
@@ -0,0 +1,39 @@
+# $NetBSD: buildlink3.mk,v 1.81 2020/11/05 09:07:13 ryoon 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.30.2nb1
+BUILDLINK_PKGSRCDIR.webkit-gtk?=	../../www/webkit-gtk
+
+# This is necessary to match the package requirement.
+GCC_REQD+=	7.3
+
+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/png/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../multimedia/gstreamer1/buildlink3.mk"
+.include "../../multimedia/gst-plugins1-base/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..6df4b8ecc8
--- /dev/null
+++ b/webkit-gtk/distinfo
@@ -0,0 +1,45 @@
+$NetBSD: distinfo,v 1.146 2021/03/18 14:56:21 leot Exp $
+
+SHA1 (webkitgtk-2.31.91.tar.xz) = 35e3eb5a89c497c7a4ff158ec580e4f09f4fb030
+RMD160 (webkitgtk-2.31.91.tar.xz) = 8035b3f3245b6d165d4d3bb6b676cc063cc5aaa0
+SHA512 (webkitgtk-2.31.91.tar.xz) = 972761a0db13a7ffde547b65941cdc2d6fd76032d2ca7f28724b5fee15714fc486c7b3d977834d0fad51de13ad695290cae47b2642f4f57543e14fd2765d68ff
+Size (webkitgtk-2.31.91.tar.xz) = 23316948 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) = 709e5dcf4cdb834617c2ef542686bb2aa4aa37b3
+SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 7f6c0c57d46478e83c4ff21dae2415f44085ba32
+SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93
+SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012
+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) = a5454eb891ad1f9d8285c28af2e9efb4ff439e6b
+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) = 3787817a0e288d00aa747c417aecd9abf52866d1
+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) = 16b36d2d91fd7f43156b9ee09bcafd19602ebbd9
+SHA1 (patch-Source_WebCore_platform_network_DNS.h) = a491ed31e288af1ef56c4a70564045609ecb4b6a
+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) = d0e9a4b472a7167235c68a02d4203fe0abfc6b86
+SHA1 (patch-Source_WebKit_CMakeLists.txt) = 228cc4734de3b08a3877ac839b1ffa2fbf2d3aa8
+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_BPlatform.h) = 28d1f657fde427062a729b26398e96825082fc4d
+SHA1 (patch-Source_bmalloc_bmalloc_VMAllocate.h) = b1eb6ab93f2ce272cfee94a544d19806feb9a625
+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..5c079974be
--- /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.3 2020/09/11 14:47:35 leot Exp $
+
+Avoid ambiguous function call.
+
+--- Source/JavaScriptCore/heap/MarkedSpace.cpp.orig	2020-08-12 09:17:52.000000000 +0000
++++ Source/JavaScriptCore/heap/MarkedSpace.cpp
+@@ -28,6 +28,8 @@
+ #include "MarkedSpaceInlines.h"
+ #include <wtf/ListDump.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..6ed0f90019
--- /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.1 2018/10/24 18:31:07 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/JavaScriptCore/runtime/MachineContext.h.orig	2018-08-21 16:06:10.000000000 +0000
++++ Source/JavaScriptCore/runtime/MachineContext.h
+@@ -188,6 +188,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) || defined(__GLIBC__) || defined(__BIONIC__)
+ 
+ #if CPU(X86)
+@@ -335,6 +351,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) || defined(__GLIBC__) || defined(__BIONIC__)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -482,6 +514,22 @@ static inline void*& instructionPointerI
+ #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) || defined(__GLIBC__) || defined(__BIONIC__)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -639,6 +687,22 @@ inline void*& argumentPointer<1>(mcontex
+ #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) || defined(__GLIBC__) || defined(__BIONIC__)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -756,6 +820,22 @@ inline void*& llintInstructionPointer(mc
+ #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) || defined(__GLIBC__) || defined(__BIONIC__)
+ 
+ // The following sequence depends on glibc's sys/ucontext.h.
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..382329760a
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h
@@ -0,0 +1,36 @@
+$NetBSD: patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h,v 1.4 2019/03/13 20:49:40 leot Exp $
+
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig	2019-02-12 11:21:03.000000000 +0000
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -42,6 +42,7 @@
+ 
+ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
+ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
++#include <ciso646>
+ 
+ // Environment-describing macros
+ // -----------------------------
+@@ -268,6 +269,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #ifndef _WIN32_WCE
+ # include <sys/types.h>
+ # include <sys/stat.h>
+@@ -755,7 +757,14 @@ typedef struct _RTL_CRITICAL_SECTION GTE
+ // GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header.  This does
+ // not conform to the TR1 spec, which requires the header to be <tuple>.
+ 
+-#  if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
++#if defined(_LIBCPP_VERSION)
++#include <tuple>
++namespace std {
++  namespace tr1 {
++     using ::std::tuple;
++  }
++}   
++#elif !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
+ // Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
+ // which is #included by <tr1/tuple>, to not compile when RTTI is
+ // disabled.  _TR1_FUNCTIONAL is the header guard for
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..0e54ba2e32
--- /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.1 2020/03/10 18:14:04 leot Exp $
+
+Add support for NetBSD.
+
+--- Source/WTF/wtf/PlatformHave.h.orig	2020-02-26 10:34:01.000000000 +0000
++++ Source/WTF/wtf/PlatformHave.h
+@@ -222,7 +222,7 @@
+ #define HAVE_HOSTED_CORE_ANIMATION 1
+ #endif
+ 
+-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
++#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(NETBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
+ #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..dfe5bbb353
--- /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	2018-02-19 11:04:38.000000000 +0000
++++ Source/WebCore/platform/graphics/filters/FEMorphology.cpp
+@@ -32,6 +32,8 @@
+ #include <wtf/Vector.h>
+ #include <wtf/text/TextStream.h>
+ 
++using std::sqrt;
++
+ namespace WebCore {
+ 
+ FEMorphology::FEMorphology(Filter& filter, 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..621db0e778
--- /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.1 2021/01/12 15:21:31 jperkin Exp $
+
+Include sys/socket.h for AF_*.
+
+--- Source/WebCore/platform/network/DNS.h.orig	2020-08-12 09:17:55.000000000 +0000
++++ Source/WebCore/platform/network/DNS.h
+@@ -30,6 +30,7 @@
+ #include <ws2tcpip.h>
+ #else
+ #include <netinet/in.h>
++#include <sys/socket.h>
+ #endif
+ 
+ #include <wtf/Forward.h>
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..df4a4f4e3f
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_ShapeOutsideInfo.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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..28c10a9fca
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_WebKit_CMakeLists.txt,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+SunOS requires libsocket.
+
+--- Source/WebKit/CMakeLists.txt.orig	2018-03-05 08:47:55.000000000 +0000
++++ Source/WebKit/CMakeLists.txt
+@@ -808,6 +808,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_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..13514d1053
--- /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.3 2019/09/10 22:10:04 leot Exp $
+
+NetBSD has MADV_FREE too.
+Use posix_madvise on SunOS.
+
+--- Source/bmalloc/bmalloc/VMAllocate.h.orig	2019-08-28 11:46:33.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)
+@@ -216,6 +218,8 @@ inline void vmAllocatePhysicalPages(void
+     vmValidatePhysical(p, vmSize);
+ #if BOS(DARWIN)
+     SYSCALL(madvise(p, vmSize, MADV_FREE_REUSE));
++#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-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