pkgsrc-WIP-changes archive

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

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



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Fri May 5 18:24:26 2017 +0200
Changeset:	20e636660289ee3a0be55144f6f6c79dc01fa329

Modified Files:
	Makefile
Added Files:
	webkit-gtk/DESCR
	webkit-gtk/Makefile
	webkit-gtk/PLIST
	webkit-gtk/TODO
	webkit-gtk/buildlink3.mk
	webkit-gtk/distinfo
	webkit-gtk/hacks.mk
	webkit-gtk/options.mk
	webkit-gtk/patches/patch-CMakeLists.txt
	webkit-gtk/patches/patch-Source_JavaScriptCore_API_JSStringRef.cpp
	webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler.h
	webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp
	webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
	webkit-gtk/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h
	webkit-gtk/patches/patch-Source_WTF_wtf_Compiler.h
	webkit-gtk/patches/patch-Source_WTF_wtf_MathExtras.h
	webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
	webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
	webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
	webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
	webkit-gtk/patches/patch-Source_WebKit2_Shared_API_c_WKString.cpp
	webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake
	webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
	webkit-gtk/patches/patch-ai
	webkit-gtk/patches/patch-aj

Log Message:
webkit-gtk: Import webkit-gtk-2.16.1 as wip/webkit-gtk

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.

XXX: Patches synced but still doesn't build due to (from the TODO):
XXX:
XXX:  [  5%] Linking CXX shared library ../../lib/libjavascriptcoregtk-4.0.so
XXX:  CMakeFiles/JavaScriptCore.dir/runtime/CustomGetterSetter.cpp.o: In function `JSC::callCustomSetter(JSC::ExecState*, JSC::JSValue, bool, JSC::JSObject*, JSC::JSValue, JSC::JSValue)':
XXX:  CustomGetterSetter.cpp:(.text+0x87): undefined reference to `JSC::HeapCell::vm() const'
XXX:  CMakeFiles/JavaScriptCore.dir/runtime/FunctionExecutableDump.cpp.o: In function `JSC::FunctionExecutableDump::dump(WTF::PrintStream&) const':
XXX:  FunctionExecutableDump.cpp:(.text+0x29): undefined reference to `JSC::HeapCell::vm() const'
XXX:  FunctionExecutableDump.cpp:(.text+0x5b): undefined reference to `JSC::HeapCell::vm() const'
XXX:  FunctionExecutableDump.cpp:(.text+0x8c): undefined reference to `JSC::HeapCell::vm() const'
XXX:  FunctionExecutableDump.cpp:(.text+0xbe): undefined reference to `JSC::HeapCell::vm() const'
XXX:  CMakeFiles/JavaScriptCore.dir/runtime/FunctionExecutableDump.cpp.o:FunctionExecutableDump.cpp:(.text+0xef): more undefined references to `JSC::HeapCell::vm() const' follow
XXX:  Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:23840: recipe for target 'lib/libjavascriptcoregtk-4.0.so.18.5.8' failed
XXX:  gmake[2]: *** [lib/libjavascriptcoregtk-4.0.so.18.5.8] Error 1
XXX:  CMakeFiles/Makefile2:369: recipe for target 'Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all' failed
XXX:  gmake[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
XXX:  Makefile:151: recipe for target 'all' failed
XXX:  gmake: *** [all] Error 2

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

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

diffstat:
 Makefile                                           |   1 +
 webkit-gtk/DESCR                                   |   7 +
 webkit-gtk/Makefile                                | 113 +++++++
 webkit-gtk/PLIST                                   | 348 +++++++++++++++++++++
 webkit-gtk/TODO                                    |  17 +
 webkit-gtk/buildlink3.mk                           |  37 +++
 webkit-gtk/distinfo                                |  23 ++
 webkit-gtk/hacks.mk                                |  16 +
 webkit-gtk/options.mk                              |  49 +++
 webkit-gtk/patches/patch-CMakeLists.txt            |  13 +
 ...patch-Source_JavaScriptCore_API_JSStringRef.cpp |  33 ++
 ...-Source_JavaScriptCore_assembler_ARMAssembler.h |  28 ++
 ..._JavaScriptCore_assembler_MacroAssemblerARM.cpp |  30 ++
 ...urce_JavaScriptCore_heap_MachineStackMarker.cpp |  28 ++
 ...Party_gtest_include_gtest_internal_gtest-port.h |  36 +++
 webkit-gtk/patches/patch-Source_WTF_wtf_Compiler.h |  32 ++
 .../patches/patch-Source_WTF_wtf_MathExtras.h      |  15 +
 .../patch-Source_WebCore_platform_FileSystem.cpp   |  16 +
 ...Source_WebCore_rendering_shapes_RasterShape.cpp |  15 +
 .../patches/patch-Source_WebKit2_CMakeLists.txt    |  18 ++
 ...NetworkProcess_cache_NetworkCacheFileSystem.cpp |  52 +++
 .../patch-Source_WebKit2_Shared_API_c_WKString.cpp |  15 +
 .../patches/patch-Source_cmake_OptionsCommon.cmake |  21 ++
 .../patches/patch-Source_cmake_OptionsGTK.cmake    |  57 ++++
 webkit-gtk/patches/patch-ai                        |  17 +
 webkit-gtk/patches/patch-aj                        |  13 +
 26 files changed, 1050 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 9ff49c653e..0aca79e11b 100644
--- a/Makefile
+++ b/Makefile
@@ -4383,6 +4383,7 @@ SUBDIR+=	wbox
 SUBDIR+=	weatherman
 SUBDIR+=	webbrowser
 SUBDIR+=	webcleaner
+SUBDIR+=	webkit-gtk
 SUBDIR+=	weland
 SUBDIR+=	weplab
 SUBDIR+=	west
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/Makefile b/webkit-gtk/Makefile
new file mode 100644
index 0000000000..723ea27a7a
--- /dev/null
+++ b/webkit-gtk/Makefile
@@ -0,0 +1,113 @@
+# $NetBSD: Makefile,v 1.126 2017/05/03 08:38:45 jperkin Exp $
+
+DISTNAME=	webkitgtk-2.16.1
+PKGNAME=	${DISTNAME:S/webkitgtk/webkit-gtk/}
+CATEGORIES=	www
+MASTER_SITES=	http://www.webkitgtk.org/releases/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://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]*-*
+
+BUILD_DEPENDS+=	gettext-tools>=0.18:../../devel/gettext-tools
+
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++11
+#USE_LIBTOOL=	yes
+USE_TOOLS+=	automake bison gmake perl:build pkg-config msgfmt
+
+# GCC >= 4.7 or Clang >= 3.3
+# XXX: Kludge, upstream needs GCC 4.9.0 for IndexedDB support.
+# XXX: patches/patch-Source_cmake_OptionsGTK.cmake and
+# XXX: patches/patch-Source_WTF_wtf_Compiler.h disables that to
+# XXX: avoid requiring GCC 4.9.0.
+GCC_REQD+=	4.7
+
+# 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/WebKit2/webkit2gtk.pc.in
+PKGCONFIG_OVERRIDE+=	Source/WebKit2/webkit2gtk-web-extension.pc.in
+
+CMAKE_ARGS+=		-DPORT=GTK
+CMAKE_ARGS+=		-DENABLE_X11_TARGET=ON
+CMAKE_ARGS+=		-DENABLE_MINIBROWSER=ON
+CMAKE_ARGS+=		-DENABLE_GEOLOCATION=OFF
+CMAKE_ARGS+=		-DUSE_LIBHYPHEN=OFF
+
+REPLACE_PERL+=	Source/JavaScriptCore/create_hash_table \
+		Source/WebCore/bindings/scripts/*.pl \
+		Source/WebCore/bindings/scripts/InFilesCompiler.pm \
+		Source/WebCore/bindings/scripts/InFilesParser.pm \
+		Source/WebCore/css/*.pl \
+		Source/WebCore/dom/*.pl \
+		Source/WebCore/make-hash-tools.pl
+
+REPLACE_PYTHON+=	Tools/gtk/*.py \
+			Tools/gtk/generate-gtkdoc
+
+.include "../../lang/ruby/rubyversion.mk"
+BUILD_DEPENDS+=	${RUBY_BASE}>=${RUBY_VERSION}:${RUBY_SRCDIR}
+CMAKE_ARGS+=	-DRUBY_EXECUTABLE=${RUBY}
+
+PYTHON_FOR_BUILD_ONLY=	yes
+PYTHON_VERSIONS_INCOMPATIBLE=	34 35 36 # not yet ported as of 1.10.2
+.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
+
+.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
+CMAKE_ARGS+=	-DUSE_SYSTEM_MALLOC=ON
+.endif
+
+.include "options.mk"
+
+BUILDLINK_API_DEPENDS.glib2+= glib2>=2.32.1
+.include "../../devel/glib2/buildlink3.mk"
+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
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+# A correct Webkit build requires flex 2.5.33
+.include "../../devel/flex/buildlink3.mk"
+.include "../../devel/gperf/buildlink3.mk"
+.include "../../devel/pango/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/gnutls/buildlink3.mk"
+.include "../../sysutils/libnotify/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gtk2+=	gtk2+>=2.24.17nb3
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/webkit-gtk/PLIST b/webkit-gtk/PLIST
new file mode 100644
index 0000000000..385a860fc1
--- /dev/null
+++ b/webkit-gtk/PLIST
@@ -0,0 +1,348 @@
+@comment $NetBSD: PLIST,v 1.35 2016/09/05 08:06:24 leot Exp $
+bin/MiniBrowser
+bin/jsc
+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/JSValueRef.h
+include/webkitgtk-4.0/JavaScriptCore/JavaScript.h
+include/webkitgtk-4.0/JavaScriptCore/WebKitAvailability.h
+include/webkitgtk-4.0/webkit2/WebKitAuthenticationRequest.h
+include/webkitgtk-4.0/webkit2/WebKitAutocleanups.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/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/WebKitGeolocationPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitHitTestResult.h
+include/webkitgtk-4.0/webkit2/WebKitInstallMissingMediaPluginsPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.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/WebKitNotification.h
+include/webkitgtk-4.0/webkit2/WebKitNotificationPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitPermissionRequest.h
+include/webkitgtk-4.0/webkit2/WebKitPlugin.h
+include/webkitgtk-4.0/webkit2/WebKitPolicyDecision.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/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/WebKitUserContent.h
+include/webkitgtk-4.0/webkit2/WebKitUserContentManager.h
+include/webkitgtk-4.0/webkit2/WebKitUserMediaPermissionRequest.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/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/WebKitWebsiteDataManager.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/WebKitDOMAttrUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMAudioTrack.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMAudioTrackList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMBarProp.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMBatteryManager.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMBlob.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMBlobUnstable.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/WebKitDOMCSSRuleUnstable.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/WebKitDOMCharacterDataUnstable.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/WebKitDOMDOMApplicationCache.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMImplementation.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMMimeType.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMMimeTypeArray.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMNamedFlowCollection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMPlugin.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMPluginArray.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMSelection.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMStringList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMStringMap.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMTokenList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindow.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindowCSS.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindowSpeechSynthesis.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDOMWindowUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDataCue.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMDatabase.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/WebKitDOMDocumentTypeUnstable.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/WebKitDOMEventUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMFile.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMFileList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMGamepad.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMGamepadList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMGeolocation.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAnchorElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAnchorElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAppletElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAreaElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAreaElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLAudioElement.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/WebKitDOMHTMLButtonElementUnstable.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/WebKitDOMHTMLDetailsElement.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/WebKitDOMHTMLFieldSetElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFontElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFormElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLFormElementUnstable.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/WebKitDOMHTMLHtmlElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLIFrameElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLIFrameElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLImageElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLImageElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLInputElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLInputElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLKeygenElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLIElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLabelElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLabelElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLegendElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLinkElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLLinkElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMapElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMarqueeElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMarqueeElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLMediaElement.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/WebKitDOMHTMLOListElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLObjectElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLObjectElementUnstable.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/WebKitDOMHTMLOptionsCollectionUnstable.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/WebKitDOMHTMLScriptElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLSelectElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLSelectElementUnstable.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/WebKitDOMHTMLTableElementUnstable.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/WebKitDOMHTMLTextAreaElementUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLTitleElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLUListElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHTMLVideoElement.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMHistory.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMKeyboardEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMLocation.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaController.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaDevices.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaError.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaQueryList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMediaTrackSupportedConstraints.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMessagePort.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMouseEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMMouseEventUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNamedNodeMap.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNavigator.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMNavigatorMediaDevices.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/WebKitDOMNodeUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMObject.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMPerformance.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMPerformanceEntry.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMPerformanceEntryList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMPerformanceNavigation.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMPerformanceTiming.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/WebKitDOMScreen.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMSpeechSynthesis.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMSpeechSynthesisEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMSpeechSynthesisUtterance.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMSpeechSynthesisVoice.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStorage.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStorageInfo.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStorageQuota.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMStyleMedia.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/WebKitDOMTextTrack.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTextTrackCue.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTextTrackCueList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTextTrackList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTimeRanges.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTouch.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTrackEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMTreeWalker.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMUIEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMUIEventUnstable.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMUserMessageHandler.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMUserMessageHandlersNamespace.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMVTTCue.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMValidityState.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMVideoPlaybackQuality.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMVideoTrack.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMVideoTrackList.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWebKitNamedFlow.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWebKitNamespace.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWebKitPoint.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWheelEvent.h
+include/webkitgtk-4.0/webkitdom/WebKitDOMWheelEventUnstable.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-unstable.h
+include/webkitgtk-4.0/webkitdom/webkitdomautocleanups.h
+include/webkitgtk-4.0/webkitdom/webkitdomdefines-unstable.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.so
+lib/libjavascriptcoregtk-4.0.so.18
+lib/libjavascriptcoregtk-4.0.so.18.3.12
+lib/libwebkit2gtk-4.0.so
+lib/libwebkit2gtk-4.0.so.37
+lib/libwebkit2gtk-4.0.so.37.13.10
+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/WebKitNetworkProcess
+libexec/webkit2gtk-4.0/WebKitPluginProcess
+libexec/webkit2gtk-4.0/WebKitPluginProcess2
+libexec/webkit2gtk-4.0/WebKitWebProcess
+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/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/TODO b/webkit-gtk/TODO
new file mode 100644
index 0000000000..f38a4ee245
--- /dev/null
+++ b/webkit-gtk/TODO
@@ -0,0 +1,17 @@
+At the moment it fails during the `build' phase due:
+
+ [  5%] Linking CXX shared library ../../lib/libjavascriptcoregtk-4.0.so
+ CMakeFiles/JavaScriptCore.dir/runtime/CustomGetterSetter.cpp.o: In function `JSC::callCustomSetter(JSC::ExecState*, JSC::JSValue, bool, JSC::JSObject*, JSC::JSValue, JSC::JSValue)':
+ CustomGetterSetter.cpp:(.text+0x87): undefined reference to `JSC::HeapCell::vm() const'
+ CMakeFiles/JavaScriptCore.dir/runtime/FunctionExecutableDump.cpp.o: In function `JSC::FunctionExecutableDump::dump(WTF::PrintStream&) const':
+ FunctionExecutableDump.cpp:(.text+0x29): undefined reference to `JSC::HeapCell::vm() const'
+ FunctionExecutableDump.cpp:(.text+0x5b): undefined reference to `JSC::HeapCell::vm() const'
+ FunctionExecutableDump.cpp:(.text+0x8c): undefined reference to `JSC::HeapCell::vm() const'
+ FunctionExecutableDump.cpp:(.text+0xbe): undefined reference to `JSC::HeapCell::vm() const'
+ CMakeFiles/JavaScriptCore.dir/runtime/FunctionExecutableDump.cpp.o:FunctionExecutableDump.cpp:(.text+0xef): more undefined references to `JSC::HeapCell::vm() const' follow
+ Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/build.make:23840: recipe for target 'lib/libjavascriptcoregtk-4.0.so.18.5.8' failed
+ gmake[2]: *** [lib/libjavascriptcoregtk-4.0.so.18.5.8] Error 1
+ CMakeFiles/Makefile2:369: recipe for target 'Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all' failed
+ gmake[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/all] Error 2
+ Makefile:151: recipe for target 'all' failed
+ gmake: *** [all] Error 2
diff --git a/webkit-gtk/buildlink3.mk b/webkit-gtk/buildlink3.mk
new file mode 100644
index 0000000000..20243c3ba1
--- /dev/null
+++ b/webkit-gtk/buildlink3.mk
@@ -0,0 +1,37 @@
+# $NetBSD: buildlink3.mk,v 1.58 2017/04/22 21:03:18 adam 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.12.4nb6
+BUILDLINK_PKGSRCDIR.webkit-gtk?=	../../www/webkit-gtk
+
+pkgbase := webkit-gtk
+.include "../../mk/pkg-build-options.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.webkit-gtk:Menchant)
+.include "../../textproc/enchant/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/gtk2/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..7170b08fc1
--- /dev/null
+++ b/webkit-gtk/distinfo
@@ -0,0 +1,23 @@
+$NetBSD: distinfo,v 1.95 2017/04/25 10:37:26 wiz Exp $
+
+SHA1 (webkitgtk-2.16.1.tar.xz) = d0b367ca1ac89da57b7068aa37efcc101aeb97f8
+RMD160 (webkitgtk-2.16.1.tar.xz) = 82e198ac35993d0e5a2ff9a76755b1c33849458f
+SHA512 (webkitgtk-2.16.1.tar.xz) = 4b8de15644d0d0f9814c674020cbbab8628347915b8010977dbe2365ce276ea05b3bf86171400ae8eb5bfdebbadcfabd1efce34a177b5c82aa765bd3351e7010
+Size (webkitgtk-2.16.1.tar.xz) = 14675996 bytes
+SHA1 (patch-CMakeLists.txt) = c48c0e5d33f378b7ecf31fffef609fb2501e5cd3
+SHA1 (patch-Source_JavaScriptCore_API_JSStringRef.cpp) = 419425db19f685335eab01099d0a941614a2a99c
+SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 99e46f9d9b26a8d9ba6b29c66d7ce5326c4ffeb6
+SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = f78e6150ed8901b3fe046b2ef182f50f1c7500a4
+SHA1 (patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp) = dd8c03f924d9b96abc9ba5d3a315fefc096be7b0
+SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092
+SHA1 (patch-Source_WTF_wtf_Compiler.h) = f4f7771e4b421dddf9f73c7131e671d0c34b906c
+SHA1 (patch-Source_WTF_wtf_MathExtras.h) = 01195978abe07154fbc28de9efc47b3f3105fd89
+SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec
+SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
+SHA1 (patch-Source_WebKit2_CMakeLists.txt) = 10a3fca678095ad04ce43e6d291e3907a44f67b4
+SHA1 (patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 2b38628e1e617ef87b20faabbbcd8be8b2cbc058
+SHA1 (patch-Source_WebKit2_Shared_API_c_WKString.cpp) = 0a735e069ad6412e5c7850067ade0abe24487c1f
+SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 03b72552414e7114bfa7ddc2d68fd97009a5ff7d
+SHA1 (patch-Source_cmake_OptionsGTK.cmake) = 459bf361b03b8f4be57813d146423064adc47d8f
+SHA1 (patch-ai) = b8a45f2f5c1aa5aed178527ecd6cbd93baf76f8e
+SHA1 (patch-aj) = 8247194bd8d62fcc356650c946756898fbe22982
diff --git a/webkit-gtk/hacks.mk b/webkit-gtk/hacks.mk
new file mode 100644
index 0000000000..e0d28b8494
--- /dev/null
+++ b/webkit-gtk/hacks.mk
@@ -0,0 +1,16 @@
+# $NetBSD: hacks.mk,v 1.1 2015/10/05 16:25:30 leot Exp $
+
+.if !defined(WEBKIT_GTK_HACKS_MK)
+WEBKIT_GTK_HACKS_MK=	defined
+
+# [Sat Oct  3 16:44:53 CEST 2015 : leot]
+# On i386 archs -latomic is added during the build phase when linking
+# libwebkit2gtk-4.0.so for atomic operations.
+# Forcing -march=i586 (or better) avoids that (i[56]86 provide required
+# 64-bit compare-and-swap instruction).
+.if ${MACHINE_ARCH} == "i386"
+PKG_HACKS+=	i386-atomicops
+CXXFLAGS+=	-march=i586
+.endif
+
+.endif	# WEBKIT_GTK_HACKS_MK
diff --git a/webkit-gtk/options.mk b/webkit-gtk/options.mk
new file mode 100644
index 0000000000..b8a31d3e6c
--- /dev/null
+++ b/webkit-gtk/options.mk
@@ -0,0 +1,49 @@
+# $NetBSD: options.mk,v 1.11 2016/04/12 07:58:04 leot Exp $
+#
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.webkit-gtk
+PKG_SUPPORTED_OPTIONS=	enchant opengl webkit-jit
+PKG_SUGGESTED_OPTIONS=	enchant opengl
+
+.include "../../mk/bsd.prefs.mk"
+
+# XXX JIT produces invalid code
+# it's also entirely unsupported on powerpc and sparc
+.if empty(MACHINE_PLATFORM:MNetBSD-*-i386) \
+ && empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) \
+ && empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) \
+ && empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) \
+ && empty(MACHINE_PLATFORM:MNetBSD-*-sparc) \
+ && empty(MACHINE_PLATFORM:MSunOS-*)
+PKG_SUGGESTED_OPTIONS+=	webkit-jit
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+#
+# JIT support
+#
+.if !empty(PKG_OPTIONS:Mwebkit-jit)
+CMAKE_ARGS+=	-DENABLE_JIT=ON
+.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_WEBGL=ON
+.else
+CMAKE_ARGS+=	-DENABLE_WEBGL=OFF
+.endif
+
+#
+# Spellcheck support using enchant
+#
+.if !empty(PKG_OPTIONS:Menchant)
+CMAKE_ARGS+=	-DENABLE_SPELLCHECK=ON
+.include "../../textproc/enchant/buildlink3.mk"
+.else
+CMAKE_ARGS+=	-DENABLE_SPELLCHECK=OFF
+.endif
diff --git a/webkit-gtk/patches/patch-CMakeLists.txt b/webkit-gtk/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..4d539e15c4
--- /dev/null
+++ b/webkit-gtk/patches/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+$NetBSD: patch-CMakeLists.txt,v 1.2 2016/01/21 13:42:33 leot Exp $
+
+--- CMakeLists.txt.orig	2016-01-20 12:12:59.000000000 +0000
++++ CMakeLists.txt
+@@ -87,6 +87,8 @@ else ()
+ endif ()
+ if (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+     set(WTF_CPU_ARM 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^earm")
++    set(WTF_CPU_ARM 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
+     set(WTF_CPU_ARM64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_API_JSStringRef.cpp b/webkit-gtk/patches/patch-Source_JavaScriptCore_API_JSStringRef.cpp
new file mode 100644
index 0000000000..0bac5030b7
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_API_JSStringRef.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-Source_JavaScriptCore_API_JSStringRef.cpp,v 1.1 2017/04/25 10:37:26 wiz Exp $
+
+Fix build with icu-59.
+
+--- Source/JavaScriptCore/API/JSStringRef.cpp.orig	2016-07-20 12:15:22.000000000 +0000
++++ Source/JavaScriptCore/API/JSStringRef.cpp
+@@ -37,7 +37,7 @@ using namespace WTF::Unicode;
+ JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
+ {
+     initializeThreading();
+-    return &OpaqueJSString::create(chars, numChars).leakRef();
++    return &OpaqueJSString::create((const UChar*)chars, numChars).leakRef();
+ }
+ 
+ JSStringRef JSStringCreateWithUTF8CString(const char* string)
+@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CStrin
+ JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
+ {
+     initializeThreading();
+-    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars)).leakRef();
++    return OpaqueJSString::create(StringImpl::createWithoutCopying((const UChar*)chars, numChars)).leakRef();
+ }
+ 
+ JSStringRef JSStringRetain(JSStringRef string)
+@@ -87,7 +87,7 @@ const JSChar* JSStringGetCharactersPtr(J
+ {
+     if (!string)
+         return nullptr;
+-    return string->characters();
++    return (const JSChar*)string->characters();
+ }
+ 
+ size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler.h b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler.h
new file mode 100644
index 0000000000..e0a69ed717
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler.h
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler.h,v 1.6 2016/01/21 13:42:33 leot Exp $
+
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig	2016-01-20 12:12:59.000000000 +0000
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -29,6 +29,11 @@
+ 
+ #if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL)
+ 
++#if defined(__NetBSD__)
++#include <sys/types.h>
++#include <machine/sysarch.h>
++#endif
++
+ #include "AssemblerBufferWithConstantPool.h"
+ #include "JITCompilationEffort.h"
+ #include <wtf/Assertions.h>
+@@ -1128,6 +1133,11 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+ 
+             linuxPageFlush(current, end);
++#elif defined(__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_assembler_MacroAssemblerARM.cpp b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp
new file mode 100644
index 0000000000..bed7fca27f
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp
@@ -0,0 +1,30 @@
+$NetBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp,v 1.5 2016/01/21 13:42:33 leot Exp $
+
+--- Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp.orig	2016-01-20 12:12:59.000000000 +0000
++++ Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
+@@ -38,6 +38,8 @@
+ #include <unistd.h>
+ #include <elf.h>
+ #include <asm/hwcap.h>
++#elif OS(NETBSD)
++#include <sys/sysctl.h>
+ #endif
+ 
+ namespace JSC {
+@@ -57,6 +59,16 @@ static bool isVFPPresent()
+         close(fd);
+     }
+ #endif // OS(LINUX)
++ 
++#if OS(NETBSD)
++    size_t len;
++    int flag;
++
++    len = sizeof(flag);
++    if (sysctlbyname("machdep.fpu_present", &flag, &len, NULL, 0) == 0) {
++        return flag == 1;
++    }
++#endif // OS(NETBSD)
+ 
+ #if (COMPILER(GCC_OR_CLANG) && defined(__VFP_FP__))
+     return true;
diff --git a/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp b/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
new file mode 100644
index 0000000000..9165b20e0a
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp,v 1.5 2017/04/13 16:58:14 jperkin Exp $
+
+SunOS compatibility, though newer illumos has pthread_getattr_np so we should
+really add functionality tests for it and use it where available.
+
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig	2016-08-22 12:21:07.000000000 +0000
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -52,11 +52,7 @@
+ #include <sys/mman.h>
+ #include <unistd.h>
+ 
+-#if OS(SOLARIS)
+-#include <thread.h>
+-#else
+ #include <pthread.h>
+-#endif
+ 
+ #if HAVE(PTHREAD_NP_H)
+ #include <pthread_np.h>
+@@ -488,7 +484,7 @@ size_t MachineThreads::Thread::getRegist
+     // e.g. on FreeBSD 5.4, neundorf%kde.org@localhost
+     pthread_attr_get_np(platformThread, &regs.attribute);
+ #endif
+-#else
++#elif !OS(SOLARIS)
+     // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
+     pthread_getattr_np(platformThread, &regs.attribute);
+ #endif
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..5c27d6844e
--- /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.3 2014/08/03 22:30:05 wiz Exp $
+
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig	2013-09-09 09:20:59.000000000 +0000
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -35,6 +35,7 @@
+ 
+ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
+ #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
++#include <ciso646>
+ 
+ // The user can define the following macros in the build script to
+ // control Google Test's behavior.  If the user doesn't define a macro
+@@ -175,6 +176,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #ifndef _WIN32_WCE
+ #include <sys/stat.h>
+ #endif  // !_WIN32_WCE
+@@ -448,7 +450,14 @@
+ // 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_Compiler.h b/webkit-gtk/patches/patch-Source_WTF_wtf_Compiler.h
new file mode 100644
index 0000000000..34146eba0a
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_Compiler.h
@@ -0,0 +1,32 @@
+$NetBSD: patch-Source_WTF_wtf_Compiler.h,v 1.3 2016/06/16 20:42:36 leot Exp $
+
+Revert upstream changeset 188912, requested in:
+
+ <https://bugs.webkit.org/show_bug.cgi?id=148430>
+
+XXX: Actually in pkgsrc we are using a kludge in order to avoid a pretty new gcc
+XXX: version, that in reality is needed only for IndexedDB support (disabled in
+XXX: the pkgsrc case).
+
+--- Source/WTF/wtf/Compiler.h.orig	2016-04-11 06:18:43.000000000 +0000
++++ Source/WTF/wtf/Compiler.h
+@@ -70,15 +70,17 @@
+ #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+ #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))
+ 
+-#if !GCC_VERSION_AT_LEAST(4, 9, 0)
+-#error "Please use a newer version of GCC. WebKit requires GCC 4.9.0 or newer to compile."
++#if !GCC_VERSION_AT_LEAST(4, 7, 0)
++#error "Please use a newer version of GCC. WebKit requires GCC 4.7.0 or newer to compile."
+ #endif
+ 
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+ #define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT 1
+ #endif
+ 
++#if GCC_VERSION_AT_LEAST(4, 8, 0)
+ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
++#endif
+ 
+ #endif /* COMPILER(GCC) */
+ 
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_MathExtras.h b/webkit-gtk/patches/patch-Source_WTF_wtf_MathExtras.h
new file mode 100644
index 0000000000..f87b70e127
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_MathExtras.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WTF_wtf_MathExtras.h,v 1.6 2016/01/21 13:42:33 leot Exp $
+
+Avoid broken section for SunOS/gcc.
+
+--- Source/WTF/wtf/MathExtras.h.orig	2016-01-20 12:13:00.000000000 +0000
++++ Source/WTF/wtf/MathExtras.h
+@@ -75,7 +75,7 @@ const double sqrtOfTwoDouble = M_SQRT2;
+ const float sqrtOfTwoFloat = static_cast<float>(M_SQRT2);
+ #endif
+ 
+-#if OS(SOLARIS)
++#if OS(notSOLARIS)
+ 
+ namespace std {
+ 
diff --git a/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp b/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
new file mode 100644
index 0000000000..f01c457261
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-Source_WebCore_platform_FileSystem.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Support MAP_FILE if unavailable.
+
+--- Source/WebCore/platform/FileSystem.cpp.orig	2016-08-22 12:21:08.000000000 +0000
++++ Source/WebCore/platform/FileSystem.cpp
+@@ -189,6 +189,9 @@ MappedFileData::MappedFileData(const Str
+         return;
+     }
+ 
++#ifndef MAP_FILE
++#define MAP_FILE	0
++#endif
+     void* data = mmap(0, size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
+     close(fd);
+ 
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_WebKit2_CMakeLists.txt b/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
new file mode 100644
index 0000000000..c2e1b228b1
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-Source_WebKit2_CMakeLists.txt,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Use -lsocket on SunOS.
+
+--- Source/WebKit2/CMakeLists.txt.orig	2016-08-22 12:21:08.000000000 +0000
++++ Source/WebKit2/CMakeLists.txt
+@@ -740,6 +740,11 @@ mark_as_advanced(LIBRT_LIBRARIES)
+ if (LIBRT_LIBRARIES)
+     list(APPEND WebKit2_LIBRARIES ${LIBRT_LIBRARIES})
+ endif ()
++find_library(LIBSOCKET_LIBRARIES NAMES socket)
++mark_as_advanced(LIBSOCKET_LIBRARIES)
++if (LIBSOCKET_LIBRARIES)
++    list(APPEND WebKit2_LIBRARIES ${LIBSOCKET_LIBRARIES})
++endif ()
+ 
+ macro(ADD_WEBKIT2_PREFIX_HEADER _target)
+     if (WebKit2_USE_PREFIX_HEADER)
diff --git a/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp b/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
new file mode 100644
index 0000000000..4446109112
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
@@ -0,0 +1,52 @@
+$NetBSD: patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+SunOS does not support dirent d_type.
+
+--- Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp.orig	2017-02-20 16:20:17.000000000 +0000
++++ Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp
+@@ -52,6 +52,12 @@ namespace NetworkCache {
+ 
+ static DirectoryEntryType directoryEntryType(uint8_t dtype)
+ {
++#ifndef DT_DIR
++#define DT_DIR	S_IFDIR
++#endif
++#ifndef DT_REG
++#define DT_REG	S_IFREG
++#endif
+     switch (dtype) {
+     case DT_DIR:
+         return DirectoryEntryType::Directory;
+@@ -65,12 +71,20 @@ static DirectoryEntryType directoryEntry
+ 
+ void traverseDirectory(const String& path, const Function<void (const String&, DirectoryEntryType)>& function)
+ {
++#ifdef __sun
++    struct stat s;
++#endif
+     DIR* dir = opendir(WebCore::fileSystemRepresentation(path).data());
+     if (!dir)
+         return;
+     dirent* dp;
+     while ((dp = readdir(dir))) {
++#ifdef __sun
++        stat(dp->d_name, &s);
++        if (s.st_mode != S_IFDIR && s.st_mode != S_IFREG)
++#else
+         if (dp->d_type != DT_DIR && dp->d_type != DT_REG)
++#endif
+             continue;
+         const char* name = dp->d_name;
+         if (!strcmp(name, ".") || !strcmp(name, ".."))
+@@ -78,7 +92,11 @@ void traverseDirectory(const String& pat
+         auto nameString = String::fromUTF8(name);
+         if (nameString.isNull())
+             continue;
++#ifdef __sun
++        function(nameString, directoryEntryType(s.st_mode));
++#else
+         function(nameString, directoryEntryType(dp->d_type));
++#endif
+     }
+     closedir(dir);
+ }
diff --git a/webkit-gtk/patches/patch-Source_WebKit2_Shared_API_c_WKString.cpp b/webkit-gtk/patches/patch-Source_WebKit2_Shared_API_c_WKString.cpp
new file mode 100644
index 0000000000..f9414ff78c
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WebKit2_Shared_API_c_WKString.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit2_Shared_API_c_WKString.cpp,v 1.1 2017/04/25 10:37:26 wiz Exp $
+
+Fix build with icu-59.
+
+--- Source/WebKit2/Shared/API/c/WKString.cpp.orig	2016-08-22 12:21:08.000000000 +0000
++++ Source/WebKit2/Shared/API/c/WKString.cpp
+@@ -61,7 +61,7 @@ size_t WKStringGetCharacters(WKStringRef
+     unsigned unsignedBufferLength = std::min<size_t>(bufferLength, std::numeric_limits<unsigned>::max());
+     auto substring = toImpl(stringRef)->stringView().substring(0, unsignedBufferLength);
+ 
+-    substring.getCharactersWithUpconvert(static_cast<UChar*>(buffer));
++    substring.getCharactersWithUpconvert((UChar*)(buffer));
+     return substring.length();
+ }
+ 
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..d62a52d7d9
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_cmake_OptionsCommon.cmake
@@ -0,0 +1,21 @@
+$NetBSD: patch-Source_cmake_OptionsCommon.cmake,v 1.3 2016/01/21 13:42:33 leot Exp $
+
+Using the T option of GNU ar lead to malformed .a archive on NetBSD. Disable it.
+
+--- Source/cmake/OptionsCommon.cmake.orig	2017-02-27 07:11:15.000000000 +0000
++++ Source/cmake/OptionsCommon.cmake
+@@ -27,10 +27,10 @@ option(USE_THIN_ARCHIVES "Produce all st
+ if (USE_THIN_ARCHIVES)
+     execute_process(COMMAND ${CMAKE_AR} -V OUTPUT_VARIABLE AR_VERSION)
+     if ("${AR_VERSION}" MATCHES "^GNU ar")
+-        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 ()
+ endif ()
+ 
diff --git a/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake b/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
new file mode 100644
index 0000000000..4a4b1f7886
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
@@ -0,0 +1,57 @@
+$NetBSD: patch-Source_cmake_OptionsGTK.cmake,v 1.12 2017/04/13 16:58:14 jperkin Exp $
+
+o Do not require GCC 4.9.0 (should be build *without* IndexedDB support)
+o Do not conflict with CMAKE_MODULE_PATH during the linking phase of
+  libwebkit2gtk-4.0.so:
+
+   Linking CXX shared library ../../lib/libwebkit2gtk-4.0.so
+   ld:/usr/pkgsrc/wip/webkit-gtk/work/.buildlink/cmake-Modules:1: ignoring invalid character `3' in script
+   [...]
+   ld:/usr/pkgsrc/wip/webkit-gtk/work/.buildlink/cmake-Modules:1: syntax error in VERSION script
+   Source/WebKit2/CMakeFiles/WebKit2.dir/build.make:16139: recipe for target 'lib/libwebkit2gtk-4.0.so.37.2.6' failed
+   [...]
+
+o Disable DatabaseProcess and IndexedDB support.
+o Do not use --version-script on SunOS
+
+--- Source/cmake/OptionsGTK.cmake.orig	2017-04-04 07:31:58.000000000 +0000
++++ Source/cmake/OptionsGTK.cmake
+@@ -6,12 +6,6 @@ set(PROJECT_VERSION_MICRO 1)
+ set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO})
+ set(WEBKITGTK_API_VERSION 4.0)
+ 
+-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
+-        message(FATAL_ERROR "GCC 4.9.0 is required to build WebKitGTK+, use a newer GCC version or clang")
+-    endif ()
+-endif ()
+-
+ # Libtool library version, not to be confused with API version.
+ # See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+ CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 56 4 19)
+@@ -123,8 +117,8 @@ if (DEVELOPER_MODE)
+ else ()
+     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC OFF)
+     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE OFF)
+-    if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+-        set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter")
++    if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
++        set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_SOURCE_DIR}/Source/cmake/gtksymbols.filter")
+     endif ()
+ endif ()
+ 
+@@ -160,12 +154,12 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CANVAS_PATH PRIVATE OFF)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_REGIONS PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_SELECTORS_LEVEL4 PRIVATE ON)
+-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATABASE_PROCESS PRIVATE ON)
++WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DATABASE_PROCESS PRIVATE OFF)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTL_JIT PRIVATE ${ENABLE_FTL_DEFAULT})
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE ON)
+-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE ON)
++WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE OFF)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PRIVATE ON)
diff --git a/webkit-gtk/patches/patch-ai b/webkit-gtk/patches/patch-ai
new file mode 100644
index 0000000000..724604d1ac
--- /dev/null
+++ b/webkit-gtk/patches/patch-ai
@@ -0,0 +1,17 @@
+$NetBSD: patch-ai,v 1.7 2016/01/21 13:42:33 leot Exp $
+
+--- Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp.orig	2016-01-04 10:38:34.000000000 +0000
++++ Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
+@@ -39,6 +39,12 @@
+ #if OS(HURD)
+ // PTHREAD_KEYS_MAX is not defined in bionic nor in Hurd, so explicitly define it here.
+ #define PTHREAD_KEYS_MAX 1024
++#elif OS(NETBSD)  
++#include <limits.h>
++// PTHREAD_KEYS_MAX is not defined in 5.x
++#ifndef PTHREAD_KEYS_MAX
++#define PTHREAD_KEYS_MAX 256
++#endif  
+ #else
+ #include <limits.h>
+ #endif
diff --git a/webkit-gtk/patches/patch-aj b/webkit-gtk/patches/patch-aj
new file mode 100644
index 0000000000..82f29a4c6f
--- /dev/null
+++ b/webkit-gtk/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.5 2015/09/26 10:16:38 leot Exp $
+
+--- Source/WTF/wtf/InlineASM.h.orig	2015-07-22 12:37:57.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(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