UPDATE: x11/qt5/qtwebkit

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: x11/qt5/qtwebkit

Rafael Sadowski
Here is a huge diff to update QtWebKit from 5.9.0 to 5.212.0. 5.212.0
comes from a independent project: https://github.com/qtwebkit/qtwebkit
It's a QtWebKit with a more modern WebKit code base which fix a lot of
bugs and security holes.

I have already made a comparable update [1]. This one was much more
difficult but all consumers looks fine. Tested with qgis, digikam and
upcoming otter-browser browser. I just built and port-lib-depends-check
test the others:

graphics/digikam
databases/kexi
devel/kdevelop
devel/qt-creator
devel/kf5/kdesignerplugin
devel/kf5/kdewebkit
devel/kreport
editors/calligra
editors/ghostwriter
devel/zeal
geo/gpsbabel
geo/merkaartor
geo/qgis
net/ktorrent
editors/sigil
misc/subsurface
multimedia/upplay
www/ruby-capybara-webkit
net/qsyncthingtray
net/qsyncthingtray
mail/trojita
net/owncloudclient
x11/kde-applications/kdenlive
x11/kde-applications/rocs
x11/kde-applications/umbrello
x11/py-qt5
x11/smtube
x11/qt5/qttools

Let's take a look at the port changes:

- Remove qtwebkit-examples, this can go away
 - Yes meta/qt5 needs a tweak and bump.
- Build the old qtwebkit docs, there is no new one.
- Almost all patches can be removed. New patches come from NetBSD.
 - icu>=61.1 patches deleted.

Test note:

If you are not using dpd(1), you have to deinstall qt5base first otherwise
you'll run into the following issue:

===>  Installing qtwebkit-5.212.0 from /usr/ports/packages/amd64/all/
qtwebkit-5.9.0p11->5.212.0 forward dependencies:
| Dependencies of qt5-5.9.8p0 on qtwebkit-=5.9.0 don't match
NOT MERGING: can't find update for qt5-5.9.8p0-> (ok)
Couldn't find updates for qt5-5.9.8p0 qtwebkit-5.9.0p11
Couldn't install qtwebkit-5.212.0

Should we maybe bump all x11/qt5/qt* ports?

This is a big jump to a Qt update because 5.212.0 works fine with
my upcoming Qt update.

Feedback, OK? (I don't think anyone wants to take responsibility for
this. -- other comments also fine) Tests really welcome!

In retrospect a simple update diff.

RS

[1]: https://marc.info/?l=openbsd-ports&m=153529445721820&w=2

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile 25 Jan 2018 15:02:25 -0000 1.60
+++ Makefile 11 Feb 2020 21:29:04 -0000
@@ -31,7 +31,6 @@
      SUBDIR += qtvirtualkeyboard
      SUBDIR += qtwebchannel
      SUBDIR += qtwebkit
-     SUBDIR += qtwebkit-examples
      SUBDIR += qtwebsockets
      SUBDIR += qtx11extras
      SUBDIR += qtxmlpatterns
Index: Makefile.version
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile.version,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.version
--- Makefile.version 5 Nov 2019 10:18:53 -0000 1.8
+++ Makefile.version 11 Feb 2020 21:29:04 -0000
@@ -3,7 +3,7 @@
 
 QT5_VERSION = 5.9.8
 QT5_DIST_VERSION = 5.9.8
-QT5_WEBKIT_VERSION = 5.9.0
+QT5_WEBKIT_VERSION = 5.212.0
 
 # This one is used for building dependencies for examples and documentation,
 # which obviously should be in sync with core packages.
Index: docs/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/docs/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- docs/Makefile 6 Nov 2019 17:12:15 -0000 1.9
+++ docs/Makefile 11 Feb 2020 21:29:04 -0000
@@ -6,6 +6,7 @@ COMMENT-qch = qdoc-compiled documentati
 PKGNAME = qt5-docs-${QT5_VERSION}
 PKGNAME-html = qt5-html-${QT5_VERSION}
 PKGNAME-qch = qt5-qch-${QT5_VERSION}
+WEBKIT_DOCS_VERSION = 5.9.0
 
 MULTI_PACKAGES = -html -qch
 SUBPACKAGE ?= -html
@@ -48,10 +49,10 @@ DOC_COMPONENTS = \
  qtx11extras \
  qtxmlpatterns
 
-MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
-MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
+MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
+MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
 DISTFILES = ${DOC_COMPONENTS:Nqtwebkit:C/$/-opensource-src-${QT5_DIST_VERSION}${EXTRACT_SUFX}/}:0
-DISTFILES += qtwebkit-opensource-src-${QT5_WEBKIT_VERSION}${EXTRACT_SUFX}:1
+DISTFILES += qtwebkit-opensource-src-${WEBKIT_DOCS_VERSION}${EXTRACT_SUFX}:1
 
 MODQT5_USE_CXX11 = No
 CONFIGURE_STYLE = none
Index: qtwebkit/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- qtwebkit/Makefile 7 Jan 2020 20:22:08 -0000 1.17
+++ qtwebkit/Makefile 11 Feb 2020 21:29:04 -0000
@@ -1,29 +1,50 @@
 # $OpenBSD: Makefile,v 1.17 2020/01/07 20:22:08 zhuk Exp $
 
-QT5NAME = QtWebkit
-REVISION = 11
-COMMENT = old Webkit integration framework for Qt
+COMMENT = QtWebKit with a more modern WebKit code base
+
 USE_WXNEEDED = Yes
+
+CATEGORIES = www
+
 DPB_PROPERTIES = parallel
-VERSION = ${QT5_WEBKIT_VERSION}
-DIST_VERSION = ${QT5_WEBKIT_VERSION}
 
-SHARED_LIBS += Qt5WebKit 2.1
-SHARED_LIBS += Qt5WebKitWidgets 2.1
+VERSION = ${QT5_WEBKIT_VERSION}
+DISTNAME = qtwebkit-${QT5_WEBKIT_VERSION}-alpha3
+PKGNAME = qtwebkit-${QT5_WEBKIT_VERSION}
 
-CATEGORIES = www
+SHARED_LIBS +=  Qt5WebKit               3.0 # 5.9
+SHARED_LIBS +=  Qt5WebKitWidgets        3.0 # 5.9
+SHARED_LIBS +=  JavaScriptCore          0.0 # 5.212.9
+SHARED_LIBS +=  WebCore                 0.0 # 5.212.9
+SHARED_LIBS +=  WebKit2                 0.0 # 5.212.9
+SHARED_LIBS +=  WTF                     0.0 # 5.212.9
+
+# Mostly LGPLv2.1 or LGPLv3 for code; FDLv1.3 for documentation.
+# Some third-party parts are BSD-licensed.
+# Also, many parts have are dual-licensed having either commercial, GPL,
+# Apache 2.0 or other type of license as an alternative option.
+# A few components, including QtWebEngine, are LGPLv3 only, no LGPLv2.1.
+PERMIT_PACKAGE = Yes
+
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5Positioning
+WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5WebChannel
+WANTLIB += Qt5Widgets X11 Xcomposite Xrender c gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstfft-1.0
+WANTLIB += gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 gstvideo-1.0
+WANTLIB += hyphen icui18n icuuc jpeg m png sqlite3 webp xml2 xslt
+
+MASTER_SITES = https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+MODULES = devel/cmake \
+ lang/ruby \
+ x11/qt5
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5OpenGL
-WANTLIB += Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors
-WANTLIB += Qt5Sql Qt5WebChannel Qt5Widgets X11 Xext Xrender c
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0
-WANTLIB += gstbase-1.0 gstpbutils-1.0 gstreamer-1.0 gstvideo-1.0
-WANTLIB += icudata icui18n icuuc intl jpeg m png sqlite3 webp
-WANTLIB += xml2 xslt z
+# Override to unbreak ninja build
+CONFIGURE_STYLE = cmake
 
-MASTER_SITES = https://download.qt.io/community_releases/${DIST_VERSION:R}/${DIST_VERSION}-final/
+# Remove default "first" target and build all
+ALL_TARGET =
 
-MODULES = perl lang/python lang/ruby
 MODPY_RUNDEP = No
 MODRUBY_RUNDEP = No
 
@@ -43,75 +64,72 @@ LIB_DEPENDS = databases/sqlite3 \
  multimedia/gstreamer1/plugins-base \
  textproc/icu4c \
  textproc/libxslt \
+ graphics/libwebp \
+ textproc/hyphen \
  x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtlocation>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtsensors>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtwebchannel>=${QT5_VERSION},<${QT5_NEXT_VERSION}
 
-MAKE_ENV = NINJA_PATH="${LOCALBASE}/bin/ninja" \
- PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-MAKE_FLAGS = PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-FLAVORS = debug
-PSEUDO_FLAVORS = no_tests
-
-#MODQMAKE_ARGS = WEBKIT_CONFIG+=web_audio
+CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
+ -DENABLE_API_TESTS=OFF \
+ -DENABLE_QT_WEBCHANNEL=ON \
+ -DENABLE_TOOLS=OFF \
+ -DPORT=Qt \
+ -DSHARED_CORE=ON \
+ -DUSE_GSTREAMER=ON \
+ -DUSE_LD_GOLD=OFF \
+ -DUSE_QT_MULTIMEDIA=OFF \
+ -DUSE_SYSTEM_MALLOC=ON \
+ -DUSE_WOFF2=OFF
+
+CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX="${WRKINST}${TRUEPREFIX}" \
+ -DECM_MKSPECS_INSTALL_DIR=${WRKINST}${MODQT_LIBDIR}/mkspecs/modules \
+ -DKDE_INSTALL_INCLUDEDIR=${WRKINST}${MODQT_INCDIR} \
+ -DKDE_INSTALL_LIBEXECDIR=${WRKINST}${MODQT_LIBDIR}/libexec \
+ -DKDE_INSTALL_SHAREDSTATEDIR=/var \
+ -DKDE_INSTALL_SYSCONFDIR=/etc \
+ -DKDE_INSTALL_MANDIR=${WRKINST}/man \
+ -DKDE_INSTALL_QTPLUGINDIR=${WRKINST}${MODQT_LIBDIR}/plugins \
+ -DKDE_INSTALL_LIBDIR=${WRKINST}${MODQT_LIBDIR} \
+ -DKDE_INSTALL_QMLDIR=${WRKINST}${MODQT_LIBDIR}/qml
 
 # See qtbase/tests/README for details
 TEST_IS_INTERACTIVE = X11
 TEST_DEPENDS = ${MODPY_RUN_DEPENDS} \
  ${MODRUBY_RUN_DEPENDS} \
- audio/sox \
- kde4-minimal-*|kdebase-*:meta/kde4,-minimal
+ audio/sox
 
-pre-configure:
- # Python and Ruby are used for building mainly, those paths
- # do not get into final packages.
- ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
- ln -sf ${RUBY} ${WRKDIR}/bin/ruby
-
- cd ${WRKSRC}; ${MODPY_BIN_ADJ} \
- `find . -name '*.py'` \
- `egrep -Rl '(env |bin/)python' Tools` \
- Source/WebCore/inspector/generate-inspector-protocol-version \
- Source/WebCore/html/parser/create-html-entity-table
-
- cd ${WRKSRC}; ${MODRUBY_RUBY_ADJ} \
- `find . -name '*.rb'` \
- Tools/Scripts/check-for-webkit-framework-include-consistency \
- Tools/Scripts/display-profiler-output \
- Tools/Scripts/check-for-inappropriate-macros-in-external-headers \
- Tools/Scripts/roll-over-ChangeLogs \
- Tools/Scripts/check-for-inappropriate-files-in-framework \
- Tools/Scripts/test-webkitruby \
- Tools/Scripts/clean-header-guards \
- Tools/Scripts/bencher \
- Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator \
- Source/WebCore/make-export-file-generator \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
-
- cd ${WRKSRC}; perl -pi.otheradj \
- -e 's,/usr/bin/(env )?python\b,${MODPY_BIN},g;' \
- -e 's,/usr/bin/(env )?ruby\b,${RUBY},g;' \
- -e 's,(/usr)?/bin/(env )?bash\b,/bin/ksh,g;' \
- Tools/BuildSlaveSupport/gtk/pulseaudio/run \
- Tools/Scripts/old-run-webkit-tests \
- Tools/Scripts/run-webkit-websocketserver \
- Tools/Scripts/webkitpy/common/system/executive_unittest.py
-
- cd ${WRKSRC}; perl -pi.symname \
- -e 's/^__/_/;' \
- qtwebkit/Source/JavaScriptCore/JavaScriptCore.order
-
- cd ${WRKSRC}/Tools/qmake/config.tests; perl -pi.objdir \
- -e 's/^OBJECTS_DIR/#$$&/;' \
- */*.pro
+.include <bsd.port.arch.mk>
+
+# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
+.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
+    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
+    ${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el" && \
+    ${MACHINE_ARCH} != "sh"
+# #error "The MacroAssembler is not supported on this platform."
+CONFIGURE_ARGS += -DENABLE_JIT=OFF
+CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
+.endif
+
+# ld.lld does not have this option
+# save memory on 32bit arches
+.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
+LDFLAGS += -Wl,--no-keep-memory
+.endif
+
+# __sync_add_and_fetch_8
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS += -march=i686
+CXXFLAGS += -march=i686
+.endif
 
 .include <bsd.port.mk>
 .if ${CHOSEN_COMPILER} == "base-clang"
 CXXFLAGS += -fno-ret-protector
 .endif
+
+post-install:
+ find ${WRKINST} -type f -print0 | xargs -0r perl -pi \
+ -e 's,${WRKINST},,g;'
Index: qtwebkit/distinfo
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- qtwebkit/distinfo 17 Jul 2017 08:34:39 -0000 1.2
+++ qtwebkit/distinfo 11 Feb 2020 21:29:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = ja0ZO3QAVamYMS4EoEDy4yqSPAgjstI5sk6rCCdqTgQ=
-SIZE (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = 35301288
+SHA256 (qt/qtwebkit-5.212.0-alpha3.tar.xz) = NX7uWCRFV0Ry5BDr7OYy0G+g7JQ1j8Q0XypxOSLfXhc=
+SIZE (qt/qtwebkit-5.212.0-alpha3.tar.xz) = 12457896
Index: qtwebkit/patches/patch-CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-CMakeLists_txt
diff -N qtwebkit/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-CMakeLists_txt 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64
+     set(WTF_CPU_X86_64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+     set(WTF_CPU_X86 1)
+-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+     set(WTF_CPU_PPC 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+     set(WTF_CPU_PPC64 1)
+@@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390
+     set(WTF_CPU_S390 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+     set(WTF_CPU_S390X 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
++ set(WTF_CPU_SPARC64 1)
+ else ()
+     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
+ endif ()
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_API_JSStringRef_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/JavaScriptCore/API/JSStringRef.cpp
---- Source/JavaScriptCore/API/JSStringRef.cpp.orig
-+++ 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(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
- }
-
- JSStringRef JSStringCreateWithUTF8CString(const char* string)
-@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char*
- JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
- {
-     initializeThreading();
--    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
-+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
- }
-
- JSStringRef JSStringRetain(JSStringRef string)
-@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
-
- const JSChar* JSStringGetCharactersPtr(JSStringRef string)
- {
--    return string->characters();
-+    return reinterpret_cast<const JSChar*>(string->characters());
- }
-
- size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/API/ObjCCallbackFunction.h
+--- Source/JavaScriptCore/API/ObjCCallbackFunction.h.orig
++++ Source/JavaScriptCore/API/ObjCCallbackFunction.h
+@@ -29,7 +29,7 @@
+
+ #if JSC_OBJC_API_ENABLED
+
+-#import <JavaScriptCore/JSCallbackFunction.h>
++#import <JavaScriptCore/API/JSCallbackFunction.h>
+
+ #if defined(__OBJC__)
+ JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.2 2017/09/15 07:43:42 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2666,6 +2666,8 @@ class ARM64Assembler { (public)
+     {
+ #if OS(IOS)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(LINUX)
+         size_t page = pageSize();
+         uintptr_t current = reinterpret_cast<uintptr_t>(code);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.3 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARMAssembler.h
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -1128,6 +1128,8 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+
+             linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.4 2018/03/19 08:13:15 ajacoutot Exp $
+
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -36,6 +36,12 @@
+ #include <intrin.h>
+ #endif
+
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+
+ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler, MacroAssemblerX86Common> {
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 11 Feb 2020 21:29:04 -0000
@@ -1,16 +1,14 @@
-$OpenBSD: patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig Fri Dec 26 13:45:46 2014
-+++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp Fri Dec 26 13:48:04 2014
-@@ -152,8 +152,9 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
-         amountOfNodeWhiteSpace = 0;
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+--- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig
++++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+@@ -159,7 +159,7 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
      else
          amountOfNodeWhiteSpace = Graph::amountOfNodeWhiteSpace(context);
--    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixLength + amountOfNodeWhiteSpace + 1]);
+     auto prefixBuffer = std::make_unique<char[]>(prefixLength + amountOfNodeWhiteSpace + 1);
 -    strcpy(prefixBuffer.get(), prefix);
-+    size_t prefixBufferSize = prefixLength + amountOfNodeWhiteSpace + 1;
-+    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixBufferSize]);
-+    memcpy(prefixBuffer.get(), prefix, prefixBufferSize);
++    memcpy(prefixBuffer.get(), prefix, prefixLength);
      for (int i = 0; i < amountOfNodeWhiteSpace; ++i)
          prefixBuffer[i + prefixLength] = ' ';
      prefixBuffer[prefixLength + amountOfNodeWhiteSpace] = 0;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 11 Feb 2020 21:29:04 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak build.
-Synchronized with WebKit upsteam.
---- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Thu Sep 11 14:48:22 2014
-+++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Wed Jan  7 01:01:51 2015
-@@ -45,6 +45,10 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.cpp
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -49,6 +49,10 @@
 
  #elif OS(UNIX)
 
@@ -14,45 +14,124 @@ Synchronized with WebKit upsteam.
  #include <sys/mman.h>
  #include <unistd.h>
 
-@@ -311,6 +315,8 @@ typedef arm_thread_state_t PlatformThreadRegisters;
- typedef CONTEXT PlatformThreadRegisters;
- #elif OS(QNX)
- typedef struct _debug_thread_info PlatformThreadRegisters;
-+#elif OS(OPENBSD)
-+typedef pthread_t PlatformThreadRegisters;
- #elif USE(PTHREADS)
- typedef pthread_attr_t PlatformThreadRegisters;
+@@ -89,7 +93,7 @@ static void pthreadSignalHandlerSuspendResume(int, sig
+ #if CPU(PPC)
+     thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
  #else
-@@ -369,6 +375,8 @@ static size_t getPlatformThreadRegisters(const Platfor
-     }
-     close(fd);
-     return sizeof(struct _debug_thread_info);
+-    thread->suspendedMachineContext = userContext->uc_mcontext;
++    thread->suspendedMachineContext = *userContext;
+ #endif
+
+     // Allow suspend caller to see that this thread is suspended.
+@@ -566,6 +570,25 @@ void* MachineThreads::Thread::Registers::stackPointer(
+ #error Unknown Architecture
+ #endif
+
 +#elif OS(OPENBSD)
-+    regs = platformThread;
- #elif USE(PTHREADS)
-     pthread_attr_init(&regs);
- #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
-@@ -437,7 +445,14 @@ static inline void* otherThreadStackPointer(const Plat
- #elif USE(PTHREADS)
-     void* stackBase = 0;
-     size_t stackSize = 0;
-+#if OS(OPENBSD)
-+    stack_t ss;
-+    int rc = pthread_stackseg_np(regs, &ss);
-+    stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
-+    stackSize = ss.ss_size;
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_edx);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[5]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsi);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__) && ENABLE(JIT)
+
+ #if CPU(X86)
+@@ -632,6 +655,7 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++
+ #endif // __DARWIN_UNIX03
+
+ // end OS(DARWIN)
+@@ -665,6 +689,25 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_esp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[29]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsp);
 +#else
-     int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#error Unknown Architecture
 +#endif
-     (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
-     ASSERT(stackBase);
-     return static_cast<char*>(stackBase) + stackSize;
-@@ -448,7 +463,7 @@ static inline void* otherThreadStackPointer(const Plat
-
- static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
- {
--#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
-+#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX) && !OS(OPENBSD)
-     pthread_attr_destroy(&regs);
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -747,6 +790,25 @@ void* MachineThreads::Thread::Registers::instructionPo
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_ebp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rbp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[30]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rbp);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -837,6 +899,25 @@ void* MachineThreads::Thread::Registers::llintPC() con
  #else
-     UNUSED_PARAM(regs);
+ #error Unknown Architecture
+ #endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_eip);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rip);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_pc);                                                                                                                  
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rip);
++#else
++#error Unknown Architecture
++#endif
++
+
+ #elif defined(__GLIBC__)
+
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.h
+--- Source/JavaScriptCore/heap/MachineStackMarker.h.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.h
+@@ -41,7 +41,10 @@
+ #if OS(FREEBSD)
+ #include <ucontext.h>
+ #endif
++#if OS(OPENBSD)
++typedef ucontext_t mcontext_t;
+ #endif
++#endif
+
+ #if OS(DARWIN)
+ typedef mach_port_t PlatformThread;
+@@ -51,6 +54,7 @@ typedef DWORD PlatformThread;
+ typedef pthread_t PlatformThread;
+ #endif // OS(DARWIN)
+
++
+ namespace JSC {
+
+ class CodeBlockSet;
+@@ -114,7 +118,6 @@ class MachineThreads { (public)
+ #else
+ #error Need a thread register struct for this platform
+ #endif
+-            
+             PlatformRegisters regs;
+         };
+        
Index: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,11 @@
+$OpenBSD: patch-Source_JavaScriptCore_javascriptcoregtk_pc_in,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig Tue Aug  9 01:03:49 2016
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in Tue Aug  9 01:03:57 2016
+@@ -7,5 +7,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
--- qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 11 Feb 2020 21:29:04 -0000
@@ -1,13 +1,13 @@
-$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Taken from www/webkitgtk4 port, see also:
-https://bugs.webkit.org/show_bug.cgi?id=61137
---- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Tue Feb 17 07:57:12 2015
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.h Wed Apr  8 00:38:31 2015
-@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
- #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
- #if CPU(ARM) || CPU(MIPS)
+$OpenBSD$
+
+Index: Source/JavaScriptCore/jit/ExecutableAllocator.h
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -80,7 +80,8 @@ static const size_t fixedExecutableMemoryPoolSize = FI
  static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
--#elif CPU(X86_64) && !CPU(X32)
+ #elif CPU(ARM64)
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
+-#elif CPU(X86_64)
 +#elif CPU(X86_64) && !CPU(X32) && !OS(OPENBSD)
 +// default limits on OpenBSD are far less than 1GB
  static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
--- qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_jsc_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Enable W^X in QtWebkit's JIT.
-Index: Source/JavaScriptCore/jsc.pro
---- Source/JavaScriptCore/jsc.pro.orig
-+++ Source/JavaScriptCore/jsc.pro
-@@ -30,4 +30,5 @@ wince* {
- # Prevent warnings about difference in visibility on Mac OS X
- qtConfig(reduce_exports):CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations):CONFIG += bsymbolic_functions
-+openbsd:DEFINES *= ASSEMBLER_WX_EXCLUSIVE=1
-
Index: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
diff -N qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
--- qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp.orig Fri Dec 26 13:50:19 2014
-+++ Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp Fri Dec 26 13:53:09 2014
-@@ -107,17 +107,13 @@ void InfoLog::append(const char *format, ...)
-     if (!mInfoLog)
-     {
-         mInfoLog = new char[infoLength + 2];
--        strcpy(mInfoLog, info);
--        strcpy(mInfoLog + infoLength, "\n");
-+        snprintf(mInfoLog, infoLength + 2, "%s\n", info);
-     }
-     else
-     {
-         size_t logLength = strlen(mInfoLog);
-         char *newLog = new char[logLength + infoLength + 2];
--        strcpy(newLog, mInfoLog);
--        strcpy(newLog + logLength, info);
--        strcpy(newLog + logLength + infoLength, "\n");
--
-+        snprintf(mInfoLog, logLength + infoLength + 2, "%s%s\n", mInfoLog, info);
-         delete[] mInfoLog;
-         mInfoLog = newLog;
-     }
Index: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
diff -N qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -188,6 +188,7 @@
+ #include <iostream>  // NOLINT
+ #include <sstream>  // NOLINT
+ #include <string>  // NOLINT
++#include <unistd.h>
+
+ #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
+ #define GTEST_FLAG_PREFIX_ "gtest_"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
diff -N qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/Assertions.cpp
+--- Source/WTF/wtf/Assertions.cpp.orig
++++ Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || OS(OPENBSD) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* fil
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) || (OS(OPENBSD)) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -259,7 +259,7 @@ void WTFReportBacktrace()
+     WTFPrintBacktrace(samples + framesToSkip, frames - framesToSkip);
+ }
+
+-#if OS(DARWIN) || OS(LINUX)
++#if OS(DARWIN) || OS(LINUX) || OS(OPENBSD)
+ #  if PLATFORM(QT) || PLATFORM(GTK)
+ #    if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #      define USE_BACKTRACE_SYMBOLS 1
Index: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ 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(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Platform_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WTF_wtf_Platform_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_WTF_wtf_Platform_h
--- qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 11 Feb 2020 21:29:04 -0000
@@ -1,15 +1,21 @@
-$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Use system malloc(3).
---- Source/WTF/wtf/Platform.h.orig Tue Feb 17 07:57:01 2015
-+++ Source/WTF/wtf/Platform.h Wed Apr  8 00:38:31 2015
-@@ -724,6 +724,10 @@
- #endif
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.12 2018/03/19 08:13:15 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -155,6 +155,13 @@
+ #define WTF_CPU_BIG_ENDIAN 1
  #endif
 
-+#if PLATFORM(OPENBSD)
-+#define USE_SYSTEM_MALLOC 1
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
 +#endif
 +
- #if PLATFORM(EFL)
- #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
- #endif
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
Index: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
--- qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_RandomNumberSeed_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Source/WTF/wtf/RandomNumberSeed.h.orig Fri Dec 19 23:00:04 2014
-+++ Source/WTF/wtf/RandomNumberSeed.h Fri Dec 19 23:01:03 2014
-@@ -55,6 +55,8 @@ inline void initializeRandomNumberGenerator()
-     timeval time;
-     gettimeofday(&time, 0);
-     srandom(static_cast<unsigned>(time.tv_usec * getpid()));
-+#elif OS(OPENBSD)
-+    // On OpenBSD we use arc4random() which initialises itself
- #else
-     srand(static_cast<unsigned>(time(0)));
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
--- qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_TypeTraits_h,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WTF/wtf/TypeTraits.h
---- Source/WTF/wtf/TypeTraits.h.orig
-+++ Source/WTF/wtf/TypeTraits.h
-@@ -72,6 +72,9 @@ namespace WTF {
-     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
-     template<> struct IsInteger<long long>          { static const bool value = true; };
-     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
-+#endif
- #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)  || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
Index: qtwebkit/patches/patch-Source_WebCore_Target_pri
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_Target_pri
diff -N qtwebkit/patches/patch-Source_WebCore_Target_pri
--- qtwebkit/patches/patch-Source_WebCore_Target_pri 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WebCore_Target_pri,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebCore/Target.pri.orig Tue Feb 17 07:57:09 2015
-+++ Source/WebCore/Target.pri Wed Apr  8 00:38:31 2015
-@@ -4280,6 +4280,12 @@ win32:!mingw:contains(QMAKE_HOST.arch, x86_64):{
-    }
- }
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include/libsoup-2.4
-+    INCLUDEPATH += $(LOCALBASE)/include/harfbuzz
-+    INCLUDEPATH += $(X11BASE)/include/freetype2
-+}
-+
- contains(CONFIG, opengl-shims) {
-     HEADERS += platform/graphics/OpenGLShims.h
-     SOURCES += platform/graphics/OpenGLShims.cpp
Index: qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Source_WebCore_dom_Document_cpp
--- qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 11 Feb 2020 21:29:04 -0000
@@ -5,7 +5,7 @@ Fix build with icu4c >=65
 Index: Source/WebCore/dom/Document.cpp
 --- Source/WebCore/dom/Document.cpp.orig
 +++ Source/WebCore/dom/Document.cpp
-@@ -3846,12 +3846,12 @@ static bool isValidNameNonASCII(const UChar* character
+@@ -4407,12 +4407,12 @@ static bool isValidNameNonASCII(const UChar* character
      unsigned i = 0;
 
      UChar32 c;
@@ -20,12 +20,12 @@ Index: Source/WebCore/dom/Document.cpp
          if (!isValidNamePart(c))
              return false;
      }
-@@ -3914,7 +3914,7 @@ bool Document::parseQualifiedName(const String& qualif
-     const UChar* s = qualifiedName.characters();
+@@ -4474,7 +4474,7 @@ bool Document::parseQualifiedName(const String& qualif
+
      for (unsigned i = 0; i < length;) {
          UChar32 c;
--        U16_NEXT(s, i, length, c)
-+        U16_NEXT(s, i, length, c);
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
          if (c == ':') {
              if (sawColon) {
                  ec = NAMESPACE_ERR;
Index: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -31,7 +31,7 @@
+ #include <wtf/NeverDestroyed.h>
+ #include <wtf/text/WTFString.h>
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
--- qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/graphics/SegmentedFontData.cpp
---- Source/WebCore/platform/graphics/SegmentedFontData.cpp.orig
-+++ Source/WebCore/platform/graphics/SegmentedFontData.cpp
-@@ -61,7 +61,7 @@ bool SegmentedFontData::containsCharacters(const UChar
- {
-     UChar32 c;
-     for (int i = 0; i < length; ) {
--        U16_NEXT(characters, i, length, c)
-+        U16_NEXT(characters, i, length, c);
-         if (!containsCharacter(c))
-             return false;
-     }
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+@@ -33,7 +33,7 @@ struct GraphicsSurfaceToken {
+
+ #if OS(DARWIN)
+     typedef mach_port_t BufferHandle;
+-#elif OS(LINUX)
++#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+     typedef uint32_t BufferHandle;
+ #elif OS(WINDOWS)
+     typedef HANDLE BufferHandle;
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+@@ -34,7 +34,7 @@ typedef struct __IOSurface* IOSurfaceRef;
+ typedef IOSurfaceRef PlatformGraphicsSurface;
+ #endif
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ typedef uint32_t PlatformGraphicsSurface;
+ #endif
+
Index: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
diff -N qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
--- qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
---- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.orig
-+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
-@@ -175,7 +175,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UC
-     int32_t i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(buffer, i, length, c)
-+        U16_NEXT(buffer, i, length, c);
-         UErrorCode error = U_ZERO_ERROR;
-         UScriptCode script = uscript_getScript(c, &error);
-         if (error != U_ZERO_ERROR) {
-@@ -746,7 +746,7 @@ static CFStringRef createStringWithEscapedUnsafeCharac
-     CFIndex i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(sourceBuffer, i, length, c)
-+        U16_NEXT(sourceBuffer, i, length, c);
-        
-         if (isLookalikeCharacter(c)) {
-             uint8_t utf8Buffer[4];
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginPackageQt.cpp.orig Tue Oct 13 07:37:21 2015
-+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp Thu Dec 10 09:05:23 2015
-@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0)
-         }
-     }
-
--    QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgtk-x11-2.0"));
-     if (library.load()) {
-         typedef void *(*gtk_init_check_ptr)(int*, char***);
-         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginViewQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginViewQt.cpp.orig Fri Dec 26 02:28:55 2014
-+++ Source/WebCore/plugins/qt/PluginViewQt.cpp Fri Dec 26 02:29:10 2014
-@@ -697,7 +697,7 @@ static Display *getPluginDisplay()
-     // support gdk based plugins (like flash) that use a different X connection.
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
--- qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp.orig Fri Dec 26 02:29:24 2014
-+++ Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp Fri Dec 26 02:29:35 2014
-@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMess
-
- static bool initializeGtk()
- {
--    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"));
-     if (!gtkLibrary.load())
-         return false;
-     typedef void* (*gtk_init_ptr)(void*, void*);
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
--- qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_Shared_API_c_WKString_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WebKit2/Shared/API/c/WKString.cpp
---- Source/WebKit2/Shared/API/c/WKString.cpp.orig
-+++ Source/WebKit2/Shared/API/c/WKString.cpp
-@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
- size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
- {
-     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
--    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
-+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
- }
-
- size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+--- Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp.orig
++++ Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+@@ -68,6 +68,7 @@ Vector<String> pluginsDirectories()
+     result.append("/usr/lib64/mozilla/plugins");
+     result.append("/usr/lib/nsbrowser/plugins");
+     result.append("/usr/lib64/nsbrowser/plugins");
++    result.append("${LOCALBASE}/lib/mozilla/plugins");
+ #endif
+
+     return result;
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.orig Fri Dec 26 02:30:14 2014
-+++ Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp Fri Dec 26 02:30:24 2014
-@@ -64,7 +64,7 @@ static Display* getPluginDisplay()
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_pro,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebKit2/WebProcess.pro.orig Thu Sep 11 14:48:23 2014
-+++ Source/WebKit2/WebProcess.pro Mon Nov 10 20:49:42 2014
-@@ -15,6 +15,10 @@ INCLUDEPATH = \
-     $$PWD/Shared/linux/SandboxProcess/ \
-     $$INCLUDEPATH
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include
-+}
-+
- QT += network webkit
- macx: QT += xml
-
Index: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
diff -N qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+--- Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp.orig
++++ Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+@@ -964,6 +964,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& si
+     if (view->needsLayout())
+         view->layout();
+     view->adjustViewSize();
++
++    if (view->needsLayout())
++        view->layout();
+ }
+
+
Index: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
diff -N qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake 11 Feb 2020 21:29:04 -0000
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_cmake_OptionsCommon_cmake,v 1.12 2017/09/15 07:43:42 ajacoutot Exp $
+
+Our ar(1) is too old and have not support for `T'.
+
+Undefined references to libc functions.
+
+Index: Source/cmake/OptionsCommon.cmake
+--- Source/cmake/OptionsCommon.cmake.orig
++++ Source/cmake/OptionsCommon.cmake
+@@ -19,10 +19,10 @@ option(USE_THIN_ARCHIVES "Produce all static libraries
+ 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 ()
+
+@@ -174,9 +174,9 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
++#    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
++#endif ()
+
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
Index: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
diff -N qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
--- qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_DumpRenderTree_JavaScriptThreading_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/DumpRenderTree/JavaScriptThreading.cpp.orig Fri Dec 19 23:01:59 2014
-+++ Tools/DumpRenderTree/JavaScriptThreading.cpp Fri Dec 19 23:02:47 2014
-@@ -101,7 +101,7 @@ void runJavaScriptThread(void*)
-         }
-
-         // Respawn probabilistically.
--        if (rand() % 5)
-+        if (arc4random_uniform(5))
-             continue;
-
-         MutexLocker locker(javaScriptThreadsMutex());
Index: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_mangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/mangle.cgi.c.orig Fri Dec 26 02:50:45 2014
-+++ Tools/mangleme/mangle.cgi.c Fri Dec 26 02:51:04 2014
-@@ -18,7 +18,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_remangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/remangle.cgi.c.orig Fri Dec 26 02:49:32 2014
-+++ Tools/mangleme/remangle.cgi.c Fri Dec 26 02:50:11 2014
-@@ -17,7 +17,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/gccdepends/gccdepends.pro
---- Tools/qmake/config.tests/gccdepends/gccdepends.pro.orig
-+++ Tools/qmake/config.tests/gccdepends/gccdepends.pro
-@@ -1,27 +1,22 @@
- TEMPLATE = aux
--OBJECTS_DIR = obj
-+#OBJECTS_DIR = obj
- QMAKE_CXXFLAGS += -MD
-
- base_filename = empty
--object_file = $$OBJECTS_DIR/$${base_filename}.o
-+object_file = $${base_filename}.o
- deps_filename = $${base_filename}.d
-
- SOURCES += $${base_filename}.cpp
-
- test.commands = \
--    # Earlier teambuilder and icecream versions would not
--    # respect the -o argument for the .d file, so the file
--    # would end up in the root build dir.
--    test ! -f $${deps_filename} && \
--    \
-     # But it should end up in the OBJECTS_DIR
--    test -f $$OBJECTS_DIR/$${deps_filename} && \
-+    test -f $${deps_filename} && \
-     \
-     # Icecream 0.9.7 and earlier does not ensure that the
-     # target rule matches the path of the .o file, since
-     # the file is compiled into the current dir and then
-     # moved. Verify that we don't hit that case.
--    grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
-+    grep -q \"$${object_file}:\" $${deps_filename} && \
-     \
-     # If everything is all right we mark the test as succeeded
-     echo success > $$basename(PWD)
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_glx_glx_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/glx/glx.pro
---- Tools/qmake/config.tests/glx/glx.pro.orig
-+++ Tools/qmake/config.tests/glx/glx.pro
-@@ -1,4 +1,4 @@
-+CONFIG += opengl x11
- SOURCES = glx.cpp
--OBJECTS_DIR = obj
--LIBS += -lX11 -lGL
-+#OBJECTS_DIR = obj
-
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
---- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig
-+++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXcomposite.cpp
--OBJECTS_DIR = obj
--LIBS += -lXcomposite -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXcomposite ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXrender_libXrender_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXrender/libXrender.pro
---- Tools/qmake/config.tests/libXrender/libXrender.pro.orig
-+++ Tools/qmake/config.tests/libXrender/libXrender.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXrender.cpp
--OBJECTS_DIR = obj
--LIBS += -lXrender -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXrender ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
diff -N qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
--- qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak linking to static libraries by providing exact paths when possible.
-
-Particular problem: system version of leveldb gets picked up due to madness in -L.
---- Tools/qmake/mkspecs/features/functions.prf.orig Mon May 30 14:52:29 2016
-+++ Tools/qmake/mkspecs/features/functions.prf Sat Jul 30 00:00:45 2016
-@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
-         mac {
-             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
-         } else:win32-msvc*|wince*|win32-icc {
-+            LIBS += -L$$path
-             LIBS += -l$$target
-             QMAKE_LFLAGS += /OPT:REF
-         } else {
-             CONFIG *= no_smart_library_merge
--            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
-+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
-         }
--
--        LIBS += -L$$path
-
-         win32-msvc*|wince*|win32-icc {
-             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
Index: qtwebkit/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- qtwebkit/pkg/PLIST 7 Jan 2020 20:22:08 -0000 1.2
+++ qtwebkit/pkg/PLIST 11 Feb 2020 21:29:04 -0000
@@ -1,11 +1,10 @@
-@comment $OpenBSD: PLIST,v 1.2 2020/01/07 20:22:08 zhuk Exp $
+@comment $OpenBSD: PLIST,v 1.1 2017/07/29 00:07:15 zhuk Exp $
 @conflict qt5-<5.6
 @pkgpath x11/qt5/qtwebkit,-main
 include/X11/qt5/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/bytearraytestdata.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qhttpheader_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkreply_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkrequest_p.h
@@ -14,8 +13,6 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebpage_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qtwebsecurityorigin_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebchannelwebkittransport_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebdatabase_p.h
@@ -33,14 +30,12 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebplugindatabase_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebsecurityorigin_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/testwindow.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/util.h
 include/X11/qt5/QtWebKit/QWebDatabase
 include/X11/qt5/QtWebKit/QWebElement
 include/X11/qt5/QtWebKit/QWebElementCollection
+include/X11/qt5/QtWebKit/QWebFullScreenRequest
 include/X11/qt5/QtWebKit/QWebFullScreenVideoHandler
 include/X11/qt5/QtWebKit/QWebHapticFeedbackPlayer
 include/X11/qt5/QtWebKit/QWebHistory
@@ -62,6 +57,7 @@ include/X11/qt5/QtWebKit/QtWebKitVersion
 include/X11/qt5/QtWebKit/qtwebkitversion.h
 include/X11/qt5/QtWebKit/qwebdatabase.h
 include/X11/qt5/QtWebKit/qwebelement.h
+include/X11/qt5/QtWebKit/qwebfullscreenrequest.h
 include/X11/qt5/QtWebKit/qwebhistory.h
 include/X11/qt5/QtWebKit/qwebhistoryinterface.h
 include/X11/qt5/QtWebKit/qwebkitglobal.h
@@ -92,25 +88,36 @@ include/X11/qt5/QtWebKitWidgets/qwebfram
 include/X11/qt5/QtWebKitWidgets/qwebinspector.h
 include/X11/qt5/QtWebKitWidgets/qwebpage.h
 include/X11/qt5/QtWebKitWidgets/qwebview.h
+@lib lib/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
 @lib lib/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/libWTF.so.${LIBWTF_VERSION}
+@lib lib/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 lib/qt5/cmake/Qt5WebKit/
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfigVersion.cmake
+lib/qt5/cmake/Qt5WebKit/WebKitTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
-lib/qt5/libQt5WebKit.la
-lib/qt5/libQt5WebKit.prl
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
+@static-lib lib/qt5/libANGLESupport.a
+@lib lib/qt5/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/qt5/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
-lib/qt5/libQt5WebKitWidgets.la
-lib/qt5/libQt5WebKitWidgets.prl
 @lib lib/qt5/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/qt5/libWTF.so.${LIBWTF_VERSION}
+@lib lib/qt5/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/qt5/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/qt5/libexec/
+@bin lib/qt5/libexec/QtWebNetworkProcess
 @bin lib/qt5/libexec/QtWebPluginProcess
 @bin lib/qt5/libexec/QtWebProcess
+@bin lib/qt5/libexec/QtWebStorageProcess
 lib/qt5/mkspecs/modules/qt_lib_webkit.pri
 lib/qt5/mkspecs/modules/qt_lib_webkit_private.pri
 lib/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Landry Breuil-5
On Wed, Feb 12, 2020 at 09:36:59AM +0100, Rafael Sadowski wrote:

> Here is a huge diff to update QtWebKit from 5.9.0 to 5.212.0. 5.212.0
> comes from a independent project: https://github.com/qtwebkit/qtwebkit
> It's a QtWebKit with a more modern WebKit code base which fix a lot of
> bugs and security holes.
>
> I have already made a comparable update [1]. This one was much more
> difficult but all consumers looks fine. Tested with qgis, digikam and
> upcoming otter-browser browser. I just built and port-lib-depends-check
> test the others:
>
> graphics/digikam
> databases/kexi
> devel/kdevelop
> devel/qt-creator
> devel/kf5/kdesignerplugin
> devel/kf5/kdewebkit
> devel/kreport
> editors/calligra
> editors/ghostwriter
> devel/zeal
> geo/gpsbabel
> geo/merkaartor
> geo/qgis
> net/ktorrent
> editors/sigil
> misc/subsurface
> multimedia/upplay
> www/ruby-capybara-webkit
> net/qsyncthingtray
> net/qsyncthingtray
> mail/trojita
> net/owncloudclient
> x11/kde-applications/kdenlive
> x11/kde-applications/rocs
> x11/kde-applications/umbrello
> x11/py-qt5
> x11/smtube
> x11/qt5/qttools
>
> Let's take a look at the port changes:
>
> - Remove qtwebkit-examples, this can go away
>  - Yes meta/qt5 needs a tweak and bump.
> - Build the old qtwebkit docs, there is no new one.
> - Almost all patches can be removed. New patches come from NetBSD.
>  - icu>=61.1 patches deleted.
>
> Test note:
>
> If you are not using dpd(1), you have to deinstall qt5base first otherwise
> you'll run into the following issue:
>
> ===>  Installing qtwebkit-5.212.0 from /usr/ports/packages/amd64/all/
> qtwebkit-5.9.0p11->5.212.0 forward dependencies:
> | Dependencies of qt5-5.9.8p0 on qtwebkit-=5.9.0 don't match
> NOT MERGING: can't find update for qt5-5.9.8p0-> (ok)
> Couldn't find updates for qt5-5.9.8p0 qtwebkit-5.9.0p11
> Couldn't install qtwebkit-5.212.0
>
> Should we maybe bump all x11/qt5/qt* ports?
>
> This is a big jump to a Qt update because 5.212.0 works fine with
> my upcoming Qt update.
>
> Feedback, OK? (I don't think anyone wants to take responsibility for
> this. -- other comments also fine) Tests really welcome!

I definitely support this move forward :) Ppl using apps in the list
should definitely runtime test their favorite app.. and i think now is a
good time in the release cycle for such an update, and that would
unblock your QT5 work.

One think we should make sure to check is arch coverage, ie check which
archs provide a 'working' (building, running ?) qtwebkit and try to
testbuild this update on those...


Landry

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Stuart Henderson
On 2020/02/12 10:57, Landry Breuil wrote:
> One think we should make sure to check is arch coverage, ie check which
> archs provide a 'working' (building, running ?) qtwebkit and try to
> testbuild this update on those...

FWIW the list for the in-tree version is:

aarch64
amd64
i386
powerpc
sparc64

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Charlene Wendling
On Wed, 12 Feb 2020 13:26:30 +0000
Stuart Henderson wrote:

> On 2020/02/12 10:57, Landry Breuil wrote:
> > One think we should make sure to check is arch coverage, ie check
> > which archs provide a 'working' (building, running ?) qtwebkit and
> > try to testbuild this update on those...
>
> FWIW the list for the in-tree version is:
>
> aarch64
> amd64
> i386
powerpc build ok runtime ok, javascript broken
> sparc64
>

I needed 3 fixes to get it built on powerpc in
Source/JavaScriptCore/heap/MachineStackMarker.cpp:

- Fix a trailing '#' in our patch, this fixes the build with gcc
- It missed an ifdef for archs where JS JIT is disabled
- Work around the lack of ucontext on OpenBSD (powerpc specific, thanks
  to sthen for the tip)

I built otter-browser next, the runtime is good as long as javascript
is disabled. I'll try to investigate the issue, but i don't think i'll
be able to fix that. I can't cross test against another browser because
there is none other available in the tree.

In any case, it works better than its GTK counterpart on powerpc, i'm
fine seeing it committed despite the runtime issues as far as powerpc is
concerned.

Here is a diff with my changes in, i diffed it against Rafael's one, and
it seems i've not messed up.

Charlène.


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile,v
retrieving revision 1.60
diff -u -p -u -p -r1.60 Makefile
--- Makefile 25 Jan 2018 15:02:25 -0000 1.60
+++ Makefile 13 Feb 2020 13:31:10 -0000
@@ -31,7 +31,6 @@
      SUBDIR += qtvirtualkeyboard
      SUBDIR += qtwebchannel
      SUBDIR += qtwebkit
-     SUBDIR += qtwebkit-examples
      SUBDIR += qtwebsockets
      SUBDIR += qtx11extras
      SUBDIR += qtxmlpatterns
Index: Makefile.version
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile.version,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 Makefile.version
--- Makefile.version 5 Nov 2019 10:18:53 -0000 1.8
+++ Makefile.version 13 Feb 2020 13:31:10 -0000
@@ -3,7 +3,7 @@
 
 QT5_VERSION = 5.9.8
 QT5_DIST_VERSION = 5.9.8
-QT5_WEBKIT_VERSION = 5.9.0
+QT5_WEBKIT_VERSION = 5.212.0
 
 # This one is used for building dependencies for examples and documentation,
 # which obviously should be in sync with core packages.
Index: docs/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/docs/Makefile,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 Makefile
--- docs/Makefile 6 Nov 2019 17:12:15 -0000 1.9
+++ docs/Makefile 13 Feb 2020 13:31:10 -0000
@@ -6,6 +6,7 @@ COMMENT-qch = qdoc-compiled documentati
 PKGNAME = qt5-docs-${QT5_VERSION}
 PKGNAME-html = qt5-html-${QT5_VERSION}
 PKGNAME-qch = qt5-qch-${QT5_VERSION}
+WEBKIT_DOCS_VERSION = 5.9.0
 
 MULTI_PACKAGES = -html -qch
 SUBPACKAGE ?= -html
@@ -48,10 +49,10 @@ DOC_COMPONENTS = \
  qtx11extras \
  qtxmlpatterns
 
-MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
-MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
+MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
+MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
 DISTFILES = ${DOC_COMPONENTS:Nqtwebkit:C/$/-opensource-src-${QT5_DIST_VERSION}${EXTRACT_SUFX}/}:0
-DISTFILES += qtwebkit-opensource-src-${QT5_WEBKIT_VERSION}${EXTRACT_SUFX}:1
+DISTFILES += qtwebkit-opensource-src-${WEBKIT_DOCS_VERSION}${EXTRACT_SUFX}:1
 
 MODQT5_USE_CXX11 = No
 CONFIGURE_STYLE = none
Index: qtwebkit/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 Makefile
--- qtwebkit/Makefile 7 Jan 2020 20:22:08 -0000 1.17
+++ qtwebkit/Makefile 13 Feb 2020 13:31:10 -0000
@@ -1,29 +1,50 @@
 # $OpenBSD: Makefile,v 1.17 2020/01/07 20:22:08 zhuk Exp $
 
-QT5NAME = QtWebkit
-REVISION = 11
-COMMENT = old Webkit integration framework for Qt
+COMMENT = QtWebKit with a more modern WebKit code base
+
 USE_WXNEEDED = Yes
+
+CATEGORIES = www
+
 DPB_PROPERTIES = parallel
-VERSION = ${QT5_WEBKIT_VERSION}
-DIST_VERSION = ${QT5_WEBKIT_VERSION}
 
-SHARED_LIBS += Qt5WebKit 2.1
-SHARED_LIBS += Qt5WebKitWidgets 2.1
+VERSION = ${QT5_WEBKIT_VERSION}
+DISTNAME = qtwebkit-${QT5_WEBKIT_VERSION}-alpha3
+PKGNAME = qtwebkit-${QT5_WEBKIT_VERSION}
 
-CATEGORIES = www
+SHARED_LIBS +=  Qt5WebKit               3.0 # 5.9
+SHARED_LIBS +=  Qt5WebKitWidgets        3.0 # 5.9
+SHARED_LIBS +=  JavaScriptCore          0.0 # 5.212.9
+SHARED_LIBS +=  WebCore                 0.0 # 5.212.9
+SHARED_LIBS +=  WebKit2                 0.0 # 5.212.9
+SHARED_LIBS +=  WTF                     0.0 # 5.212.9
+
+# Mostly LGPLv2.1 or LGPLv3 for code; FDLv1.3 for documentation.
+# Some third-party parts are BSD-licensed.
+# Also, many parts have are dual-licensed having either commercial, GPL,
+# Apache 2.0 or other type of license as an alternative option.
+# A few components, including QtWebEngine, are LGPLv3 only, no LGPLv2.1.
+PERMIT_PACKAGE = Yes
+
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5Positioning
+WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5WebChannel
+WANTLIB += Qt5Widgets X11 Xcomposite Xrender c gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstfft-1.0
+WANTLIB += gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 gstvideo-1.0
+WANTLIB += hyphen icui18n icuuc jpeg m png sqlite3 webp xml2 xslt
+
+MASTER_SITES = https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+MODULES = devel/cmake \
+ lang/ruby \
+ x11/qt5
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5OpenGL
-WANTLIB += Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors
-WANTLIB += Qt5Sql Qt5WebChannel Qt5Widgets X11 Xext Xrender c
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0
-WANTLIB += gstbase-1.0 gstpbutils-1.0 gstreamer-1.0 gstvideo-1.0
-WANTLIB += icudata icui18n icuuc intl jpeg m png sqlite3 webp
-WANTLIB += xml2 xslt z
+# Override to unbreak ninja build
+CONFIGURE_STYLE = cmake
 
-MASTER_SITES = https://download.qt.io/community_releases/${DIST_VERSION:R}/${DIST_VERSION}-final/
+# Remove default "first" target and build all
+ALL_TARGET =
 
-MODULES = perl lang/python lang/ruby
 MODPY_RUNDEP = No
 MODRUBY_RUNDEP = No
 
@@ -43,75 +64,72 @@ LIB_DEPENDS = databases/sqlite3 \
  multimedia/gstreamer1/plugins-base \
  textproc/icu4c \
  textproc/libxslt \
+ graphics/libwebp \
+ textproc/hyphen \
  x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtlocation>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtsensors>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtwebchannel>=${QT5_VERSION},<${QT5_NEXT_VERSION}
 
-MAKE_ENV = NINJA_PATH="${LOCALBASE}/bin/ninja" \
- PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-MAKE_FLAGS = PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-FLAVORS = debug
-PSEUDO_FLAVORS = no_tests
-
-#MODQMAKE_ARGS = WEBKIT_CONFIG+=web_audio
+CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
+ -DENABLE_API_TESTS=OFF \
+ -DENABLE_QT_WEBCHANNEL=ON \
+ -DENABLE_TOOLS=OFF \
+ -DPORT=Qt \
+ -DSHARED_CORE=ON \
+ -DUSE_GSTREAMER=ON \
+ -DUSE_LD_GOLD=OFF \
+ -DUSE_QT_MULTIMEDIA=OFF \
+ -DUSE_SYSTEM_MALLOC=ON \
+ -DUSE_WOFF2=OFF
+
+CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX="${WRKINST}${TRUEPREFIX}" \
+ -DECM_MKSPECS_INSTALL_DIR=${WRKINST}${MODQT_LIBDIR}/mkspecs/modules \
+ -DKDE_INSTALL_INCLUDEDIR=${WRKINST}${MODQT_INCDIR} \
+ -DKDE_INSTALL_LIBEXECDIR=${WRKINST}${MODQT_LIBDIR}/libexec \
+ -DKDE_INSTALL_SHAREDSTATEDIR=/var \
+ -DKDE_INSTALL_SYSCONFDIR=/etc \
+ -DKDE_INSTALL_MANDIR=${WRKINST}/man \
+ -DKDE_INSTALL_QTPLUGINDIR=${WRKINST}${MODQT_LIBDIR}/plugins \
+ -DKDE_INSTALL_LIBDIR=${WRKINST}${MODQT_LIBDIR} \
+ -DKDE_INSTALL_QMLDIR=${WRKINST}${MODQT_LIBDIR}/qml
 
 # See qtbase/tests/README for details
 TEST_IS_INTERACTIVE = X11
 TEST_DEPENDS = ${MODPY_RUN_DEPENDS} \
  ${MODRUBY_RUN_DEPENDS} \
- audio/sox \
- kde4-minimal-*|kdebase-*:meta/kde4,-minimal
+ audio/sox
 
-pre-configure:
- # Python and Ruby are used for building mainly, those paths
- # do not get into final packages.
- ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
- ln -sf ${RUBY} ${WRKDIR}/bin/ruby
-
- cd ${WRKSRC}; ${MODPY_BIN_ADJ} \
- `find . -name '*.py'` \
- `egrep -Rl '(env |bin/)python' Tools` \
- Source/WebCore/inspector/generate-inspector-protocol-version \
- Source/WebCore/html/parser/create-html-entity-table
-
- cd ${WRKSRC}; ${MODRUBY_RUBY_ADJ} \
- `find . -name '*.rb'` \
- Tools/Scripts/check-for-webkit-framework-include-consistency \
- Tools/Scripts/display-profiler-output \
- Tools/Scripts/check-for-inappropriate-macros-in-external-headers \
- Tools/Scripts/roll-over-ChangeLogs \
- Tools/Scripts/check-for-inappropriate-files-in-framework \
- Tools/Scripts/test-webkitruby \
- Tools/Scripts/clean-header-guards \
- Tools/Scripts/bencher \
- Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator \
- Source/WebCore/make-export-file-generator \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
-
- cd ${WRKSRC}; perl -pi.otheradj \
- -e 's,/usr/bin/(env )?python\b,${MODPY_BIN},g;' \
- -e 's,/usr/bin/(env )?ruby\b,${RUBY},g;' \
- -e 's,(/usr)?/bin/(env )?bash\b,/bin/ksh,g;' \
- Tools/BuildSlaveSupport/gtk/pulseaudio/run \
- Tools/Scripts/old-run-webkit-tests \
- Tools/Scripts/run-webkit-websocketserver \
- Tools/Scripts/webkitpy/common/system/executive_unittest.py
-
- cd ${WRKSRC}; perl -pi.symname \
- -e 's/^__/_/;' \
- qtwebkit/Source/JavaScriptCore/JavaScriptCore.order
-
- cd ${WRKSRC}/Tools/qmake/config.tests; perl -pi.objdir \
- -e 's/^OBJECTS_DIR/#$$&/;' \
- */*.pro
+.include <bsd.port.arch.mk>
+
+# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
+.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
+    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
+    ${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el" && \
+    ${MACHINE_ARCH} != "sh"
+# #error "The MacroAssembler is not supported on this platform."
+CONFIGURE_ARGS += -DENABLE_JIT=OFF
+CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
+.endif
+
+# ld.lld does not have this option
+# save memory on 32bit arches
+.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
+LDFLAGS += -Wl,--no-keep-memory
+.endif
+
+# __sync_add_and_fetch_8
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS += -march=i686
+CXXFLAGS += -march=i686
+.endif
 
 .include <bsd.port.mk>
 .if ${CHOSEN_COMPILER} == "base-clang"
 CXXFLAGS += -fno-ret-protector
 .endif
+
+post-install:
+ find ${WRKINST} -type f -print0 | xargs -0r perl -pi \
+ -e 's,${WRKINST},,g;'
Index: qtwebkit/distinfo
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- qtwebkit/distinfo 17 Jul 2017 08:34:39 -0000 1.2
+++ qtwebkit/distinfo 13 Feb 2020 13:31:10 -0000
@@ -1,2 +1,2 @@
-SHA256 (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = ja0ZO3QAVamYMS4EoEDy4yqSPAgjstI5sk6rCCdqTgQ=
-SIZE (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = 35301288
+SHA256 (qt/qtwebkit-5.212.0-alpha3.tar.xz) = NX7uWCRFV0Ry5BDr7OYy0G+g7JQ1j8Q0XypxOSLfXhc=
+SIZE (qt/qtwebkit-5.212.0-alpha3.tar.xz) = 12457896
Index: qtwebkit/patches/patch-CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-CMakeLists_txt
diff -N qtwebkit/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-CMakeLists_txt 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64
+     set(WTF_CPU_X86_64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+     set(WTF_CPU_X86 1)
+-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+     set(WTF_CPU_PPC 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+     set(WTF_CPU_PPC64 1)
+@@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390
+     set(WTF_CPU_S390 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+     set(WTF_CPU_S390X 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
++ set(WTF_CPU_SPARC64 1)
+ else ()
+     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
+ endif ()
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_API_JSStringRef_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/JavaScriptCore/API/JSStringRef.cpp
---- Source/JavaScriptCore/API/JSStringRef.cpp.orig
-+++ 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(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
- }
-
- JSStringRef JSStringCreateWithUTF8CString(const char* string)
-@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char*
- JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
- {
-     initializeThreading();
--    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
-+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
- }
-
- JSStringRef JSStringRetain(JSStringRef string)
-@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
-
- const JSChar* JSStringGetCharactersPtr(JSStringRef string)
- {
--    return string->characters();
-+    return reinterpret_cast<const JSChar*>(string->characters());
- }
-
- size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/API/ObjCCallbackFunction.h
+--- Source/JavaScriptCore/API/ObjCCallbackFunction.h.orig
++++ Source/JavaScriptCore/API/ObjCCallbackFunction.h
+@@ -29,7 +29,7 @@
+
+ #if JSC_OBJC_API_ENABLED
+
+-#import <JavaScriptCore/JSCallbackFunction.h>
++#import <JavaScriptCore/API/JSCallbackFunction.h>
+
+ #if defined(__OBJC__)
+ JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.2 2017/09/15 07:43:42 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2666,6 +2666,8 @@ class ARM64Assembler { (public)
+     {
+ #if OS(IOS)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(LINUX)
+         size_t page = pageSize();
+         uintptr_t current = reinterpret_cast<uintptr_t>(code);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.3 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARMAssembler.h
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -1128,6 +1128,8 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+
+             linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.4 2018/03/19 08:13:15 ajacoutot Exp $
+
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -36,6 +36,12 @@
+ #include <intrin.h>
+ #endif
+
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+
+ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler, MacroAssemblerX86Common> {
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 13 Feb 2020 13:31:10 -0000
@@ -1,16 +1,14 @@
-$OpenBSD: patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig Fri Dec 26 13:45:46 2014
-+++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp Fri Dec 26 13:48:04 2014
-@@ -152,8 +152,9 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
-         amountOfNodeWhiteSpace = 0;
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+--- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig
++++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+@@ -159,7 +159,7 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
      else
          amountOfNodeWhiteSpace = Graph::amountOfNodeWhiteSpace(context);
--    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixLength + amountOfNodeWhiteSpace + 1]);
+     auto prefixBuffer = std::make_unique<char[]>(prefixLength + amountOfNodeWhiteSpace + 1);
 -    strcpy(prefixBuffer.get(), prefix);
-+    size_t prefixBufferSize = prefixLength + amountOfNodeWhiteSpace + 1;
-+    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixBufferSize]);
-+    memcpy(prefixBuffer.get(), prefix, prefixBufferSize);
++    memcpy(prefixBuffer.get(), prefix, prefixLength);
      for (int i = 0; i < amountOfNodeWhiteSpace; ++i)
          prefixBuffer[i + prefixLength] = ' ';
      prefixBuffer[prefixLength + amountOfNodeWhiteSpace] = 0;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 13 Feb 2020 13:31:10 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak build.
-Synchronized with WebKit upsteam.
---- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Thu Sep 11 14:48:22 2014
-+++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Wed Jan  7 01:01:51 2015
-@@ -45,6 +45,10 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.cpp
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -49,6 +49,10 @@
 
  #elif OS(UNIX)
 
@@ -14,45 +14,132 @@ Synchronized with WebKit upsteam.
  #include <sys/mman.h>
  #include <unistd.h>
 
-@@ -311,6 +315,8 @@ typedef arm_thread_state_t PlatformThreadRegisters;
- typedef CONTEXT PlatformThreadRegisters;
- #elif OS(QNX)
- typedef struct _debug_thread_info PlatformThreadRegisters;
-+#elif OS(OPENBSD)
-+typedef pthread_t PlatformThreadRegisters;
- #elif USE(PTHREADS)
- typedef pthread_attr_t PlatformThreadRegisters;
- #else
-@@ -369,6 +375,8 @@ static size_t getPlatformThreadRegisters(const Platfor
+@@ -86,11 +90,13 @@ static void pthreadSignalHandlerSuspendResume(int, sig
      }
-     close(fd);
-     return sizeof(struct _debug_thread_info);
+
+     ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
+-#if CPU(PPC)
++
++// XXX we don't have ucontext || fix an error on powerpc
++#if CPU(PPC) && !OS(OPENBSD)
+     thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+ #else
+-    thread->suspendedMachineContext = userContext->uc_mcontext;
+-#endif
++    thread->suspendedMachineContext = *userContext;
++#endif
+
+     // Allow suspend caller to see that this thread is suspended.
+     // sem_post is async-signal-safe function. It means that we can call this from a signal handler.
+@@ -566,6 +572,25 @@ void* MachineThreads::Thread::Registers::stackPointer(
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD) && ENABLE(JIT)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_edx);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[5]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsi);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__) && ENABLE(JIT)
+
+ #if CPU(X86)
+@@ -632,6 +657,7 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++
+ #endif // __DARWIN_UNIX03
+
+ // end OS(DARWIN)
+@@ -665,6 +691,25 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
 +#elif OS(OPENBSD)
-+    regs = platformThread;
- #elif USE(PTHREADS)
-     pthread_attr_init(&regs);
- #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
-@@ -437,7 +445,14 @@ static inline void* otherThreadStackPointer(const Plat
- #elif USE(PTHREADS)
-     void* stackBase = 0;
-     size_t stackSize = 0;
-+#if OS(OPENBSD)
-+    stack_t ss;
-+    int rc = pthread_stackseg_np(regs, &ss);
-+    stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
-+    stackSize = ss.ss_size;
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_esp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[29]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsp);
 +#else
-     int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#error Unknown Architecture
 +#endif
-     (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
-     ASSERT(stackBase);
-     return static_cast<char*>(stackBase) + stackSize;
-@@ -448,7 +463,7 @@ static inline void* otherThreadStackPointer(const Plat
-
- static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
- {
--#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
-+#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX) && !OS(OPENBSD)
-     pthread_attr_destroy(&regs);
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -747,6 +792,25 @@ void* MachineThreads::Thread::Registers::instructionPo
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_ebp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rbp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[30]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rbp);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -837,6 +901,25 @@ void* MachineThreads::Thread::Registers::llintPC() con
  #else
-     UNUSED_PARAM(regs);
+ #error Unknown Architecture
+ #endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_eip);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rip);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_pc);                                                                                                                  
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rip);
++#else
++#error Unknown Architecture
++#endif
++
+
+ #elif defined(__GLIBC__)
+
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.h
+--- Source/JavaScriptCore/heap/MachineStackMarker.h.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.h
+@@ -41,7 +41,10 @@
+ #if OS(FREEBSD)
+ #include <ucontext.h>
+ #endif
++#if OS(OPENBSD)
++typedef ucontext_t mcontext_t;
+ #endif
++#endif
+
+ #if OS(DARWIN)
+ typedef mach_port_t PlatformThread;
+@@ -51,6 +54,7 @@ typedef DWORD PlatformThread;
+ typedef pthread_t PlatformThread;
+ #endif // OS(DARWIN)
+
++
+ namespace JSC {
+
+ class CodeBlockSet;
+@@ -114,7 +118,6 @@ class MachineThreads { (public)
+ #else
+ #error Need a thread register struct for this platform
+ #endif
+-            
+             PlatformRegisters regs;
+         };
+        
Index: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,11 @@
+$OpenBSD: patch-Source_JavaScriptCore_javascriptcoregtk_pc_in,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig Tue Aug  9 01:03:49 2016
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in Tue Aug  9 01:03:57 2016
+@@ -7,5 +7,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
--- qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 13 Feb 2020 13:31:10 -0000
@@ -1,13 +1,13 @@
-$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Taken from www/webkitgtk4 port, see also:
-https://bugs.webkit.org/show_bug.cgi?id=61137
---- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Tue Feb 17 07:57:12 2015
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.h Wed Apr  8 00:38:31 2015
-@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
- #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
- #if CPU(ARM) || CPU(MIPS)
+$OpenBSD$
+
+Index: Source/JavaScriptCore/jit/ExecutableAllocator.h
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -80,7 +80,8 @@ static const size_t fixedExecutableMemoryPoolSize = FI
  static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
--#elif CPU(X86_64) && !CPU(X32)
+ #elif CPU(ARM64)
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
+-#elif CPU(X86_64)
 +#elif CPU(X86_64) && !CPU(X32) && !OS(OPENBSD)
 +// default limits on OpenBSD are far less than 1GB
  static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
--- qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_jsc_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Enable W^X in QtWebkit's JIT.
-Index: Source/JavaScriptCore/jsc.pro
---- Source/JavaScriptCore/jsc.pro.orig
-+++ Source/JavaScriptCore/jsc.pro
-@@ -30,4 +30,5 @@ wince* {
- # Prevent warnings about difference in visibility on Mac OS X
- qtConfig(reduce_exports):CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations):CONFIG += bsymbolic_functions
-+openbsd:DEFINES *= ASSEMBLER_WX_EXCLUSIVE=1
-
Index: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
diff -N qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
--- qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp.orig Fri Dec 26 13:50:19 2014
-+++ Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp Fri Dec 26 13:53:09 2014
-@@ -107,17 +107,13 @@ void InfoLog::append(const char *format, ...)
-     if (!mInfoLog)
-     {
-         mInfoLog = new char[infoLength + 2];
--        strcpy(mInfoLog, info);
--        strcpy(mInfoLog + infoLength, "\n");
-+        snprintf(mInfoLog, infoLength + 2, "%s\n", info);
-     }
-     else
-     {
-         size_t logLength = strlen(mInfoLog);
-         char *newLog = new char[logLength + infoLength + 2];
--        strcpy(newLog, mInfoLog);
--        strcpy(newLog + logLength, info);
--        strcpy(newLog + logLength + infoLength, "\n");
--
-+        snprintf(mInfoLog, logLength + infoLength + 2, "%s%s\n", mInfoLog, info);
-         delete[] mInfoLog;
-         mInfoLog = newLog;
-     }
Index: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
diff -N qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -188,6 +188,7 @@
+ #include <iostream>  // NOLINT
+ #include <sstream>  // NOLINT
+ #include <string>  // NOLINT
++#include <unistd.h>
+
+ #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
+ #define GTEST_FLAG_PREFIX_ "gtest_"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
diff -N qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/Assertions.cpp
+--- Source/WTF/wtf/Assertions.cpp.orig
++++ Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || OS(OPENBSD) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* fil
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) || (OS(OPENBSD)) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -259,7 +259,7 @@ void WTFReportBacktrace()
+     WTFPrintBacktrace(samples + framesToSkip, frames - framesToSkip);
+ }
+
+-#if OS(DARWIN) || OS(LINUX)
++#if OS(DARWIN) || OS(LINUX) || OS(OPENBSD)
+ #  if PLATFORM(QT) || PLATFORM(GTK)
+ #    if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #      define USE_BACKTRACE_SYMBOLS 1
Index: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ 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(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Platform_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WTF_wtf_Platform_h,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-Source_WTF_wtf_Platform_h
--- qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 13 Feb 2020 13:31:10 -0000
@@ -1,15 +1,21 @@
-$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Use system malloc(3).
---- Source/WTF/wtf/Platform.h.orig Tue Feb 17 07:57:01 2015
-+++ Source/WTF/wtf/Platform.h Wed Apr  8 00:38:31 2015
-@@ -724,6 +724,10 @@
- #endif
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.12 2018/03/19 08:13:15 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -155,6 +155,13 @@
+ #define WTF_CPU_BIG_ENDIAN 1
  #endif
 
-+#if PLATFORM(OPENBSD)
-+#define USE_SYSTEM_MALLOC 1
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
 +#endif
 +
- #if PLATFORM(EFL)
- #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
- #endif
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
Index: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
--- qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_RandomNumberSeed_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Source/WTF/wtf/RandomNumberSeed.h.orig Fri Dec 19 23:00:04 2014
-+++ Source/WTF/wtf/RandomNumberSeed.h Fri Dec 19 23:01:03 2014
-@@ -55,6 +55,8 @@ inline void initializeRandomNumberGenerator()
-     timeval time;
-     gettimeofday(&time, 0);
-     srandom(static_cast<unsigned>(time.tv_usec * getpid()));
-+#elif OS(OPENBSD)
-+    // On OpenBSD we use arc4random() which initialises itself
- #else
-     srand(static_cast<unsigned>(time(0)));
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
--- qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_TypeTraits_h,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WTF/wtf/TypeTraits.h
---- Source/WTF/wtf/TypeTraits.h.orig
-+++ Source/WTF/wtf/TypeTraits.h
-@@ -72,6 +72,9 @@ namespace WTF {
-     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
-     template<> struct IsInteger<long long>          { static const bool value = true; };
-     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
-+#endif
- #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)  || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
Index: qtwebkit/patches/patch-Source_WebCore_Target_pri
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_Target_pri
diff -N qtwebkit/patches/patch-Source_WebCore_Target_pri
--- qtwebkit/patches/patch-Source_WebCore_Target_pri 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WebCore_Target_pri,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebCore/Target.pri.orig Tue Feb 17 07:57:09 2015
-+++ Source/WebCore/Target.pri Wed Apr  8 00:38:31 2015
-@@ -4280,6 +4280,12 @@ win32:!mingw:contains(QMAKE_HOST.arch, x86_64):{
-    }
- }
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include/libsoup-2.4
-+    INCLUDEPATH += $(LOCALBASE)/include/harfbuzz
-+    INCLUDEPATH += $(X11BASE)/include/freetype2
-+}
-+
- contains(CONFIG, opengl-shims) {
-     HEADERS += platform/graphics/OpenGLShims.h
-     SOURCES += platform/graphics/OpenGLShims.cpp
Index: qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-Source_WebCore_dom_Document_cpp
--- qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 13 Feb 2020 13:31:10 -0000
@@ -5,7 +5,7 @@ Fix build with icu4c >=65
 Index: Source/WebCore/dom/Document.cpp
 --- Source/WebCore/dom/Document.cpp.orig
 +++ Source/WebCore/dom/Document.cpp
-@@ -3846,12 +3846,12 @@ static bool isValidNameNonASCII(const UChar* character
+@@ -4407,12 +4407,12 @@ static bool isValidNameNonASCII(const UChar* character
      unsigned i = 0;
 
      UChar32 c;
@@ -20,12 +20,12 @@ Index: Source/WebCore/dom/Document.cpp
          if (!isValidNamePart(c))
              return false;
      }
-@@ -3914,7 +3914,7 @@ bool Document::parseQualifiedName(const String& qualif
-     const UChar* s = qualifiedName.characters();
+@@ -4474,7 +4474,7 @@ bool Document::parseQualifiedName(const String& qualif
+
      for (unsigned i = 0; i < length;) {
          UChar32 c;
--        U16_NEXT(s, i, length, c)
-+        U16_NEXT(s, i, length, c);
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
          if (c == ':') {
              if (sawColon) {
                  ec = NAMESPACE_ERR;
Index: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -31,7 +31,7 @@
+ #include <wtf/NeverDestroyed.h>
+ #include <wtf/text/WTFString.h>
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
--- qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/graphics/SegmentedFontData.cpp
---- Source/WebCore/platform/graphics/SegmentedFontData.cpp.orig
-+++ Source/WebCore/platform/graphics/SegmentedFontData.cpp
-@@ -61,7 +61,7 @@ bool SegmentedFontData::containsCharacters(const UChar
- {
-     UChar32 c;
-     for (int i = 0; i < length; ) {
--        U16_NEXT(characters, i, length, c)
-+        U16_NEXT(characters, i, length, c);
-         if (!containsCharacter(c))
-             return false;
-     }
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+@@ -33,7 +33,7 @@ struct GraphicsSurfaceToken {
+
+ #if OS(DARWIN)
+     typedef mach_port_t BufferHandle;
+-#elif OS(LINUX)
++#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+     typedef uint32_t BufferHandle;
+ #elif OS(WINDOWS)
+     typedef HANDLE BufferHandle;
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+@@ -34,7 +34,7 @@ typedef struct __IOSurface* IOSurfaceRef;
+ typedef IOSurfaceRef PlatformGraphicsSurface;
+ #endif
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ typedef uint32_t PlatformGraphicsSurface;
+ #endif
+
Index: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
diff -N qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
--- qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
---- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.orig
-+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
-@@ -175,7 +175,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UC
-     int32_t i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(buffer, i, length, c)
-+        U16_NEXT(buffer, i, length, c);
-         UErrorCode error = U_ZERO_ERROR;
-         UScriptCode script = uscript_getScript(c, &error);
-         if (error != U_ZERO_ERROR) {
-@@ -746,7 +746,7 @@ static CFStringRef createStringWithEscapedUnsafeCharac
-     CFIndex i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(sourceBuffer, i, length, c)
-+        U16_NEXT(sourceBuffer, i, length, c);
-        
-         if (isLookalikeCharacter(c)) {
-             uint8_t utf8Buffer[4];
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginPackageQt.cpp.orig Tue Oct 13 07:37:21 2015
-+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp Thu Dec 10 09:05:23 2015
-@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0)
-         }
-     }
-
--    QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgtk-x11-2.0"));
-     if (library.load()) {
-         typedef void *(*gtk_init_check_ptr)(int*, char***);
-         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginViewQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginViewQt.cpp.orig Fri Dec 26 02:28:55 2014
-+++ Source/WebCore/plugins/qt/PluginViewQt.cpp Fri Dec 26 02:29:10 2014
-@@ -697,7 +697,7 @@ static Display *getPluginDisplay()
-     // support gdk based plugins (like flash) that use a different X connection.
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
--- qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp.orig Fri Dec 26 02:29:24 2014
-+++ Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp Fri Dec 26 02:29:35 2014
-@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMess
-
- static bool initializeGtk()
- {
--    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"));
-     if (!gtkLibrary.load())
-         return false;
-     typedef void* (*gtk_init_ptr)(void*, void*);
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
--- qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_Shared_API_c_WKString_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WebKit2/Shared/API/c/WKString.cpp
---- Source/WebKit2/Shared/API/c/WKString.cpp.orig
-+++ Source/WebKit2/Shared/API/c/WKString.cpp
-@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
- size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
- {
-     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
--    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
-+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
- }
-
- size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+--- Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp.orig
++++ Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+@@ -68,6 +68,7 @@ Vector<String> pluginsDirectories()
+     result.append("/usr/lib64/mozilla/plugins");
+     result.append("/usr/lib/nsbrowser/plugins");
+     result.append("/usr/lib64/nsbrowser/plugins");
++    result.append("${LOCALBASE}/lib/mozilla/plugins");
+ #endif
+
+     return result;
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.orig Fri Dec 26 02:30:14 2014
-+++ Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp Fri Dec 26 02:30:24 2014
-@@ -64,7 +64,7 @@ static Display* getPluginDisplay()
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_pro,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebKit2/WebProcess.pro.orig Thu Sep 11 14:48:23 2014
-+++ Source/WebKit2/WebProcess.pro Mon Nov 10 20:49:42 2014
-@@ -15,6 +15,10 @@ INCLUDEPATH = \
-     $$PWD/Shared/linux/SandboxProcess/ \
-     $$INCLUDEPATH
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include
-+}
-+
- QT += network webkit
- macx: QT += xml
-
Index: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
diff -N qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+--- Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp.orig
++++ Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+@@ -964,6 +964,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& si
+     if (view->needsLayout())
+         view->layout();
+     view->adjustViewSize();
++
++    if (view->needsLayout())
++        view->layout();
+ }
+
+
Index: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
diff -N qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake 13 Feb 2020 13:31:10 -0000
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_cmake_OptionsCommon_cmake,v 1.12 2017/09/15 07:43:42 ajacoutot Exp $
+
+Our ar(1) is too old and have not support for `T'.
+
+Undefined references to libc functions.
+
+Index: Source/cmake/OptionsCommon.cmake
+--- Source/cmake/OptionsCommon.cmake.orig
++++ Source/cmake/OptionsCommon.cmake
+@@ -19,10 +19,10 @@ option(USE_THIN_ARCHIVES "Produce all static libraries
+ 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 ()
+
+@@ -174,9 +174,9 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
++#    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
++#endif ()
+
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
Index: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
diff -N qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
--- qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_DumpRenderTree_JavaScriptThreading_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/DumpRenderTree/JavaScriptThreading.cpp.orig Fri Dec 19 23:01:59 2014
-+++ Tools/DumpRenderTree/JavaScriptThreading.cpp Fri Dec 19 23:02:47 2014
-@@ -101,7 +101,7 @@ void runJavaScriptThread(void*)
-         }
-
-         // Respawn probabilistically.
--        if (rand() % 5)
-+        if (arc4random_uniform(5))
-             continue;
-
-         MutexLocker locker(javaScriptThreadsMutex());
Index: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_mangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/mangle.cgi.c.orig Fri Dec 26 02:50:45 2014
-+++ Tools/mangleme/mangle.cgi.c Fri Dec 26 02:51:04 2014
-@@ -18,7 +18,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_remangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/remangle.cgi.c.orig Fri Dec 26 02:49:32 2014
-+++ Tools/mangleme/remangle.cgi.c Fri Dec 26 02:50:11 2014
-@@ -17,7 +17,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/gccdepends/gccdepends.pro
---- Tools/qmake/config.tests/gccdepends/gccdepends.pro.orig
-+++ Tools/qmake/config.tests/gccdepends/gccdepends.pro
-@@ -1,27 +1,22 @@
- TEMPLATE = aux
--OBJECTS_DIR = obj
-+#OBJECTS_DIR = obj
- QMAKE_CXXFLAGS += -MD
-
- base_filename = empty
--object_file = $$OBJECTS_DIR/$${base_filename}.o
-+object_file = $${base_filename}.o
- deps_filename = $${base_filename}.d
-
- SOURCES += $${base_filename}.cpp
-
- test.commands = \
--    # Earlier teambuilder and icecream versions would not
--    # respect the -o argument for the .d file, so the file
--    # would end up in the root build dir.
--    test ! -f $${deps_filename} && \
--    \
-     # But it should end up in the OBJECTS_DIR
--    test -f $$OBJECTS_DIR/$${deps_filename} && \
-+    test -f $${deps_filename} && \
-     \
-     # Icecream 0.9.7 and earlier does not ensure that the
-     # target rule matches the path of the .o file, since
-     # the file is compiled into the current dir and then
-     # moved. Verify that we don't hit that case.
--    grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
-+    grep -q \"$${object_file}:\" $${deps_filename} && \
-     \
-     # If everything is all right we mark the test as succeeded
-     echo success > $$basename(PWD)
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_glx_glx_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/glx/glx.pro
---- Tools/qmake/config.tests/glx/glx.pro.orig
-+++ Tools/qmake/config.tests/glx/glx.pro
-@@ -1,4 +1,4 @@
-+CONFIG += opengl x11
- SOURCES = glx.cpp
--OBJECTS_DIR = obj
--LIBS += -lX11 -lGL
-+#OBJECTS_DIR = obj
-
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
---- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig
-+++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXcomposite.cpp
--OBJECTS_DIR = obj
--LIBS += -lXcomposite -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXcomposite ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXrender_libXrender_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXrender/libXrender.pro
---- Tools/qmake/config.tests/libXrender/libXrender.pro.orig
-+++ Tools/qmake/config.tests/libXrender/libXrender.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXrender.cpp
--OBJECTS_DIR = obj
--LIBS += -lXrender -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXrender ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
diff -N qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
--- qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak linking to static libraries by providing exact paths when possible.
-
-Particular problem: system version of leveldb gets picked up due to madness in -L.
---- Tools/qmake/mkspecs/features/functions.prf.orig Mon May 30 14:52:29 2016
-+++ Tools/qmake/mkspecs/features/functions.prf Sat Jul 30 00:00:45 2016
-@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
-         mac {
-             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
-         } else:win32-msvc*|wince*|win32-icc {
-+            LIBS += -L$$path
-             LIBS += -l$$target
-             QMAKE_LFLAGS += /OPT:REF
-         } else {
-             CONFIG *= no_smart_library_merge
--            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
-+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
-         }
--
--        LIBS += -L$$path
-
-         win32-msvc*|wince*|win32-icc {
-             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
Index: qtwebkit/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 PLIST
--- qtwebkit/pkg/PLIST 7 Jan 2020 20:22:08 -0000 1.2
+++ qtwebkit/pkg/PLIST 13 Feb 2020 13:31:10 -0000
@@ -1,11 +1,10 @@
-@comment $OpenBSD: PLIST,v 1.2 2020/01/07 20:22:08 zhuk Exp $
+@comment $OpenBSD: PLIST,v 1.1 2017/07/29 00:07:15 zhuk Exp $
 @conflict qt5-<5.6
 @pkgpath x11/qt5/qtwebkit,-main
 include/X11/qt5/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/bytearraytestdata.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qhttpheader_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkreply_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkrequest_p.h
@@ -14,8 +13,6 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebpage_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qtwebsecurityorigin_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebchannelwebkittransport_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebdatabase_p.h
@@ -33,14 +30,12 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebplugindatabase_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebsecurityorigin_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/testwindow.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/util.h
 include/X11/qt5/QtWebKit/QWebDatabase
 include/X11/qt5/QtWebKit/QWebElement
 include/X11/qt5/QtWebKit/QWebElementCollection
+include/X11/qt5/QtWebKit/QWebFullScreenRequest
 include/X11/qt5/QtWebKit/QWebFullScreenVideoHandler
 include/X11/qt5/QtWebKit/QWebHapticFeedbackPlayer
 include/X11/qt5/QtWebKit/QWebHistory
@@ -62,6 +57,7 @@ include/X11/qt5/QtWebKit/QtWebKitVersion
 include/X11/qt5/QtWebKit/qtwebkitversion.h
 include/X11/qt5/QtWebKit/qwebdatabase.h
 include/X11/qt5/QtWebKit/qwebelement.h
+include/X11/qt5/QtWebKit/qwebfullscreenrequest.h
 include/X11/qt5/QtWebKit/qwebhistory.h
 include/X11/qt5/QtWebKit/qwebhistoryinterface.h
 include/X11/qt5/QtWebKit/qwebkitglobal.h
@@ -92,25 +88,36 @@ include/X11/qt5/QtWebKitWidgets/qwebfram
 include/X11/qt5/QtWebKitWidgets/qwebinspector.h
 include/X11/qt5/QtWebKitWidgets/qwebpage.h
 include/X11/qt5/QtWebKitWidgets/qwebview.h
+@lib lib/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
 @lib lib/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/libWTF.so.${LIBWTF_VERSION}
+@lib lib/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 lib/qt5/cmake/Qt5WebKit/
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfigVersion.cmake
+lib/qt5/cmake/Qt5WebKit/WebKitTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
-lib/qt5/libQt5WebKit.la
-lib/qt5/libQt5WebKit.prl
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
+@static-lib lib/qt5/libANGLESupport.a
+@lib lib/qt5/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/qt5/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
-lib/qt5/libQt5WebKitWidgets.la
-lib/qt5/libQt5WebKitWidgets.prl
 @lib lib/qt5/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/qt5/libWTF.so.${LIBWTF_VERSION}
+@lib lib/qt5/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/qt5/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/qt5/libexec/
+@bin lib/qt5/libexec/QtWebNetworkProcess
 @bin lib/qt5/libexec/QtWebPluginProcess
 @bin lib/qt5/libexec/QtWebProcess
+@bin lib/qt5/libexec/QtWebStorageProcess
 lib/qt5/mkspecs/modules/qt_lib_webkit.pri
 lib/qt5/mkspecs/modules/qt_lib_webkit_private.pri
 lib/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri


Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Jeremie Courreges-Anglas-2
On Thu, Feb 13 2020, Charlene Wendling <[hidden email]> wrote:

> On Wed, 12 Feb 2020 13:26:30 +0000
> Stuart Henderson wrote:
>
>> On 2020/02/12 10:57, Landry Breuil wrote:
>> > One think we should make sure to check is arch coverage, ie check
>> > which archs provide a 'working' (building, running ?) qtwebkit and
>> > try to testbuild this update on those...
>>
>> FWIW the list for the in-tree version is:
>>
>> aarch64
>> amd64
>> i386
> powerpc build ok runtime ok, javascript broken
>> sparc64
>>
>
> I needed 3 fixes to get it built on powerpc in
> Source/JavaScriptCore/heap/MachineStackMarker.cpp:
>
> - Fix a trailing '#' in our patch, this fixes the build with gcc
> - It missed an ifdef for archs where JS JIT is disabled
> - Work around the lack of ucontext on OpenBSD (powerpc specific, thanks
>   to sthen for the tip)
>
> I built otter-browser next, the runtime is good as long as javascript
> is disabled. I'll try to investigate the issue, but i don't think i'll
> be able to fix that. I can't cross test against another browser because
> there is none other available in the tree.
>
> In any case, it works better than its GTK counterpart on powerpc, i'm
> fine seeing it committed despite the runtime issues as far as powerpc is
> concerned.
>
> Here is a diff with my changes in, i diffed it against Rafael's one, and
> it seems i've not messed up.

Two problems hit so far on sparc64, one within a cmake file (unknown
CPU), the other in a .h where we should define JSVALUE64 for this
architecture.  Build ongoing.


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile 25 Jan 2018 15:02:25 -0000 1.60
+++ Makefile 13 Feb 2020 16:38:03 -0000
@@ -31,7 +31,6 @@
      SUBDIR += qtvirtualkeyboard
      SUBDIR += qtwebchannel
      SUBDIR += qtwebkit
-     SUBDIR += qtwebkit-examples
      SUBDIR += qtwebsockets
      SUBDIR += qtx11extras
      SUBDIR += qtxmlpatterns
Index: Makefile.version
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile.version,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.version
--- Makefile.version 5 Nov 2019 10:18:53 -0000 1.8
+++ Makefile.version 13 Feb 2020 16:38:03 -0000
@@ -3,7 +3,7 @@
 
 QT5_VERSION = 5.9.8
 QT5_DIST_VERSION = 5.9.8
-QT5_WEBKIT_VERSION = 5.9.0
+QT5_WEBKIT_VERSION = 5.212.0
 
 # This one is used for building dependencies for examples and documentation,
 # which obviously should be in sync with core packages.
Index: docs/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/docs/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- docs/Makefile 6 Nov 2019 17:12:15 -0000 1.9
+++ docs/Makefile 13 Feb 2020 16:38:04 -0000
@@ -6,6 +6,7 @@ COMMENT-qch = qdoc-compiled documentati
 PKGNAME = qt5-docs-${QT5_VERSION}
 PKGNAME-html = qt5-html-${QT5_VERSION}
 PKGNAME-qch = qt5-qch-${QT5_VERSION}
+WEBKIT_DOCS_VERSION = 5.9.0
 
 MULTI_PACKAGES = -html -qch
 SUBPACKAGE ?= -html
@@ -48,10 +49,10 @@ DOC_COMPONENTS = \
  qtx11extras \
  qtxmlpatterns
 
-MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
-MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
+MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
+MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
 DISTFILES = ${DOC_COMPONENTS:Nqtwebkit:C/$/-opensource-src-${QT5_DIST_VERSION}${EXTRACT_SUFX}/}:0
-DISTFILES += qtwebkit-opensource-src-${QT5_WEBKIT_VERSION}${EXTRACT_SUFX}:1
+DISTFILES += qtwebkit-opensource-src-${WEBKIT_DOCS_VERSION}${EXTRACT_SUFX}:1
 
 MODQT5_USE_CXX11 = No
 CONFIGURE_STYLE = none
Index: qtwebkit/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- qtwebkit/Makefile 7 Jan 2020 20:22:08 -0000 1.17
+++ qtwebkit/Makefile 13 Feb 2020 16:38:04 -0000
@@ -1,29 +1,50 @@
 # $OpenBSD: Makefile,v 1.17 2020/01/07 20:22:08 zhuk Exp $
 
-QT5NAME = QtWebkit
-REVISION = 11
-COMMENT = old Webkit integration framework for Qt
+COMMENT = QtWebKit with a more modern WebKit code base
+
 USE_WXNEEDED = Yes
+
+CATEGORIES = www
+
 DPB_PROPERTIES = parallel
-VERSION = ${QT5_WEBKIT_VERSION}
-DIST_VERSION = ${QT5_WEBKIT_VERSION}
 
-SHARED_LIBS += Qt5WebKit 2.1
-SHARED_LIBS += Qt5WebKitWidgets 2.1
+VERSION = ${QT5_WEBKIT_VERSION}
+DISTNAME = qtwebkit-${QT5_WEBKIT_VERSION}-alpha3
+PKGNAME = qtwebkit-${QT5_WEBKIT_VERSION}
 
-CATEGORIES = www
+SHARED_LIBS +=  Qt5WebKit               3.0 # 5.9
+SHARED_LIBS +=  Qt5WebKitWidgets        3.0 # 5.9
+SHARED_LIBS +=  JavaScriptCore          0.0 # 5.212.9
+SHARED_LIBS +=  WebCore                 0.0 # 5.212.9
+SHARED_LIBS +=  WebKit2                 0.0 # 5.212.9
+SHARED_LIBS +=  WTF                     0.0 # 5.212.9
+
+# Mostly LGPLv2.1 or LGPLv3 for code; FDLv1.3 for documentation.
+# Some third-party parts are BSD-licensed.
+# Also, many parts have are dual-licensed having either commercial, GPL,
+# Apache 2.0 or other type of license as an alternative option.
+# A few components, including QtWebEngine, are LGPLv3 only, no LGPLv2.1.
+PERMIT_PACKAGE = Yes
+
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5Positioning
+WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5WebChannel
+WANTLIB += Qt5Widgets X11 Xcomposite Xrender c gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstfft-1.0
+WANTLIB += gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 gstvideo-1.0
+WANTLIB += hyphen icui18n icuuc jpeg m png sqlite3 webp xml2 xslt
+
+MASTER_SITES = https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+MODULES = devel/cmake \
+ lang/ruby \
+ x11/qt5
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5OpenGL
-WANTLIB += Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors
-WANTLIB += Qt5Sql Qt5WebChannel Qt5Widgets X11 Xext Xrender c
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0
-WANTLIB += gstbase-1.0 gstpbutils-1.0 gstreamer-1.0 gstvideo-1.0
-WANTLIB += icudata icui18n icuuc intl jpeg m png sqlite3 webp
-WANTLIB += xml2 xslt z
+# Override to unbreak ninja build
+CONFIGURE_STYLE = cmake
 
-MASTER_SITES = https://download.qt.io/community_releases/${DIST_VERSION:R}/${DIST_VERSION}-final/
+# Remove default "first" target and build all
+ALL_TARGET =
 
-MODULES = perl lang/python lang/ruby
 MODPY_RUNDEP = No
 MODRUBY_RUNDEP = No
 
@@ -43,75 +64,72 @@ LIB_DEPENDS = databases/sqlite3 \
  multimedia/gstreamer1/plugins-base \
  textproc/icu4c \
  textproc/libxslt \
+ graphics/libwebp \
+ textproc/hyphen \
  x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtlocation>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtsensors>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtwebchannel>=${QT5_VERSION},<${QT5_NEXT_VERSION}
 
-MAKE_ENV = NINJA_PATH="${LOCALBASE}/bin/ninja" \
- PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-MAKE_FLAGS = PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-FLAVORS = debug
-PSEUDO_FLAVORS = no_tests
-
-#MODQMAKE_ARGS = WEBKIT_CONFIG+=web_audio
+CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
+ -DENABLE_API_TESTS=OFF \
+ -DENABLE_QT_WEBCHANNEL=ON \
+ -DENABLE_TOOLS=OFF \
+ -DPORT=Qt \
+ -DSHARED_CORE=ON \
+ -DUSE_GSTREAMER=ON \
+ -DUSE_LD_GOLD=OFF \
+ -DUSE_QT_MULTIMEDIA=OFF \
+ -DUSE_SYSTEM_MALLOC=ON \
+ -DUSE_WOFF2=OFF
+
+CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX="${WRKINST}${TRUEPREFIX}" \
+ -DECM_MKSPECS_INSTALL_DIR=${WRKINST}${MODQT_LIBDIR}/mkspecs/modules \
+ -DKDE_INSTALL_INCLUDEDIR=${WRKINST}${MODQT_INCDIR} \
+ -DKDE_INSTALL_LIBEXECDIR=${WRKINST}${MODQT_LIBDIR}/libexec \
+ -DKDE_INSTALL_SHAREDSTATEDIR=/var \
+ -DKDE_INSTALL_SYSCONFDIR=/etc \
+ -DKDE_INSTALL_MANDIR=${WRKINST}/man \
+ -DKDE_INSTALL_QTPLUGINDIR=${WRKINST}${MODQT_LIBDIR}/plugins \
+ -DKDE_INSTALL_LIBDIR=${WRKINST}${MODQT_LIBDIR} \
+ -DKDE_INSTALL_QMLDIR=${WRKINST}${MODQT_LIBDIR}/qml
 
 # See qtbase/tests/README for details
 TEST_IS_INTERACTIVE = X11
 TEST_DEPENDS = ${MODPY_RUN_DEPENDS} \
  ${MODRUBY_RUN_DEPENDS} \
- audio/sox \
- kde4-minimal-*|kdebase-*:meta/kde4,-minimal
+ audio/sox
 
-pre-configure:
- # Python and Ruby are used for building mainly, those paths
- # do not get into final packages.
- ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
- ln -sf ${RUBY} ${WRKDIR}/bin/ruby
-
- cd ${WRKSRC}; ${MODPY_BIN_ADJ} \
- `find . -name '*.py'` \
- `egrep -Rl '(env |bin/)python' Tools` \
- Source/WebCore/inspector/generate-inspector-protocol-version \
- Source/WebCore/html/parser/create-html-entity-table
-
- cd ${WRKSRC}; ${MODRUBY_RUBY_ADJ} \
- `find . -name '*.rb'` \
- Tools/Scripts/check-for-webkit-framework-include-consistency \
- Tools/Scripts/display-profiler-output \
- Tools/Scripts/check-for-inappropriate-macros-in-external-headers \
- Tools/Scripts/roll-over-ChangeLogs \
- Tools/Scripts/check-for-inappropriate-files-in-framework \
- Tools/Scripts/test-webkitruby \
- Tools/Scripts/clean-header-guards \
- Tools/Scripts/bencher \
- Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator \
- Source/WebCore/make-export-file-generator \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
-
- cd ${WRKSRC}; perl -pi.otheradj \
- -e 's,/usr/bin/(env )?python\b,${MODPY_BIN},g;' \
- -e 's,/usr/bin/(env )?ruby\b,${RUBY},g;' \
- -e 's,(/usr)?/bin/(env )?bash\b,/bin/ksh,g;' \
- Tools/BuildSlaveSupport/gtk/pulseaudio/run \
- Tools/Scripts/old-run-webkit-tests \
- Tools/Scripts/run-webkit-websocketserver \
- Tools/Scripts/webkitpy/common/system/executive_unittest.py
-
- cd ${WRKSRC}; perl -pi.symname \
- -e 's/^__/_/;' \
- qtwebkit/Source/JavaScriptCore/JavaScriptCore.order
-
- cd ${WRKSRC}/Tools/qmake/config.tests; perl -pi.objdir \
- -e 's/^OBJECTS_DIR/#$$&/;' \
- */*.pro
+.include <bsd.port.arch.mk>
+
+# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
+.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
+    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
+    ${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el" && \
+    ${MACHINE_ARCH} != "sh"
+# #error "The MacroAssembler is not supported on this platform."
+CONFIGURE_ARGS += -DENABLE_JIT=OFF
+CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
+.endif
+
+# ld.lld does not have this option
+# save memory on 32bit arches
+.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
+LDFLAGS += -Wl,--no-keep-memory
+.endif
+
+# __sync_add_and_fetch_8
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS += -march=i686
+CXXFLAGS += -march=i686
+.endif
 
 .include <bsd.port.mk>
 .if ${CHOSEN_COMPILER} == "base-clang"
 CXXFLAGS += -fno-ret-protector
 .endif
+
+post-install:
+ find ${WRKINST} -type f -print0 | xargs -0r perl -pi \
+ -e 's,${WRKINST},,g;'
Index: qtwebkit/distinfo
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- qtwebkit/distinfo 17 Jul 2017 08:34:39 -0000 1.2
+++ qtwebkit/distinfo 13 Feb 2020 16:38:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = ja0ZO3QAVamYMS4EoEDy4yqSPAgjstI5sk6rCCdqTgQ=
-SIZE (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = 35301288
+SHA256 (qt/qtwebkit-5.212.0-alpha3.tar.xz) = NX7uWCRFV0Ry5BDr7OYy0G+g7JQ1j8Q0XypxOSLfXhc=
+SIZE (qt/qtwebkit-5.212.0-alpha3.tar.xz) = 12457896
Index: qtwebkit/patches/patch-CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-CMakeLists_txt
diff -N qtwebkit/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-CMakeLists_txt 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64
+     set(WTF_CPU_X86_64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+     set(WTF_CPU_X86 1)
+-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+     set(WTF_CPU_PPC 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+     set(WTF_CPU_PPC64 1)
+@@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390
+     set(WTF_CPU_S390 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+     set(WTF_CPU_S390X 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
++ set(WTF_CPU_SPARC64 1)
+ else ()
+     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
+ endif ()
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_API_JSStringRef_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/JavaScriptCore/API/JSStringRef.cpp
---- Source/JavaScriptCore/API/JSStringRef.cpp.orig
-+++ 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(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
- }
-
- JSStringRef JSStringCreateWithUTF8CString(const char* string)
-@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char*
- JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
- {
-     initializeThreading();
--    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
-+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
- }
-
- JSStringRef JSStringRetain(JSStringRef string)
-@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
-
- const JSChar* JSStringGetCharactersPtr(JSStringRef string)
- {
--    return string->characters();
-+    return reinterpret_cast<const JSChar*>(string->characters());
- }
-
- size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/API/ObjCCallbackFunction.h
+--- Source/JavaScriptCore/API/ObjCCallbackFunction.h.orig
++++ Source/JavaScriptCore/API/ObjCCallbackFunction.h
+@@ -29,7 +29,7 @@
+
+ #if JSC_OBJC_API_ENABLED
+
+-#import <JavaScriptCore/JSCallbackFunction.h>
++#import <JavaScriptCore/API/JSCallbackFunction.h>
+
+ #if defined(__OBJC__)
+ JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/CMakeLists.txt
+--- Source/JavaScriptCore/CMakeLists.txt.orig
++++ Source/JavaScriptCore/CMakeLists.txt
+@@ -1286,6 +1286,7 @@ elseif (WTF_CPU_S390)
+ elseif (WTF_CPU_S390X)
+ elseif (WTF_CPU_MIPS)
+ elseif (WTF_CPU_SH4)
++elseif (WTF_CPU_SPARC64)
+ elseif (WTF_CPU_X86)
+ elseif (WTF_CPU_X86_64)
+     if (MSVC AND ENABLE_JIT)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.2 2017/09/15 07:43:42 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2666,6 +2666,8 @@ class ARM64Assembler { (public)
+     {
+ #if OS(IOS)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(LINUX)
+         size_t page = pageSize();
+         uintptr_t current = reinterpret_cast<uintptr_t>(code);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.3 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARMAssembler.h
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -1128,6 +1128,8 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+
+             linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.4 2018/03/19 08:13:15 ajacoutot Exp $
+
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -36,6 +36,12 @@
+ #include <intrin.h>
+ #endif
+
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+
+ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler, MacroAssemblerX86Common> {
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 13 Feb 2020 16:38:04 -0000
@@ -1,16 +1,14 @@
-$OpenBSD: patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig Fri Dec 26 13:45:46 2014
-+++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp Fri Dec 26 13:48:04 2014
-@@ -152,8 +152,9 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
-         amountOfNodeWhiteSpace = 0;
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+--- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig
++++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+@@ -159,7 +159,7 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
      else
          amountOfNodeWhiteSpace = Graph::amountOfNodeWhiteSpace(context);
--    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixLength + amountOfNodeWhiteSpace + 1]);
+     auto prefixBuffer = std::make_unique<char[]>(prefixLength + amountOfNodeWhiteSpace + 1);
 -    strcpy(prefixBuffer.get(), prefix);
-+    size_t prefixBufferSize = prefixLength + amountOfNodeWhiteSpace + 1;
-+    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixBufferSize]);
-+    memcpy(prefixBuffer.get(), prefix, prefixBufferSize);
++    memcpy(prefixBuffer.get(), prefix, prefixLength);
      for (int i = 0; i < amountOfNodeWhiteSpace; ++i)
          prefixBuffer[i + prefixLength] = ' ';
      prefixBuffer[prefixLength + amountOfNodeWhiteSpace] = 0;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 13 Feb 2020 16:38:04 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak build.
-Synchronized with WebKit upsteam.
---- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Thu Sep 11 14:48:22 2014
-+++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Wed Jan  7 01:01:51 2015
-@@ -45,6 +45,10 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.cpp
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -49,6 +49,10 @@
 
  #elif OS(UNIX)
 
@@ -14,45 +14,132 @@ Synchronized with WebKit upsteam.
  #include <sys/mman.h>
  #include <unistd.h>
 
-@@ -311,6 +315,8 @@ typedef arm_thread_state_t PlatformThreadRegisters;
- typedef CONTEXT PlatformThreadRegisters;
- #elif OS(QNX)
- typedef struct _debug_thread_info PlatformThreadRegisters;
-+#elif OS(OPENBSD)
-+typedef pthread_t PlatformThreadRegisters;
- #elif USE(PTHREADS)
- typedef pthread_attr_t PlatformThreadRegisters;
- #else
-@@ -369,6 +375,8 @@ static size_t getPlatformThreadRegisters(const Platfor
+@@ -86,11 +90,13 @@ static void pthreadSignalHandlerSuspendResume(int, sig
      }
-     close(fd);
-     return sizeof(struct _debug_thread_info);
+
+     ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
+-#if CPU(PPC)
++
++// XXX we don't have ucontext || fix an error on powerpc
++#if CPU(PPC) && !OS(OPENBSD)
+     thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+ #else
+-    thread->suspendedMachineContext = userContext->uc_mcontext;
+-#endif
++    thread->suspendedMachineContext = *userContext;
++#endif
+
+     // Allow suspend caller to see that this thread is suspended.
+     // sem_post is async-signal-safe function. It means that we can call this from a signal handler.
+@@ -566,6 +572,25 @@ void* MachineThreads::Thread::Registers::stackPointer(
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD) && ENABLE(JIT)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_edx);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[5]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsi);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__) && ENABLE(JIT)
+
+ #if CPU(X86)
+@@ -632,6 +657,7 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++
+ #endif // __DARWIN_UNIX03
+
+ // end OS(DARWIN)
+@@ -665,6 +691,25 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
 +#elif OS(OPENBSD)
-+    regs = platformThread;
- #elif USE(PTHREADS)
-     pthread_attr_init(&regs);
- #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
-@@ -437,7 +445,14 @@ static inline void* otherThreadStackPointer(const Plat
- #elif USE(PTHREADS)
-     void* stackBase = 0;
-     size_t stackSize = 0;
-+#if OS(OPENBSD)
-+    stack_t ss;
-+    int rc = pthread_stackseg_np(regs, &ss);
-+    stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
-+    stackSize = ss.ss_size;
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_esp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[29]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsp);
 +#else
-     int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#error Unknown Architecture
 +#endif
-     (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
-     ASSERT(stackBase);
-     return static_cast<char*>(stackBase) + stackSize;
-@@ -448,7 +463,7 @@ static inline void* otherThreadStackPointer(const Plat
-
- static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
- {
--#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
-+#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX) && !OS(OPENBSD)
-     pthread_attr_destroy(&regs);
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -747,6 +792,25 @@ void* MachineThreads::Thread::Registers::instructionPo
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_ebp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rbp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[30]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rbp);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -837,6 +901,25 @@ void* MachineThreads::Thread::Registers::llintPC() con
  #else
-     UNUSED_PARAM(regs);
+ #error Unknown Architecture
+ #endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_eip);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rip);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_pc);                                                                                                                  
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rip);
++#else
++#error Unknown Architecture
++#endif
++
+
+ #elif defined(__GLIBC__)
+
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.h
+--- Source/JavaScriptCore/heap/MachineStackMarker.h.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.h
+@@ -41,7 +41,10 @@
+ #if OS(FREEBSD)
+ #include <ucontext.h>
+ #endif
++#if OS(OPENBSD)
++typedef ucontext_t mcontext_t;
+ #endif
++#endif
+
+ #if OS(DARWIN)
+ typedef mach_port_t PlatformThread;
+@@ -51,6 +54,7 @@ typedef DWORD PlatformThread;
+ typedef pthread_t PlatformThread;
+ #endif // OS(DARWIN)
+
++
+ namespace JSC {
+
+ class CodeBlockSet;
+@@ -114,7 +118,6 @@ class MachineThreads { (public)
+ #else
+ #error Need a thread register struct for this platform
+ #endif
+-            
+             PlatformRegisters regs;
+         };
+        
Index: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,11 @@
+$OpenBSD: patch-Source_JavaScriptCore_javascriptcoregtk_pc_in,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig Tue Aug  9 01:03:49 2016
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in Tue Aug  9 01:03:57 2016
+@@ -7,5 +7,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
--- qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 13 Feb 2020 16:38:04 -0000
@@ -1,13 +1,13 @@
-$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Taken from www/webkitgtk4 port, see also:
-https://bugs.webkit.org/show_bug.cgi?id=61137
---- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Tue Feb 17 07:57:12 2015
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.h Wed Apr  8 00:38:31 2015
-@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
- #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
- #if CPU(ARM) || CPU(MIPS)
+$OpenBSD$
+
+Index: Source/JavaScriptCore/jit/ExecutableAllocator.h
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -80,7 +80,8 @@ static const size_t fixedExecutableMemoryPoolSize = FI
  static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
--#elif CPU(X86_64) && !CPU(X32)
+ #elif CPU(ARM64)
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
+-#elif CPU(X86_64)
 +#elif CPU(X86_64) && !CPU(X32) && !OS(OPENBSD)
 +// default limits on OpenBSD are far less than 1GB
  static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
--- qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_jsc_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Enable W^X in QtWebkit's JIT.
-Index: Source/JavaScriptCore/jsc.pro
---- Source/JavaScriptCore/jsc.pro.orig
-+++ Source/JavaScriptCore/jsc.pro
-@@ -30,4 +30,5 @@ wince* {
- # Prevent warnings about difference in visibility on Mac OS X
- qtConfig(reduce_exports):CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations):CONFIG += bsymbolic_functions
-+openbsd:DEFINES *= ASSEMBLER_WX_EXCLUSIVE=1
-
Index: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
diff -N qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
--- qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp.orig Fri Dec 26 13:50:19 2014
-+++ Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp Fri Dec 26 13:53:09 2014
-@@ -107,17 +107,13 @@ void InfoLog::append(const char *format, ...)
-     if (!mInfoLog)
-     {
-         mInfoLog = new char[infoLength + 2];
--        strcpy(mInfoLog, info);
--        strcpy(mInfoLog + infoLength, "\n");
-+        snprintf(mInfoLog, infoLength + 2, "%s\n", info);
-     }
-     else
-     {
-         size_t logLength = strlen(mInfoLog);
-         char *newLog = new char[logLength + infoLength + 2];
--        strcpy(newLog, mInfoLog);
--        strcpy(newLog + logLength, info);
--        strcpy(newLog + logLength + infoLength, "\n");
--
-+        snprintf(mInfoLog, logLength + infoLength + 2, "%s%s\n", mInfoLog, info);
-         delete[] mInfoLog;
-         mInfoLog = newLog;
-     }
Index: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
diff -N qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -188,6 +188,7 @@
+ #include <iostream>  // NOLINT
+ #include <sstream>  // NOLINT
+ #include <string>  // NOLINT
++#include <unistd.h>
+
+ #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
+ #define GTEST_FLAG_PREFIX_ "gtest_"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
diff -N qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/Assertions.cpp
+--- Source/WTF/wtf/Assertions.cpp.orig
++++ Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || OS(OPENBSD) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* fil
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) || (OS(OPENBSD)) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -259,7 +259,7 @@ void WTFReportBacktrace()
+     WTFPrintBacktrace(samples + framesToSkip, frames - framesToSkip);
+ }
+
+-#if OS(DARWIN) || OS(LINUX)
++#if OS(DARWIN) || OS(LINUX) || OS(OPENBSD)
+ #  if PLATFORM(QT) || PLATFORM(GTK)
+ #    if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #      define USE_BACKTRACE_SYMBOLS 1
Index: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ 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(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Platform_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WTF_wtf_Platform_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_WTF_wtf_Platform_h
--- qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 13 Feb 2020 16:38:04 -0000
@@ -1,15 +1,29 @@
-$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Use system malloc(3).
---- Source/WTF/wtf/Platform.h.orig Tue Feb 17 07:57:01 2015
-+++ Source/WTF/wtf/Platform.h Wed Apr  8 00:38:31 2015
-@@ -724,6 +724,10 @@
- #endif
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.12 2018/03/19 08:13:15 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -155,6 +155,13 @@
+ #define WTF_CPU_BIG_ENDIAN 1
  #endif
 
-+#if PLATFORM(OPENBSD)
-+#define USE_SYSTEM_MALLOC 1
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
 +#endif
 +
- #if PLATFORM(EFL)
- #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
- #endif
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
+@@ -707,6 +714,7 @@
+     || CPU(S390X) \
+     || CPU(MIPS64) \
+     || CPU(PPC64) \
++    || CPU(SPARC64) \
+     || CPU(PPC64LE)
+ #define USE_JSVALUE64 1
+ #else
Index: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
--- qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_RandomNumberSeed_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Source/WTF/wtf/RandomNumberSeed.h.orig Fri Dec 19 23:00:04 2014
-+++ Source/WTF/wtf/RandomNumberSeed.h Fri Dec 19 23:01:03 2014
-@@ -55,6 +55,8 @@ inline void initializeRandomNumberGenerator()
-     timeval time;
-     gettimeofday(&time, 0);
-     srandom(static_cast<unsigned>(time.tv_usec * getpid()));
-+#elif OS(OPENBSD)
-+    // On OpenBSD we use arc4random() which initialises itself
- #else
-     srand(static_cast<unsigned>(time(0)));
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
--- qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_TypeTraits_h,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WTF/wtf/TypeTraits.h
---- Source/WTF/wtf/TypeTraits.h.orig
-+++ Source/WTF/wtf/TypeTraits.h
-@@ -72,6 +72,9 @@ namespace WTF {
-     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
-     template<> struct IsInteger<long long>          { static const bool value = true; };
-     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
-+#endif
- #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)  || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
Index: qtwebkit/patches/patch-Source_WebCore_Target_pri
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_Target_pri
diff -N qtwebkit/patches/patch-Source_WebCore_Target_pri
--- qtwebkit/patches/patch-Source_WebCore_Target_pri 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WebCore_Target_pri,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebCore/Target.pri.orig Tue Feb 17 07:57:09 2015
-+++ Source/WebCore/Target.pri Wed Apr  8 00:38:31 2015
-@@ -4280,6 +4280,12 @@ win32:!mingw:contains(QMAKE_HOST.arch, x86_64):{
-    }
- }
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include/libsoup-2.4
-+    INCLUDEPATH += $(LOCALBASE)/include/harfbuzz
-+    INCLUDEPATH += $(X11BASE)/include/freetype2
-+}
-+
- contains(CONFIG, opengl-shims) {
-     HEADERS += platform/graphics/OpenGLShims.h
-     SOURCES += platform/graphics/OpenGLShims.cpp
Index: qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Source_WebCore_dom_Document_cpp
--- qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 13 Feb 2020 16:38:04 -0000
@@ -5,7 +5,7 @@ Fix build with icu4c >=65
 Index: Source/WebCore/dom/Document.cpp
 --- Source/WebCore/dom/Document.cpp.orig
 +++ Source/WebCore/dom/Document.cpp
-@@ -3846,12 +3846,12 @@ static bool isValidNameNonASCII(const UChar* character
+@@ -4407,12 +4407,12 @@ static bool isValidNameNonASCII(const UChar* character
      unsigned i = 0;
 
      UChar32 c;
@@ -20,12 +20,12 @@ Index: Source/WebCore/dom/Document.cpp
          if (!isValidNamePart(c))
              return false;
      }
-@@ -3914,7 +3914,7 @@ bool Document::parseQualifiedName(const String& qualif
-     const UChar* s = qualifiedName.characters();
+@@ -4474,7 +4474,7 @@ bool Document::parseQualifiedName(const String& qualif
+
      for (unsigned i = 0; i < length;) {
          UChar32 c;
--        U16_NEXT(s, i, length, c)
-+        U16_NEXT(s, i, length, c);
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
          if (c == ':') {
              if (sawColon) {
                  ec = NAMESPACE_ERR;
Index: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -31,7 +31,7 @@
+ #include <wtf/NeverDestroyed.h>
+ #include <wtf/text/WTFString.h>
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
--- qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/graphics/SegmentedFontData.cpp
---- Source/WebCore/platform/graphics/SegmentedFontData.cpp.orig
-+++ Source/WebCore/platform/graphics/SegmentedFontData.cpp
-@@ -61,7 +61,7 @@ bool SegmentedFontData::containsCharacters(const UChar
- {
-     UChar32 c;
-     for (int i = 0; i < length; ) {
--        U16_NEXT(characters, i, length, c)
-+        U16_NEXT(characters, i, length, c);
-         if (!containsCharacter(c))
-             return false;
-     }
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+@@ -33,7 +33,7 @@ struct GraphicsSurfaceToken {
+
+ #if OS(DARWIN)
+     typedef mach_port_t BufferHandle;
+-#elif OS(LINUX)
++#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+     typedef uint32_t BufferHandle;
+ #elif OS(WINDOWS)
+     typedef HANDLE BufferHandle;
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+@@ -34,7 +34,7 @@ typedef struct __IOSurface* IOSurfaceRef;
+ typedef IOSurfaceRef PlatformGraphicsSurface;
+ #endif
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ typedef uint32_t PlatformGraphicsSurface;
+ #endif
+
Index: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
diff -N qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
--- qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
---- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.orig
-+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
-@@ -175,7 +175,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UC
-     int32_t i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(buffer, i, length, c)
-+        U16_NEXT(buffer, i, length, c);
-         UErrorCode error = U_ZERO_ERROR;
-         UScriptCode script = uscript_getScript(c, &error);
-         if (error != U_ZERO_ERROR) {
-@@ -746,7 +746,7 @@ static CFStringRef createStringWithEscapedUnsafeCharac
-     CFIndex i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(sourceBuffer, i, length, c)
-+        U16_NEXT(sourceBuffer, i, length, c);
-        
-         if (isLookalikeCharacter(c)) {
-             uint8_t utf8Buffer[4];
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginPackageQt.cpp.orig Tue Oct 13 07:37:21 2015
-+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp Thu Dec 10 09:05:23 2015
-@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0)
-         }
-     }
-
--    QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgtk-x11-2.0"));
-     if (library.load()) {
-         typedef void *(*gtk_init_check_ptr)(int*, char***);
-         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginViewQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginViewQt.cpp.orig Fri Dec 26 02:28:55 2014
-+++ Source/WebCore/plugins/qt/PluginViewQt.cpp Fri Dec 26 02:29:10 2014
-@@ -697,7 +697,7 @@ static Display *getPluginDisplay()
-     // support gdk based plugins (like flash) that use a different X connection.
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
--- qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp.orig Fri Dec 26 02:29:24 2014
-+++ Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp Fri Dec 26 02:29:35 2014
-@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMess
-
- static bool initializeGtk()
- {
--    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"));
-     if (!gtkLibrary.load())
-         return false;
-     typedef void* (*gtk_init_ptr)(void*, void*);
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
--- qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_Shared_API_c_WKString_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WebKit2/Shared/API/c/WKString.cpp
---- Source/WebKit2/Shared/API/c/WKString.cpp.orig
-+++ Source/WebKit2/Shared/API/c/WKString.cpp
-@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
- size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
- {
-     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
--    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
-+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
- }
-
- size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+--- Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp.orig
++++ Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+@@ -68,6 +68,7 @@ Vector<String> pluginsDirectories()
+     result.append("/usr/lib64/mozilla/plugins");
+     result.append("/usr/lib/nsbrowser/plugins");
+     result.append("/usr/lib64/nsbrowser/plugins");
++    result.append("${LOCALBASE}/lib/mozilla/plugins");
+ #endif
+
+     return result;
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.orig Fri Dec 26 02:30:14 2014
-+++ Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp Fri Dec 26 02:30:24 2014
-@@ -64,7 +64,7 @@ static Display* getPluginDisplay()
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_pro,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebKit2/WebProcess.pro.orig Thu Sep 11 14:48:23 2014
-+++ Source/WebKit2/WebProcess.pro Mon Nov 10 20:49:42 2014
-@@ -15,6 +15,10 @@ INCLUDEPATH = \
-     $$PWD/Shared/linux/SandboxProcess/ \
-     $$INCLUDEPATH
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include
-+}
-+
- QT += network webkit
- macx: QT += xml
-
Index: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
diff -N qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+--- Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp.orig
++++ Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+@@ -964,6 +964,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& si
+     if (view->needsLayout())
+         view->layout();
+     view->adjustViewSize();
++
++    if (view->needsLayout())
++        view->layout();
+ }
+
+
Index: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
diff -N qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake 13 Feb 2020 16:38:04 -0000
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_cmake_OptionsCommon_cmake,v 1.12 2017/09/15 07:43:42 ajacoutot Exp $
+
+Our ar(1) is too old and have not support for `T'.
+
+Undefined references to libc functions.
+
+Index: Source/cmake/OptionsCommon.cmake
+--- Source/cmake/OptionsCommon.cmake.orig
++++ Source/cmake/OptionsCommon.cmake
+@@ -19,10 +19,10 @@ option(USE_THIN_ARCHIVES "Produce all static libraries
+ 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 ()
+
+@@ -174,9 +174,9 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
++#    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
++#endif ()
+
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
Index: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
diff -N qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
--- qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_DumpRenderTree_JavaScriptThreading_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/DumpRenderTree/JavaScriptThreading.cpp.orig Fri Dec 19 23:01:59 2014
-+++ Tools/DumpRenderTree/JavaScriptThreading.cpp Fri Dec 19 23:02:47 2014
-@@ -101,7 +101,7 @@ void runJavaScriptThread(void*)
-         }
-
-         // Respawn probabilistically.
--        if (rand() % 5)
-+        if (arc4random_uniform(5))
-             continue;
-
-         MutexLocker locker(javaScriptThreadsMutex());
Index: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_mangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/mangle.cgi.c.orig Fri Dec 26 02:50:45 2014
-+++ Tools/mangleme/mangle.cgi.c Fri Dec 26 02:51:04 2014
-@@ -18,7 +18,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_remangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/remangle.cgi.c.orig Fri Dec 26 02:49:32 2014
-+++ Tools/mangleme/remangle.cgi.c Fri Dec 26 02:50:11 2014
-@@ -17,7 +17,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/gccdepends/gccdepends.pro
---- Tools/qmake/config.tests/gccdepends/gccdepends.pro.orig
-+++ Tools/qmake/config.tests/gccdepends/gccdepends.pro
-@@ -1,27 +1,22 @@
- TEMPLATE = aux
--OBJECTS_DIR = obj
-+#OBJECTS_DIR = obj
- QMAKE_CXXFLAGS += -MD
-
- base_filename = empty
--object_file = $$OBJECTS_DIR/$${base_filename}.o
-+object_file = $${base_filename}.o
- deps_filename = $${base_filename}.d
-
- SOURCES += $${base_filename}.cpp
-
- test.commands = \
--    # Earlier teambuilder and icecream versions would not
--    # respect the -o argument for the .d file, so the file
--    # would end up in the root build dir.
--    test ! -f $${deps_filename} && \
--    \
-     # But it should end up in the OBJECTS_DIR
--    test -f $$OBJECTS_DIR/$${deps_filename} && \
-+    test -f $${deps_filename} && \
-     \
-     # Icecream 0.9.7 and earlier does not ensure that the
-     # target rule matches the path of the .o file, since
-     # the file is compiled into the current dir and then
-     # moved. Verify that we don't hit that case.
--    grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
-+    grep -q \"$${object_file}:\" $${deps_filename} && \
-     \
-     # If everything is all right we mark the test as succeeded
-     echo success > $$basename(PWD)
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_glx_glx_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/glx/glx.pro
---- Tools/qmake/config.tests/glx/glx.pro.orig
-+++ Tools/qmake/config.tests/glx/glx.pro
-@@ -1,4 +1,4 @@
-+CONFIG += opengl x11
- SOURCES = glx.cpp
--OBJECTS_DIR = obj
--LIBS += -lX11 -lGL
-+#OBJECTS_DIR = obj
-
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
---- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig
-+++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXcomposite.cpp
--OBJECTS_DIR = obj
--LIBS += -lXcomposite -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXcomposite ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXrender_libXrender_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXrender/libXrender.pro
---- Tools/qmake/config.tests/libXrender/libXrender.pro.orig
-+++ Tools/qmake/config.tests/libXrender/libXrender.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXrender.cpp
--OBJECTS_DIR = obj
--LIBS += -lXrender -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXrender ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
diff -N qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
--- qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak linking to static libraries by providing exact paths when possible.
-
-Particular problem: system version of leveldb gets picked up due to madness in -L.
---- Tools/qmake/mkspecs/features/functions.prf.orig Mon May 30 14:52:29 2016
-+++ Tools/qmake/mkspecs/features/functions.prf Sat Jul 30 00:00:45 2016
-@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
-         mac {
-             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
-         } else:win32-msvc*|wince*|win32-icc {
-+            LIBS += -L$$path
-             LIBS += -l$$target
-             QMAKE_LFLAGS += /OPT:REF
-         } else {
-             CONFIG *= no_smart_library_merge
--            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
-+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
-         }
--
--        LIBS += -L$$path
-
-         win32-msvc*|wince*|win32-icc {
-             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
Index: qtwebkit/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- qtwebkit/pkg/PLIST 7 Jan 2020 20:22:08 -0000 1.2
+++ qtwebkit/pkg/PLIST 13 Feb 2020 16:38:04 -0000
@@ -1,11 +1,10 @@
-@comment $OpenBSD: PLIST,v 1.2 2020/01/07 20:22:08 zhuk Exp $
+@comment $OpenBSD: PLIST,v 1.1 2017/07/29 00:07:15 zhuk Exp $
 @conflict qt5-<5.6
 @pkgpath x11/qt5/qtwebkit,-main
 include/X11/qt5/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/bytearraytestdata.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qhttpheader_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkreply_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkrequest_p.h
@@ -14,8 +13,6 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebpage_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qtwebsecurityorigin_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebchannelwebkittransport_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebdatabase_p.h
@@ -33,14 +30,12 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebplugindatabase_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebsecurityorigin_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/testwindow.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/util.h
 include/X11/qt5/QtWebKit/QWebDatabase
 include/X11/qt5/QtWebKit/QWebElement
 include/X11/qt5/QtWebKit/QWebElementCollection
+include/X11/qt5/QtWebKit/QWebFullScreenRequest
 include/X11/qt5/QtWebKit/QWebFullScreenVideoHandler
 include/X11/qt5/QtWebKit/QWebHapticFeedbackPlayer
 include/X11/qt5/QtWebKit/QWebHistory
@@ -62,6 +57,7 @@ include/X11/qt5/QtWebKit/QtWebKitVersion
 include/X11/qt5/QtWebKit/qtwebkitversion.h
 include/X11/qt5/QtWebKit/qwebdatabase.h
 include/X11/qt5/QtWebKit/qwebelement.h
+include/X11/qt5/QtWebKit/qwebfullscreenrequest.h
 include/X11/qt5/QtWebKit/qwebhistory.h
 include/X11/qt5/QtWebKit/qwebhistoryinterface.h
 include/X11/qt5/QtWebKit/qwebkitglobal.h
@@ -92,25 +88,36 @@ include/X11/qt5/QtWebKitWidgets/qwebfram
 include/X11/qt5/QtWebKitWidgets/qwebinspector.h
 include/X11/qt5/QtWebKitWidgets/qwebpage.h
 include/X11/qt5/QtWebKitWidgets/qwebview.h
+@lib lib/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
 @lib lib/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/libWTF.so.${LIBWTF_VERSION}
+@lib lib/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 lib/qt5/cmake/Qt5WebKit/
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfigVersion.cmake
+lib/qt5/cmake/Qt5WebKit/WebKitTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
-lib/qt5/libQt5WebKit.la
-lib/qt5/libQt5WebKit.prl
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
+@static-lib lib/qt5/libANGLESupport.a
+@lib lib/qt5/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/qt5/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
-lib/qt5/libQt5WebKitWidgets.la
-lib/qt5/libQt5WebKitWidgets.prl
 @lib lib/qt5/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/qt5/libWTF.so.${LIBWTF_VERSION}
+@lib lib/qt5/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/qt5/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/qt5/libexec/
+@bin lib/qt5/libexec/QtWebNetworkProcess
 @bin lib/qt5/libexec/QtWebPluginProcess
 @bin lib/qt5/libexec/QtWebProcess
+@bin lib/qt5/libexec/QtWebStorageProcess
 lib/qt5/mkspecs/modules/qt_lib_webkit.pri
 lib/qt5/mkspecs/modules/qt_lib_webkit_private.pri
 lib/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Jeremie Courreges-Anglas-2
On Thu, Feb 13 2020, Jeremie Courreges-Anglas <[hidden email]> wrote:

> On Thu, Feb 13 2020, Charlene Wendling <[hidden email]> wrote:
>> On Wed, 12 Feb 2020 13:26:30 +0000
>> Stuart Henderson wrote:
>>
>>> On 2020/02/12 10:57, Landry Breuil wrote:
>>> > One think we should make sure to check is arch coverage, ie check
>>> > which archs provide a 'working' (building, running ?) qtwebkit and
>>> > try to testbuild this update on those...
>>>
>>> FWIW the list for the in-tree version is:
>>>
>>> aarch64
>>> amd64
>>> i386
>> powerpc build ok runtime ok, javascript broken
>>> sparc64
>>>
>>
>> I needed 3 fixes to get it built on powerpc in
>> Source/JavaScriptCore/heap/MachineStackMarker.cpp:
>>
>> - Fix a trailing '#' in our patch, this fixes the build with gcc
>> - It missed an ifdef for archs where JS JIT is disabled
>> - Work around the lack of ucontext on OpenBSD (powerpc specific, thanks
>>   to sthen for the tip)
>>
>> I built otter-browser next, the runtime is good as long as javascript
>> is disabled. I'll try to investigate the issue, but i don't think i'll
>> be able to fix that. I can't cross test against another browser because
>> there is none other available in the tree.
>>
>> In any case, it works better than its GTK counterpart on powerpc, i'm
>> fine seeing it committed despite the runtime issues as far as powerpc is
>> concerned.
>>
>> Here is a diff with my changes in, i diffed it against Rafael's one, and
>> it seems i've not messed up.
>
> Two problems hit so far on sparc64, one within a cmake file (unknown
> CPU), the other in a .h where we should define JSVALUE64 for this
> architecture.  Build ongoing.

make package successful on sparc64.

I'm not sure whether the JIT should be enabled or not on sparc64, the
JIT-enabled architectures list in the port Makefile doesn't list sparc64
but some patches seem to implement JIT support on this platform.
*shrug*

Updated diff below which moves post-install, there's no point adding
more stuff after .include <bsd.port.mk>.  I haven't looked closely at
the rest of the diff.


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile 25 Jan 2018 15:02:25 -0000 1.60
+++ Makefile 14 Feb 2020 12:04:21 -0000
@@ -31,7 +31,6 @@
      SUBDIR += qtvirtualkeyboard
      SUBDIR += qtwebchannel
      SUBDIR += qtwebkit
-     SUBDIR += qtwebkit-examples
      SUBDIR += qtwebsockets
      SUBDIR += qtx11extras
      SUBDIR += qtxmlpatterns
Index: Makefile.version
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile.version,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.version
--- Makefile.version 5 Nov 2019 10:18:53 -0000 1.8
+++ Makefile.version 14 Feb 2020 12:04:21 -0000
@@ -3,7 +3,7 @@
 
 QT5_VERSION = 5.9.8
 QT5_DIST_VERSION = 5.9.8
-QT5_WEBKIT_VERSION = 5.9.0
+QT5_WEBKIT_VERSION = 5.212.0
 
 # This one is used for building dependencies for examples and documentation,
 # which obviously should be in sync with core packages.
Index: docs/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/docs/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- docs/Makefile 6 Nov 2019 17:12:15 -0000 1.9
+++ docs/Makefile 14 Feb 2020 12:04:21 -0000
@@ -6,6 +6,7 @@ COMMENT-qch = qdoc-compiled documentati
 PKGNAME = qt5-docs-${QT5_VERSION}
 PKGNAME-html = qt5-html-${QT5_VERSION}
 PKGNAME-qch = qt5-qch-${QT5_VERSION}
+WEBKIT_DOCS_VERSION = 5.9.0
 
 MULTI_PACKAGES = -html -qch
 SUBPACKAGE ?= -html
@@ -48,10 +49,10 @@ DOC_COMPONENTS = \
  qtx11extras \
  qtxmlpatterns
 
-MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
-MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
+MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
+MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
 DISTFILES = ${DOC_COMPONENTS:Nqtwebkit:C/$/-opensource-src-${QT5_DIST_VERSION}${EXTRACT_SUFX}/}:0
-DISTFILES += qtwebkit-opensource-src-${QT5_WEBKIT_VERSION}${EXTRACT_SUFX}:1
+DISTFILES += qtwebkit-opensource-src-${WEBKIT_DOCS_VERSION}${EXTRACT_SUFX}:1
 
 MODQT5_USE_CXX11 = No
 CONFIGURE_STYLE = none
Index: qtwebkit/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- qtwebkit/Makefile 7 Jan 2020 20:22:08 -0000 1.17
+++ qtwebkit/Makefile 14 Feb 2020 12:04:21 -0000
@@ -1,29 +1,50 @@
 # $OpenBSD: Makefile,v 1.17 2020/01/07 20:22:08 zhuk Exp $
 
-QT5NAME = QtWebkit
-REVISION = 11
-COMMENT = old Webkit integration framework for Qt
+COMMENT = QtWebKit with a more modern WebKit code base
+
 USE_WXNEEDED = Yes
+
+CATEGORIES = www
+
 DPB_PROPERTIES = parallel
-VERSION = ${QT5_WEBKIT_VERSION}
-DIST_VERSION = ${QT5_WEBKIT_VERSION}
 
-SHARED_LIBS += Qt5WebKit 2.1
-SHARED_LIBS += Qt5WebKitWidgets 2.1
+VERSION = ${QT5_WEBKIT_VERSION}
+DISTNAME = qtwebkit-${QT5_WEBKIT_VERSION}-alpha3
+PKGNAME = qtwebkit-${QT5_WEBKIT_VERSION}
 
-CATEGORIES = www
+SHARED_LIBS +=  Qt5WebKit               3.0 # 5.9
+SHARED_LIBS +=  Qt5WebKitWidgets        3.0 # 5.9
+SHARED_LIBS +=  JavaScriptCore          0.0 # 5.212.9
+SHARED_LIBS +=  WebCore                 0.0 # 5.212.9
+SHARED_LIBS +=  WebKit2                 0.0 # 5.212.9
+SHARED_LIBS +=  WTF                     0.0 # 5.212.9
+
+# Mostly LGPLv2.1 or LGPLv3 for code; FDLv1.3 for documentation.
+# Some third-party parts are BSD-licensed.
+# Also, many parts have are dual-licensed having either commercial, GPL,
+# Apache 2.0 or other type of license as an alternative option.
+# A few components, including QtWebEngine, are LGPLv3 only, no LGPLv2.1.
+PERMIT_PACKAGE = Yes
+
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5Positioning
+WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5WebChannel
+WANTLIB += Qt5Widgets X11 Xcomposite Xrender c gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstfft-1.0
+WANTLIB += gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 gstvideo-1.0
+WANTLIB += hyphen icui18n icuuc jpeg m png sqlite3 webp xml2 xslt
+
+MASTER_SITES = https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+MODULES = devel/cmake \
+ lang/ruby \
+ x11/qt5
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5OpenGL
-WANTLIB += Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors
-WANTLIB += Qt5Sql Qt5WebChannel Qt5Widgets X11 Xext Xrender c
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0
-WANTLIB += gstbase-1.0 gstpbutils-1.0 gstreamer-1.0 gstvideo-1.0
-WANTLIB += icudata icui18n icuuc intl jpeg m png sqlite3 webp
-WANTLIB += xml2 xslt z
+# Override to unbreak ninja build
+CONFIGURE_STYLE = cmake
 
-MASTER_SITES = https://download.qt.io/community_releases/${DIST_VERSION:R}/${DIST_VERSION}-final/
+# Remove default "first" target and build all
+ALL_TARGET =
 
-MODULES = perl lang/python lang/ruby
 MODPY_RUNDEP = No
 MODRUBY_RUNDEP = No
 
@@ -43,75 +64,73 @@ LIB_DEPENDS = databases/sqlite3 \
  multimedia/gstreamer1/plugins-base \
  textproc/icu4c \
  textproc/libxslt \
+ graphics/libwebp \
+ textproc/hyphen \
  x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtlocation>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtsensors>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtwebchannel>=${QT5_VERSION},<${QT5_NEXT_VERSION}
 
-MAKE_ENV = NINJA_PATH="${LOCALBASE}/bin/ninja" \
- PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-MAKE_FLAGS = PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-FLAVORS = debug
-PSEUDO_FLAVORS = no_tests
-
-#MODQMAKE_ARGS = WEBKIT_CONFIG+=web_audio
+CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
+ -DENABLE_API_TESTS=OFF \
+ -DENABLE_QT_WEBCHANNEL=ON \
+ -DENABLE_TOOLS=OFF \
+ -DPORT=Qt \
+ -DSHARED_CORE=ON \
+ -DUSE_GSTREAMER=ON \
+ -DUSE_LD_GOLD=OFF \
+ -DUSE_QT_MULTIMEDIA=OFF \
+ -DUSE_SYSTEM_MALLOC=ON \
+ -DUSE_WOFF2=OFF
+
+CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX="${WRKINST}${TRUEPREFIX}" \
+ -DECM_MKSPECS_INSTALL_DIR=${WRKINST}${MODQT_LIBDIR}/mkspecs/modules \
+ -DKDE_INSTALL_INCLUDEDIR=${WRKINST}${MODQT_INCDIR} \
+ -DKDE_INSTALL_LIBEXECDIR=${WRKINST}${MODQT_LIBDIR}/libexec \
+ -DKDE_INSTALL_SHAREDSTATEDIR=/var \
+ -DKDE_INSTALL_SYSCONFDIR=/etc \
+ -DKDE_INSTALL_MANDIR=${WRKINST}/man \
+ -DKDE_INSTALL_QTPLUGINDIR=${WRKINST}${MODQT_LIBDIR}/plugins \
+ -DKDE_INSTALL_LIBDIR=${WRKINST}${MODQT_LIBDIR} \
+ -DKDE_INSTALL_QMLDIR=${WRKINST}${MODQT_LIBDIR}/qml
 
 # See qtbase/tests/README for details
 TEST_IS_INTERACTIVE = X11
 TEST_DEPENDS = ${MODPY_RUN_DEPENDS} \
  ${MODRUBY_RUN_DEPENDS} \
- audio/sox \
- kde4-minimal-*|kdebase-*:meta/kde4,-minimal
+ audio/sox
+
+.include <bsd.port.arch.mk>
 
-pre-configure:
- # Python and Ruby are used for building mainly, those paths
- # do not get into final packages.
- ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
- ln -sf ${RUBY} ${WRKDIR}/bin/ruby
-
- cd ${WRKSRC}; ${MODPY_BIN_ADJ} \
- `find . -name '*.py'` \
- `egrep -Rl '(env |bin/)python' Tools` \
- Source/WebCore/inspector/generate-inspector-protocol-version \
- Source/WebCore/html/parser/create-html-entity-table
-
- cd ${WRKSRC}; ${MODRUBY_RUBY_ADJ} \
- `find . -name '*.rb'` \
- Tools/Scripts/check-for-webkit-framework-include-consistency \
- Tools/Scripts/display-profiler-output \
- Tools/Scripts/check-for-inappropriate-macros-in-external-headers \
- Tools/Scripts/roll-over-ChangeLogs \
- Tools/Scripts/check-for-inappropriate-files-in-framework \
- Tools/Scripts/test-webkitruby \
- Tools/Scripts/clean-header-guards \
- Tools/Scripts/bencher \
- Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator \
- Source/WebCore/make-export-file-generator \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
-
- cd ${WRKSRC}; perl -pi.otheradj \
- -e 's,/usr/bin/(env )?python\b,${MODPY_BIN},g;' \
- -e 's,/usr/bin/(env )?ruby\b,${RUBY},g;' \
- -e 's,(/usr)?/bin/(env )?bash\b,/bin/ksh,g;' \
- Tools/BuildSlaveSupport/gtk/pulseaudio/run \
- Tools/Scripts/old-run-webkit-tests \
- Tools/Scripts/run-webkit-websocketserver \
- Tools/Scripts/webkitpy/common/system/executive_unittest.py
-
- cd ${WRKSRC}; perl -pi.symname \
- -e 's/^__/_/;' \
- qtwebkit/Source/JavaScriptCore/JavaScriptCore.order
-
- cd ${WRKSRC}/Tools/qmake/config.tests; perl -pi.objdir \
- -e 's/^OBJECTS_DIR/#$$&/;' \
- */*.pro
+# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
+.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
+    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
+    ${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el" && \
+    ${MACHINE_ARCH} != "sh"
+# #error "The MacroAssembler is not supported on this platform."
+CONFIGURE_ARGS += -DENABLE_JIT=OFF
+CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
+.endif
+
+# ld.lld does not have this option
+# save memory on 32bit arches
+.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
+LDFLAGS += -Wl,--no-keep-memory
+.endif
+
+# __sync_add_and_fetch_8
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS += -march=i686
+CXXFLAGS += -march=i686
+.endif
+
+post-install:
+ find ${WRKINST} -type f -print0 | xargs -0r perl -pi \
+ -e 's,${WRKINST},,g;'
 
 .include <bsd.port.mk>
+
 .if ${CHOSEN_COMPILER} == "base-clang"
 CXXFLAGS += -fno-ret-protector
 .endif
Index: qtwebkit/distinfo
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- qtwebkit/distinfo 17 Jul 2017 08:34:39 -0000 1.2
+++ qtwebkit/distinfo 14 Feb 2020 12:04:21 -0000
@@ -1,2 +1,2 @@
-SHA256 (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = ja0ZO3QAVamYMS4EoEDy4yqSPAgjstI5sk6rCCdqTgQ=
-SIZE (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = 35301288
+SHA256 (qt/qtwebkit-5.212.0-alpha3.tar.xz) = NX7uWCRFV0Ry5BDr7OYy0G+g7JQ1j8Q0XypxOSLfXhc=
+SIZE (qt/qtwebkit-5.212.0-alpha3.tar.xz) = 12457896
Index: qtwebkit/patches/patch-CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-CMakeLists_txt
diff -N qtwebkit/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-CMakeLists_txt 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64
+     set(WTF_CPU_X86_64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+     set(WTF_CPU_X86 1)
+-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+     set(WTF_CPU_PPC 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+     set(WTF_CPU_PPC64 1)
+@@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390
+     set(WTF_CPU_S390 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+     set(WTF_CPU_S390X 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
++ set(WTF_CPU_SPARC64 1)
+ else ()
+     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
+ endif ()
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_API_JSStringRef_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/JavaScriptCore/API/JSStringRef.cpp
---- Source/JavaScriptCore/API/JSStringRef.cpp.orig
-+++ 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(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
- }
-
- JSStringRef JSStringCreateWithUTF8CString(const char* string)
-@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char*
- JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
- {
-     initializeThreading();
--    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
-+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
- }
-
- JSStringRef JSStringRetain(JSStringRef string)
-@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
-
- const JSChar* JSStringGetCharactersPtr(JSStringRef string)
- {
--    return string->characters();
-+    return reinterpret_cast<const JSChar*>(string->characters());
- }
-
- size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/API/ObjCCallbackFunction.h
+--- Source/JavaScriptCore/API/ObjCCallbackFunction.h.orig
++++ Source/JavaScriptCore/API/ObjCCallbackFunction.h
+@@ -29,7 +29,7 @@
+
+ #if JSC_OBJC_API_ENABLED
+
+-#import <JavaScriptCore/JSCallbackFunction.h>
++#import <JavaScriptCore/API/JSCallbackFunction.h>
+
+ #if defined(__OBJC__)
+ JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/CMakeLists.txt
+--- Source/JavaScriptCore/CMakeLists.txt.orig
++++ Source/JavaScriptCore/CMakeLists.txt
+@@ -1286,6 +1286,7 @@ elseif (WTF_CPU_S390)
+ elseif (WTF_CPU_S390X)
+ elseif (WTF_CPU_MIPS)
+ elseif (WTF_CPU_SH4)
++elseif (WTF_CPU_SPARC64)
+ elseif (WTF_CPU_X86)
+ elseif (WTF_CPU_X86_64)
+     if (MSVC AND ENABLE_JIT)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.2 2017/09/15 07:43:42 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2666,6 +2666,8 @@ class ARM64Assembler { (public)
+     {
+ #if OS(IOS)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(LINUX)
+         size_t page = pageSize();
+         uintptr_t current = reinterpret_cast<uintptr_t>(code);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.3 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARMAssembler.h
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -1128,6 +1128,8 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+
+             linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.4 2018/03/19 08:13:15 ajacoutot Exp $
+
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -36,6 +36,12 @@
+ #include <intrin.h>
+ #endif
+
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+
+ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler, MacroAssemblerX86Common> {
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 14 Feb 2020 12:04:21 -0000
@@ -1,16 +1,14 @@
-$OpenBSD: patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig Fri Dec 26 13:45:46 2014
-+++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp Fri Dec 26 13:48:04 2014
-@@ -152,8 +152,9 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
-         amountOfNodeWhiteSpace = 0;
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+--- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig
++++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+@@ -159,7 +159,7 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
      else
          amountOfNodeWhiteSpace = Graph::amountOfNodeWhiteSpace(context);
--    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixLength + amountOfNodeWhiteSpace + 1]);
+     auto prefixBuffer = std::make_unique<char[]>(prefixLength + amountOfNodeWhiteSpace + 1);
 -    strcpy(prefixBuffer.get(), prefix);
-+    size_t prefixBufferSize = prefixLength + amountOfNodeWhiteSpace + 1;
-+    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixBufferSize]);
-+    memcpy(prefixBuffer.get(), prefix, prefixBufferSize);
++    memcpy(prefixBuffer.get(), prefix, prefixLength);
      for (int i = 0; i < amountOfNodeWhiteSpace; ++i)
          prefixBuffer[i + prefixLength] = ' ';
      prefixBuffer[prefixLength + amountOfNodeWhiteSpace] = 0;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 14 Feb 2020 12:04:21 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak build.
-Synchronized with WebKit upsteam.
---- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Thu Sep 11 14:48:22 2014
-+++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Wed Jan  7 01:01:51 2015
-@@ -45,6 +45,10 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.cpp
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -49,6 +49,10 @@
 
  #elif OS(UNIX)
 
@@ -14,45 +14,132 @@ Synchronized with WebKit upsteam.
  #include <sys/mman.h>
  #include <unistd.h>
 
-@@ -311,6 +315,8 @@ typedef arm_thread_state_t PlatformThreadRegisters;
- typedef CONTEXT PlatformThreadRegisters;
- #elif OS(QNX)
- typedef struct _debug_thread_info PlatformThreadRegisters;
-+#elif OS(OPENBSD)
-+typedef pthread_t PlatformThreadRegisters;
- #elif USE(PTHREADS)
- typedef pthread_attr_t PlatformThreadRegisters;
- #else
-@@ -369,6 +375,8 @@ static size_t getPlatformThreadRegisters(const Platfor
+@@ -86,11 +90,13 @@ static void pthreadSignalHandlerSuspendResume(int, sig
      }
-     close(fd);
-     return sizeof(struct _debug_thread_info);
+
+     ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
+-#if CPU(PPC)
++
++// XXX we don't have ucontext || fix an error on powerpc
++#if CPU(PPC) && !OS(OPENBSD)
+     thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+ #else
+-    thread->suspendedMachineContext = userContext->uc_mcontext;
+-#endif
++    thread->suspendedMachineContext = *userContext;
++#endif
+
+     // Allow suspend caller to see that this thread is suspended.
+     // sem_post is async-signal-safe function. It means that we can call this from a signal handler.
+@@ -566,6 +572,25 @@ void* MachineThreads::Thread::Registers::stackPointer(
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD) && ENABLE(JIT)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_edx);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[5]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsi);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__) && ENABLE(JIT)
+
+ #if CPU(X86)
+@@ -632,6 +657,7 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++
+ #endif // __DARWIN_UNIX03
+
+ // end OS(DARWIN)
+@@ -665,6 +691,25 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
 +#elif OS(OPENBSD)
-+    regs = platformThread;
- #elif USE(PTHREADS)
-     pthread_attr_init(&regs);
- #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
-@@ -437,7 +445,14 @@ static inline void* otherThreadStackPointer(const Plat
- #elif USE(PTHREADS)
-     void* stackBase = 0;
-     size_t stackSize = 0;
-+#if OS(OPENBSD)
-+    stack_t ss;
-+    int rc = pthread_stackseg_np(regs, &ss);
-+    stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
-+    stackSize = ss.ss_size;
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_esp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[29]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rsp);
 +#else
-     int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#error Unknown Architecture
 +#endif
-     (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
-     ASSERT(stackBase);
-     return static_cast<char*>(stackBase) + stackSize;
-@@ -448,7 +463,7 @@ static inline void* otherThreadStackPointer(const Plat
-
- static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
- {
--#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
-+#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX) && !OS(OPENBSD)
-     pthread_attr_destroy(&regs);
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -747,6 +792,25 @@ void* MachineThreads::Thread::Registers::instructionPo
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_ebp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rbp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_regs[30]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rbp);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -837,6 +901,25 @@ void* MachineThreads::Thread::Registers::llintPC() con
  #else
-     UNUSED_PARAM(regs);
+ #error Unknown Architecture
+ #endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_eip);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_rip);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_pc);                                                                                                                  
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContex.mc_rip);
++#else
++#error Unknown Architecture
++#endif
++
+
+ #elif defined(__GLIBC__)
+
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.h
+--- Source/JavaScriptCore/heap/MachineStackMarker.h.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.h
+@@ -41,7 +41,10 @@
+ #if OS(FREEBSD)
+ #include <ucontext.h>
+ #endif
++#if OS(OPENBSD)
++typedef ucontext_t mcontext_t;
+ #endif
++#endif
+
+ #if OS(DARWIN)
+ typedef mach_port_t PlatformThread;
+@@ -51,6 +54,7 @@ typedef DWORD PlatformThread;
+ typedef pthread_t PlatformThread;
+ #endif // OS(DARWIN)
+
++
+ namespace JSC {
+
+ class CodeBlockSet;
+@@ -114,7 +118,6 @@ class MachineThreads { (public)
+ #else
+ #error Need a thread register struct for this platform
+ #endif
+-            
+             PlatformRegisters regs;
+         };
+        
Index: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,11 @@
+$OpenBSD: patch-Source_JavaScriptCore_javascriptcoregtk_pc_in,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig Tue Aug  9 01:03:49 2016
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in Tue Aug  9 01:03:57 2016
+@@ -7,5 +7,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
--- qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 14 Feb 2020 12:04:21 -0000
@@ -1,13 +1,13 @@
-$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Taken from www/webkitgtk4 port, see also:
-https://bugs.webkit.org/show_bug.cgi?id=61137
---- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Tue Feb 17 07:57:12 2015
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.h Wed Apr  8 00:38:31 2015
-@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
- #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
- #if CPU(ARM) || CPU(MIPS)
+$OpenBSD$
+
+Index: Source/JavaScriptCore/jit/ExecutableAllocator.h
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -80,7 +80,8 @@ static const size_t fixedExecutableMemoryPoolSize = FI
  static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
--#elif CPU(X86_64) && !CPU(X32)
+ #elif CPU(ARM64)
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
+-#elif CPU(X86_64)
 +#elif CPU(X86_64) && !CPU(X32) && !OS(OPENBSD)
 +// default limits on OpenBSD are far less than 1GB
  static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
--- qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_jsc_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Enable W^X in QtWebkit's JIT.
-Index: Source/JavaScriptCore/jsc.pro
---- Source/JavaScriptCore/jsc.pro.orig
-+++ Source/JavaScriptCore/jsc.pro
-@@ -30,4 +30,5 @@ wince* {
- # Prevent warnings about difference in visibility on Mac OS X
- qtConfig(reduce_exports):CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations):CONFIG += bsymbolic_functions
-+openbsd:DEFINES *= ASSEMBLER_WX_EXCLUSIVE=1
-
Index: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
diff -N qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
--- qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp.orig Fri Dec 26 13:50:19 2014
-+++ Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp Fri Dec 26 13:53:09 2014
-@@ -107,17 +107,13 @@ void InfoLog::append(const char *format, ...)
-     if (!mInfoLog)
-     {
-         mInfoLog = new char[infoLength + 2];
--        strcpy(mInfoLog, info);
--        strcpy(mInfoLog + infoLength, "\n");
-+        snprintf(mInfoLog, infoLength + 2, "%s\n", info);
-     }
-     else
-     {
-         size_t logLength = strlen(mInfoLog);
-         char *newLog = new char[logLength + infoLength + 2];
--        strcpy(newLog, mInfoLog);
--        strcpy(newLog + logLength, info);
--        strcpy(newLog + logLength + infoLength, "\n");
--
-+        snprintf(mInfoLog, logLength + infoLength + 2, "%s%s\n", mInfoLog, info);
-         delete[] mInfoLog;
-         mInfoLog = newLog;
-     }
Index: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
diff -N qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -188,6 +188,7 @@
+ #include <iostream>  // NOLINT
+ #include <sstream>  // NOLINT
+ #include <string>  // NOLINT
++#include <unistd.h>
+
+ #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
+ #define GTEST_FLAG_PREFIX_ "gtest_"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
diff -N qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/Assertions.cpp
+--- Source/WTF/wtf/Assertions.cpp.orig
++++ Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || OS(OPENBSD) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* fil
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) || (OS(OPENBSD)) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -259,7 +259,7 @@ void WTFReportBacktrace()
+     WTFPrintBacktrace(samples + framesToSkip, frames - framesToSkip);
+ }
+
+-#if OS(DARWIN) || OS(LINUX)
++#if OS(DARWIN) || OS(LINUX) || OS(OPENBSD)
+ #  if PLATFORM(QT) || PLATFORM(GTK)
+ #    if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #      define USE_BACKTRACE_SYMBOLS 1
Index: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ 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(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Platform_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WTF_wtf_Platform_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_WTF_wtf_Platform_h
--- qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 14 Feb 2020 12:04:21 -0000
@@ -1,15 +1,29 @@
-$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Use system malloc(3).
---- Source/WTF/wtf/Platform.h.orig Tue Feb 17 07:57:01 2015
-+++ Source/WTF/wtf/Platform.h Wed Apr  8 00:38:31 2015
-@@ -724,6 +724,10 @@
- #endif
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.12 2018/03/19 08:13:15 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -155,6 +155,13 @@
+ #define WTF_CPU_BIG_ENDIAN 1
  #endif
 
-+#if PLATFORM(OPENBSD)
-+#define USE_SYSTEM_MALLOC 1
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
 +#endif
 +
- #if PLATFORM(EFL)
- #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
- #endif
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
+@@ -707,6 +714,7 @@
+     || CPU(S390X) \
+     || CPU(MIPS64) \
+     || CPU(PPC64) \
++    || CPU(SPARC64) \
+     || CPU(PPC64LE)
+ #define USE_JSVALUE64 1
+ #else
Index: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
--- qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_RandomNumberSeed_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Source/WTF/wtf/RandomNumberSeed.h.orig Fri Dec 19 23:00:04 2014
-+++ Source/WTF/wtf/RandomNumberSeed.h Fri Dec 19 23:01:03 2014
-@@ -55,6 +55,8 @@ inline void initializeRandomNumberGenerator()
-     timeval time;
-     gettimeofday(&time, 0);
-     srandom(static_cast<unsigned>(time.tv_usec * getpid()));
-+#elif OS(OPENBSD)
-+    // On OpenBSD we use arc4random() which initialises itself
- #else
-     srand(static_cast<unsigned>(time(0)));
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
--- qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_TypeTraits_h,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WTF/wtf/TypeTraits.h
---- Source/WTF/wtf/TypeTraits.h.orig
-+++ Source/WTF/wtf/TypeTraits.h
-@@ -72,6 +72,9 @@ namespace WTF {
-     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
-     template<> struct IsInteger<long long>          { static const bool value = true; };
-     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
-+#endif
- #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)  || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
Index: qtwebkit/patches/patch-Source_WebCore_Target_pri
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_Target_pri
diff -N qtwebkit/patches/patch-Source_WebCore_Target_pri
--- qtwebkit/patches/patch-Source_WebCore_Target_pri 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WebCore_Target_pri,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebCore/Target.pri.orig Tue Feb 17 07:57:09 2015
-+++ Source/WebCore/Target.pri Wed Apr  8 00:38:31 2015
-@@ -4280,6 +4280,12 @@ win32:!mingw:contains(QMAKE_HOST.arch, x86_64):{
-    }
- }
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include/libsoup-2.4
-+    INCLUDEPATH += $(LOCALBASE)/include/harfbuzz
-+    INCLUDEPATH += $(X11BASE)/include/freetype2
-+}
-+
- contains(CONFIG, opengl-shims) {
-     HEADERS += platform/graphics/OpenGLShims.h
-     SOURCES += platform/graphics/OpenGLShims.cpp
Index: qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Source_WebCore_dom_Document_cpp
--- qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 14 Feb 2020 12:04:21 -0000
@@ -5,7 +5,7 @@ Fix build with icu4c >=65
 Index: Source/WebCore/dom/Document.cpp
 --- Source/WebCore/dom/Document.cpp.orig
 +++ Source/WebCore/dom/Document.cpp
-@@ -3846,12 +3846,12 @@ static bool isValidNameNonASCII(const UChar* character
+@@ -4407,12 +4407,12 @@ static bool isValidNameNonASCII(const UChar* character
      unsigned i = 0;
 
      UChar32 c;
@@ -20,12 +20,12 @@ Index: Source/WebCore/dom/Document.cpp
          if (!isValidNamePart(c))
              return false;
      }
-@@ -3914,7 +3914,7 @@ bool Document::parseQualifiedName(const String& qualif
-     const UChar* s = qualifiedName.characters();
+@@ -4474,7 +4474,7 @@ bool Document::parseQualifiedName(const String& qualif
+
      for (unsigned i = 0; i < length;) {
          UChar32 c;
--        U16_NEXT(s, i, length, c)
-+        U16_NEXT(s, i, length, c);
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
          if (c == ':') {
              if (sawColon) {
                  ec = NAMESPACE_ERR;
Index: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -31,7 +31,7 @@
+ #include <wtf/NeverDestroyed.h>
+ #include <wtf/text/WTFString.h>
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
--- qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/graphics/SegmentedFontData.cpp
---- Source/WebCore/platform/graphics/SegmentedFontData.cpp.orig
-+++ Source/WebCore/platform/graphics/SegmentedFontData.cpp
-@@ -61,7 +61,7 @@ bool SegmentedFontData::containsCharacters(const UChar
- {
-     UChar32 c;
-     for (int i = 0; i < length; ) {
--        U16_NEXT(characters, i, length, c)
-+        U16_NEXT(characters, i, length, c);
-         if (!containsCharacter(c))
-             return false;
-     }
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+@@ -33,7 +33,7 @@ struct GraphicsSurfaceToken {
+
+ #if OS(DARWIN)
+     typedef mach_port_t BufferHandle;
+-#elif OS(LINUX)
++#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+     typedef uint32_t BufferHandle;
+ #elif OS(WINDOWS)
+     typedef HANDLE BufferHandle;
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+@@ -34,7 +34,7 @@ typedef struct __IOSurface* IOSurfaceRef;
+ typedef IOSurfaceRef PlatformGraphicsSurface;
+ #endif
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ typedef uint32_t PlatformGraphicsSurface;
+ #endif
+
Index: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
diff -N qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
--- qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
---- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.orig
-+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
-@@ -175,7 +175,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UC
-     int32_t i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(buffer, i, length, c)
-+        U16_NEXT(buffer, i, length, c);
-         UErrorCode error = U_ZERO_ERROR;
-         UScriptCode script = uscript_getScript(c, &error);
-         if (error != U_ZERO_ERROR) {
-@@ -746,7 +746,7 @@ static CFStringRef createStringWithEscapedUnsafeCharac
-     CFIndex i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(sourceBuffer, i, length, c)
-+        U16_NEXT(sourceBuffer, i, length, c);
-        
-         if (isLookalikeCharacter(c)) {
-             uint8_t utf8Buffer[4];
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginPackageQt.cpp.orig Tue Oct 13 07:37:21 2015
-+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp Thu Dec 10 09:05:23 2015
-@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0)
-         }
-     }
-
--    QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgtk-x11-2.0"));
-     if (library.load()) {
-         typedef void *(*gtk_init_check_ptr)(int*, char***);
-         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginViewQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginViewQt.cpp.orig Fri Dec 26 02:28:55 2014
-+++ Source/WebCore/plugins/qt/PluginViewQt.cpp Fri Dec 26 02:29:10 2014
-@@ -697,7 +697,7 @@ static Display *getPluginDisplay()
-     // support gdk based plugins (like flash) that use a different X connection.
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
--- qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp.orig Fri Dec 26 02:29:24 2014
-+++ Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp Fri Dec 26 02:29:35 2014
-@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMess
-
- static bool initializeGtk()
- {
--    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"));
-     if (!gtkLibrary.load())
-         return false;
-     typedef void* (*gtk_init_ptr)(void*, void*);
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
--- qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_Shared_API_c_WKString_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WebKit2/Shared/API/c/WKString.cpp
---- Source/WebKit2/Shared/API/c/WKString.cpp.orig
-+++ Source/WebKit2/Shared/API/c/WKString.cpp
-@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
- size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
- {
-     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
--    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
-+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
- }
-
- size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+--- Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp.orig
++++ Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+@@ -68,6 +68,7 @@ Vector<String> pluginsDirectories()
+     result.append("/usr/lib64/mozilla/plugins");
+     result.append("/usr/lib/nsbrowser/plugins");
+     result.append("/usr/lib64/nsbrowser/plugins");
++    result.append("${LOCALBASE}/lib/mozilla/plugins");
+ #endif
+
+     return result;
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.orig Fri Dec 26 02:30:14 2014
-+++ Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp Fri Dec 26 02:30:24 2014
-@@ -64,7 +64,7 @@ static Display* getPluginDisplay()
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_pro,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebKit2/WebProcess.pro.orig Thu Sep 11 14:48:23 2014
-+++ Source/WebKit2/WebProcess.pro Mon Nov 10 20:49:42 2014
-@@ -15,6 +15,10 @@ INCLUDEPATH = \
-     $$PWD/Shared/linux/SandboxProcess/ \
-     $$INCLUDEPATH
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include
-+}
-+
- QT += network webkit
- macx: QT += xml
-
Index: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
diff -N qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+--- Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp.orig
++++ Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+@@ -964,6 +964,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& si
+     if (view->needsLayout())
+         view->layout();
+     view->adjustViewSize();
++
++    if (view->needsLayout())
++        view->layout();
+ }
+
+
Index: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
diff -N qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake 14 Feb 2020 12:04:21 -0000
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_cmake_OptionsCommon_cmake,v 1.12 2017/09/15 07:43:42 ajacoutot Exp $
+
+Our ar(1) is too old and have not support for `T'.
+
+Undefined references to libc functions.
+
+Index: Source/cmake/OptionsCommon.cmake
+--- Source/cmake/OptionsCommon.cmake.orig
++++ Source/cmake/OptionsCommon.cmake
+@@ -19,10 +19,10 @@ option(USE_THIN_ARCHIVES "Produce all static libraries
+ 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 ()
+
+@@ -174,9 +174,9 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
++#    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
++#endif ()
+
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
Index: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
diff -N qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
--- qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_DumpRenderTree_JavaScriptThreading_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/DumpRenderTree/JavaScriptThreading.cpp.orig Fri Dec 19 23:01:59 2014
-+++ Tools/DumpRenderTree/JavaScriptThreading.cpp Fri Dec 19 23:02:47 2014
-@@ -101,7 +101,7 @@ void runJavaScriptThread(void*)
-         }
-
-         // Respawn probabilistically.
--        if (rand() % 5)
-+        if (arc4random_uniform(5))
-             continue;
-
-         MutexLocker locker(javaScriptThreadsMutex());
Index: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_mangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/mangle.cgi.c.orig Fri Dec 26 02:50:45 2014
-+++ Tools/mangleme/mangle.cgi.c Fri Dec 26 02:51:04 2014
-@@ -18,7 +18,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_remangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/remangle.cgi.c.orig Fri Dec 26 02:49:32 2014
-+++ Tools/mangleme/remangle.cgi.c Fri Dec 26 02:50:11 2014
-@@ -17,7 +17,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/gccdepends/gccdepends.pro
---- Tools/qmake/config.tests/gccdepends/gccdepends.pro.orig
-+++ Tools/qmake/config.tests/gccdepends/gccdepends.pro
-@@ -1,27 +1,22 @@
- TEMPLATE = aux
--OBJECTS_DIR = obj
-+#OBJECTS_DIR = obj
- QMAKE_CXXFLAGS += -MD
-
- base_filename = empty
--object_file = $$OBJECTS_DIR/$${base_filename}.o
-+object_file = $${base_filename}.o
- deps_filename = $${base_filename}.d
-
- SOURCES += $${base_filename}.cpp
-
- test.commands = \
--    # Earlier teambuilder and icecream versions would not
--    # respect the -o argument for the .d file, so the file
--    # would end up in the root build dir.
--    test ! -f $${deps_filename} && \
--    \
-     # But it should end up in the OBJECTS_DIR
--    test -f $$OBJECTS_DIR/$${deps_filename} && \
-+    test -f $${deps_filename} && \
-     \
-     # Icecream 0.9.7 and earlier does not ensure that the
-     # target rule matches the path of the .o file, since
-     # the file is compiled into the current dir and then
-     # moved. Verify that we don't hit that case.
--    grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
-+    grep -q \"$${object_file}:\" $${deps_filename} && \
-     \
-     # If everything is all right we mark the test as succeeded
-     echo success > $$basename(PWD)
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_glx_glx_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/glx/glx.pro
---- Tools/qmake/config.tests/glx/glx.pro.orig
-+++ Tools/qmake/config.tests/glx/glx.pro
-@@ -1,4 +1,4 @@
-+CONFIG += opengl x11
- SOURCES = glx.cpp
--OBJECTS_DIR = obj
--LIBS += -lX11 -lGL
-+#OBJECTS_DIR = obj
-
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
---- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig
-+++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXcomposite.cpp
--OBJECTS_DIR = obj
--LIBS += -lXcomposite -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXcomposite ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXrender_libXrender_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXrender/libXrender.pro
---- Tools/qmake/config.tests/libXrender/libXrender.pro.orig
-+++ Tools/qmake/config.tests/libXrender/libXrender.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXrender.cpp
--OBJECTS_DIR = obj
--LIBS += -lXrender -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXrender ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
diff -N qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
--- qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak linking to static libraries by providing exact paths when possible.
-
-Particular problem: system version of leveldb gets picked up due to madness in -L.
---- Tools/qmake/mkspecs/features/functions.prf.orig Mon May 30 14:52:29 2016
-+++ Tools/qmake/mkspecs/features/functions.prf Sat Jul 30 00:00:45 2016
-@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
-         mac {
-             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
-         } else:win32-msvc*|wince*|win32-icc {
-+            LIBS += -L$$path
-             LIBS += -l$$target
-             QMAKE_LFLAGS += /OPT:REF
-         } else {
-             CONFIG *= no_smart_library_merge
--            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
-+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
-         }
--
--        LIBS += -L$$path
-
-         win32-msvc*|wince*|win32-icc {
-             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
Index: qtwebkit/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- qtwebkit/pkg/PLIST 7 Jan 2020 20:22:08 -0000 1.2
+++ qtwebkit/pkg/PLIST 14 Feb 2020 12:04:21 -0000
@@ -1,11 +1,10 @@
-@comment $OpenBSD: PLIST,v 1.2 2020/01/07 20:22:08 zhuk Exp $
+@comment $OpenBSD: PLIST,v 1.1 2017/07/29 00:07:15 zhuk Exp $
 @conflict qt5-<5.6
 @pkgpath x11/qt5/qtwebkit,-main
 include/X11/qt5/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/bytearraytestdata.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qhttpheader_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkreply_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkrequest_p.h
@@ -14,8 +13,6 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebpage_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qtwebsecurityorigin_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebchannelwebkittransport_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebdatabase_p.h
@@ -33,14 +30,12 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebplugindatabase_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebsecurityorigin_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/testwindow.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/util.h
 include/X11/qt5/QtWebKit/QWebDatabase
 include/X11/qt5/QtWebKit/QWebElement
 include/X11/qt5/QtWebKit/QWebElementCollection
+include/X11/qt5/QtWebKit/QWebFullScreenRequest
 include/X11/qt5/QtWebKit/QWebFullScreenVideoHandler
 include/X11/qt5/QtWebKit/QWebHapticFeedbackPlayer
 include/X11/qt5/QtWebKit/QWebHistory
@@ -62,6 +57,7 @@ include/X11/qt5/QtWebKit/QtWebKitVersion
 include/X11/qt5/QtWebKit/qtwebkitversion.h
 include/X11/qt5/QtWebKit/qwebdatabase.h
 include/X11/qt5/QtWebKit/qwebelement.h
+include/X11/qt5/QtWebKit/qwebfullscreenrequest.h
 include/X11/qt5/QtWebKit/qwebhistory.h
 include/X11/qt5/QtWebKit/qwebhistoryinterface.h
 include/X11/qt5/QtWebKit/qwebkitglobal.h
@@ -92,25 +88,36 @@ include/X11/qt5/QtWebKitWidgets/qwebfram
 include/X11/qt5/QtWebKitWidgets/qwebinspector.h
 include/X11/qt5/QtWebKitWidgets/qwebpage.h
 include/X11/qt5/QtWebKitWidgets/qwebview.h
+@lib lib/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
 @lib lib/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/libWTF.so.${LIBWTF_VERSION}
+@lib lib/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 lib/qt5/cmake/Qt5WebKit/
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfigVersion.cmake
+lib/qt5/cmake/Qt5WebKit/WebKitTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
-lib/qt5/libQt5WebKit.la
-lib/qt5/libQt5WebKit.prl
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
+@static-lib lib/qt5/libANGLESupport.a
+@lib lib/qt5/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/qt5/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
-lib/qt5/libQt5WebKitWidgets.la
-lib/qt5/libQt5WebKitWidgets.prl
 @lib lib/qt5/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/qt5/libWTF.so.${LIBWTF_VERSION}
+@lib lib/qt5/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/qt5/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/qt5/libexec/
+@bin lib/qt5/libexec/QtWebNetworkProcess
 @bin lib/qt5/libexec/QtWebPluginProcess
 @bin lib/qt5/libexec/QtWebProcess
+@bin lib/qt5/libexec/QtWebStorageProcess
 lib/qt5/mkspecs/modules/qt_lib_webkit.pri
 lib/qt5/mkspecs/modules/qt_lib_webkit_private.pri
 lib/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri




--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Landry Breuil-5
In reply to this post by Stuart Henderson
On Wed, Feb 12, 2020 at 01:26:30PM +0000, Stuart Henderson wrote:

> On 2020/02/12 10:57, Landry Breuil wrote:
> > One think we should make sure to check is arch coverage, ie check which
> > archs provide a 'working' (building, running ?) qtwebkit and try to
> > testbuild this update on those...
>
> FWIW the list for the in-tree version is:
>
> aarch64
> amd64
> i386

i386 fails on the jit or something related:

../Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:4400:52: error: ambiguous conversion for functional-style cast from 'uintptr_t' (aka 'unsigned long') to 'JSC::DFG::OpInfo'                                                                                                                        Node* value = addToGraph(nodeType, OpInfo(operand), OpInfo(prediction));

../Source/JavaScriptCore/dfg/DFGNode.h:227:14: note: candidate constructor                                                                     explicit OpInfo(int32_t value) : m_value(static_cast<uintptr_t>(value)) { }                                                                         ^                                                                                                                             ../Source/JavaScriptCore/dfg/DFGNode.h:228:14: note: candidate constructor                                                                     explicit OpInfo(uint32_t value) : m_value(static_cast<uintptr_t>(value)) { }                                                                        ^      

with the 5 same errors layer on in the file.

Reply | Threaded
Open this post in threaded view
|

Re: UPDATE: x11/qt5/qtwebkit

Rafael Sadowski
In reply to this post by Jeremie Courreges-Anglas-2
On Fri Feb 14, 2020 at 01:13:25PM +0100, Jeremie Courreges-Anglas wrote:

> On Thu, Feb 13 2020, Jeremie Courreges-Anglas <[hidden email]> wrote:
> > On Thu, Feb 13 2020, Charlene Wendling <[hidden email]> wrote:
> >> On Wed, 12 Feb 2020 13:26:30 +0000
> >> Stuart Henderson wrote:
> >>
> >>> On 2020/02/12 10:57, Landry Breuil wrote:
> >>> > One think we should make sure to check is arch coverage, ie check
> >>> > which archs provide a 'working' (building, running ?) qtwebkit and
> >>> > try to testbuild this update on those...
> >>>
> >>> FWIW the list for the in-tree version is:
> >>>
> >>> aarch64
> >>> amd64
> >>> i386
> >> powerpc build ok runtime ok, javascript broken
> >>> sparc64
> >>>
> >>
> >> I needed 3 fixes to get it built on powerpc in
> >> Source/JavaScriptCore/heap/MachineStackMarker.cpp:
> >>
> >> - Fix a trailing '#' in our patch, this fixes the build with gcc
> >> - It missed an ifdef for archs where JS JIT is disabled
> >> - Work around the lack of ucontext on OpenBSD (powerpc specific, thanks
> >>   to sthen for the tip)
> >>
> >> I built otter-browser next, the runtime is good as long as javascript
> >> is disabled. I'll try to investigate the issue, but i don't think i'll
> >> be able to fix that. I can't cross test against another browser because
> >> there is none other available in the tree.
> >>
> >> In any case, it works better than its GTK counterpart on powerpc, i'm
> >> fine seeing it committed despite the runtime issues as far as powerpc is
> >> concerned.
> >>
> >> Here is a diff with my changes in, i diffed it against Rafael's one, and
> >> it seems i've not messed up.
> >
> > Two problems hit so far on sparc64, one within a cmake file (unknown
> > CPU), the other in a .h where we should define JSVALUE64 for this
> > architecture.  Build ongoing.
>
> make package successful on sparc64.
>
> I'm not sure whether the JIT should be enabled or not on sparc64, the
> JIT-enabled architectures list in the port Makefile doesn't list sparc64
> but some patches seem to implement JIT support on this platform.
> *shrug*
>
> Updated diff below which moves post-install, there's no point adding
> more stuff after .include <bsd.port.mk>.  I haven't looked closely at
> the rest of the diff.
>
>

Make package successful on i386. Following changes:

- Tweak: Remove TEST_*, there is no test suite
- Tweak: Remove MACHINE_ARCH sh so keep in sync with www/webkitgtk4
- Add patch-Source_JavaScriptCore_dfg_DFGNode_h to unbreak i386 and
  maybe arm
- Fix a typo in one patch s/machineContex/machineContext/

Finally ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile 25 Jan 2018 15:02:25 -0000 1.60
+++ Makefile 15 Feb 2020 09:05:07 -0000
@@ -31,7 +31,6 @@
      SUBDIR += qtvirtualkeyboard
      SUBDIR += qtwebchannel
      SUBDIR += qtwebkit
-     SUBDIR += qtwebkit-examples
      SUBDIR += qtwebsockets
      SUBDIR += qtx11extras
      SUBDIR += qtxmlpatterns
Index: Makefile.version
===================================================================
RCS file: /cvs/ports/x11/qt5/Makefile.version,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.version
--- Makefile.version 5 Nov 2019 10:18:53 -0000 1.8
+++ Makefile.version 15 Feb 2020 09:05:07 -0000
@@ -3,7 +3,7 @@
 
 QT5_VERSION = 5.9.8
 QT5_DIST_VERSION = 5.9.8
-QT5_WEBKIT_VERSION = 5.9.0
+QT5_WEBKIT_VERSION = 5.212.0
 
 # This one is used for building dependencies for examples and documentation,
 # which obviously should be in sync with core packages.
Index: docs/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/docs/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- docs/Makefile 6 Nov 2019 17:12:15 -0000 1.9
+++ docs/Makefile 15 Feb 2020 09:05:07 -0000
@@ -6,6 +6,7 @@ COMMENT-qch = qdoc-compiled documentati
 PKGNAME = qt5-docs-${QT5_VERSION}
 PKGNAME-html = qt5-html-${QT5_VERSION}
 PKGNAME-qch = qt5-qch-${QT5_VERSION}
+WEBKIT_DOCS_VERSION = 5.9.0
 
 MULTI_PACKAGES = -html -qch
 SUBPACKAGE ?= -html
@@ -48,10 +49,10 @@ DOC_COMPONENTS = \
  qtx11extras \
  qtxmlpatterns
 
-MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
-MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${QT5_WEBKIT_VERSION}-final/
+MASTER_SITES0 = https://download.qt.io/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
+MASTER_SITES1 = https://ftp1.nluug.nl/languages/qt/community_releases/${DIST_VERSION:R}/${WEBKIT_DOCS_VERSION}-final/
 DISTFILES = ${DOC_COMPONENTS:Nqtwebkit:C/$/-opensource-src-${QT5_DIST_VERSION}${EXTRACT_SUFX}/}:0
-DISTFILES += qtwebkit-opensource-src-${QT5_WEBKIT_VERSION}${EXTRACT_SUFX}:1
+DISTFILES += qtwebkit-opensource-src-${WEBKIT_DOCS_VERSION}${EXTRACT_SUFX}:1
 
 MODQT5_USE_CXX11 = No
 CONFIGURE_STYLE = none
Index: qtwebkit/Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- qtwebkit/Makefile 7 Jan 2020 20:22:08 -0000 1.17
+++ qtwebkit/Makefile 15 Feb 2020 09:05:07 -0000
@@ -1,29 +1,50 @@
 # $OpenBSD: Makefile,v 1.17 2020/01/07 20:22:08 zhuk Exp $
 
-QT5NAME = QtWebkit
-REVISION = 11
-COMMENT = old Webkit integration framework for Qt
+COMMENT = QtWebKit with a more modern WebKit code base
+
 USE_WXNEEDED = Yes
+
+CATEGORIES = www
+
 DPB_PROPERTIES = parallel
-VERSION = ${QT5_WEBKIT_VERSION}
-DIST_VERSION = ${QT5_WEBKIT_VERSION}
 
-SHARED_LIBS += Qt5WebKit 2.1
-SHARED_LIBS += Qt5WebKitWidgets 2.1
+VERSION = ${QT5_WEBKIT_VERSION}
+DISTNAME = qtwebkit-${QT5_WEBKIT_VERSION}-alpha3
+PKGNAME = qtwebkit-${QT5_WEBKIT_VERSION}
 
-CATEGORIES = www
+SHARED_LIBS +=  Qt5WebKit               3.0 # 5.9
+SHARED_LIBS +=  Qt5WebKitWidgets        3.0 # 5.9
+SHARED_LIBS +=  JavaScriptCore          0.0 # 5.212.9
+SHARED_LIBS +=  WebCore                 0.0 # 5.212.9
+SHARED_LIBS +=  WebKit2                 0.0 # 5.212.9
+SHARED_LIBS +=  WTF                     0.0 # 5.212.9
+
+# Mostly LGPLv2.1 or LGPLv3 for code; FDLv1.3 for documentation.
+# Some third-party parts are BSD-licensed.
+# Also, many parts have are dual-licensed having either commercial, GPL,
+# Apache 2.0 or other type of license as an alternative option.
+# A few components, including QtWebEngine, are LGPLv3 only, no LGPLv2.1.
+PERMIT_PACKAGE = Yes
+
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5Positioning
+WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5WebChannel
+WANTLIB += Qt5Widgets X11 Xcomposite Xrender c gio-2.0 glib-2.0
+WANTLIB += gobject-2.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0 gstfft-1.0
+WANTLIB += gstpbutils-1.0 gstreamer-1.0 gsttag-1.0 gstvideo-1.0
+WANTLIB += hyphen icui18n icuuc jpeg m png sqlite3 webp xml2 xslt
+
+MASTER_SITES = https://github.com/annulen/webkit/releases/download/${DISTNAME}/
+
+MODULES = devel/cmake \
+ lang/ruby \
+ x11/qt5
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5OpenGL
-WANTLIB += Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors
-WANTLIB += Qt5Sql Qt5WebChannel Qt5Widgets X11 Xext Xrender c
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 gstapp-1.0 gstaudio-1.0
-WANTLIB += gstbase-1.0 gstpbutils-1.0 gstreamer-1.0 gstvideo-1.0
-WANTLIB += icudata icui18n icuuc intl jpeg m png sqlite3 webp
-WANTLIB += xml2 xslt z
+# Override to unbreak ninja build
+CONFIGURE_STYLE = cmake
 
-MASTER_SITES = https://download.qt.io/community_releases/${DIST_VERSION:R}/${DIST_VERSION}-final/
+# Remove default "first" target and build all
+ALL_TARGET =
 
-MODULES = perl lang/python lang/ruby
 MODPY_RUNDEP = No
 MODRUBY_RUNDEP = No
 
@@ -43,75 +64,66 @@ LIB_DEPENDS = databases/sqlite3 \
  multimedia/gstreamer1/plugins-base \
  textproc/icu4c \
  textproc/libxslt \
+ graphics/libwebp \
+ textproc/hyphen \
  x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtlocation>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtsensors>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
  x11/qt5/qtwebchannel>=${QT5_VERSION},<${QT5_NEXT_VERSION}
 
-MAKE_ENV = NINJA_PATH="${LOCALBASE}/bin/ninja" \
- PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-MAKE_FLAGS = PYTHON=${MODPY_BIN} \
- RUBY=${RUBY}
-
-FLAVORS = debug
-PSEUDO_FLAVORS = no_tests
-
-#MODQMAKE_ARGS = WEBKIT_CONFIG+=web_audio
-
-# See qtbase/tests/README for details
-TEST_IS_INTERACTIVE = X11
-TEST_DEPENDS = ${MODPY_RUN_DEPENDS} \
- ${MODRUBY_RUN_DEPENDS} \
- audio/sox \
- kde4-minimal-*|kdebase-*:meta/kde4,-minimal
-
-pre-configure:
- # Python and Ruby are used for building mainly, those paths
- # do not get into final packages.
- ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
- ln -sf ${RUBY} ${WRKDIR}/bin/ruby
-
- cd ${WRKSRC}; ${MODPY_BIN_ADJ} \
- `find . -name '*.py'` \
- `egrep -Rl '(env |bin/)python' Tools` \
- Source/WebCore/inspector/generate-inspector-protocol-version \
- Source/WebCore/html/parser/create-html-entity-table
-
- cd ${WRKSRC}; ${MODRUBY_RUBY_ADJ} \
- `find . -name '*.rb'` \
- Tools/Scripts/check-for-webkit-framework-include-consistency \
- Tools/Scripts/display-profiler-output \
- Tools/Scripts/check-for-inappropriate-macros-in-external-headers \
- Tools/Scripts/roll-over-ChangeLogs \
- Tools/Scripts/check-for-inappropriate-files-in-framework \
- Tools/Scripts/test-webkitruby \
- Tools/Scripts/clean-header-guards \
- Tools/Scripts/bencher \
- Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/make-export-file-generator \
- Source/WebCore/make-export-file-generator \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh \
- Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
-
- cd ${WRKSRC}; perl -pi.otheradj \
- -e 's,/usr/bin/(env )?python\b,${MODPY_BIN},g;' \
- -e 's,/usr/bin/(env )?ruby\b,${RUBY},g;' \
- -e 's,(/usr)?/bin/(env )?bash\b,/bin/ksh,g;' \
- Tools/BuildSlaveSupport/gtk/pulseaudio/run \
- Tools/Scripts/old-run-webkit-tests \
- Tools/Scripts/run-webkit-websocketserver \
- Tools/Scripts/webkitpy/common/system/executive_unittest.py
-
- cd ${WRKSRC}; perl -pi.symname \
- -e 's/^__/_/;' \
- qtwebkit/Source/JavaScriptCore/JavaScriptCore.order
-
- cd ${WRKSRC}/Tools/qmake/config.tests; perl -pi.objdir \
- -e 's/^OBJECTS_DIR/#$$&/;' \
- */*.pro
+CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
+ -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
+ -DENABLE_API_TESTS=OFF \
+ -DENABLE_QT_WEBCHANNEL=ON \
+ -DENABLE_TOOLS=OFF \
+ -DPORT=Qt \
+ -DSHARED_CORE=ON \
+ -DUSE_GSTREAMER=ON \
+ -DUSE_LD_GOLD=OFF \
+ -DUSE_QT_MULTIMEDIA=OFF \
+ -DUSE_SYSTEM_MALLOC=ON \
+ -DUSE_WOFF2=OFF
+
+CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX="${WRKINST}${TRUEPREFIX}" \
+ -DECM_MKSPECS_INSTALL_DIR=${WRKINST}${MODQT_LIBDIR}/mkspecs/modules \
+ -DKDE_INSTALL_INCLUDEDIR=${WRKINST}${MODQT_INCDIR} \
+ -DKDE_INSTALL_LIBEXECDIR=${WRKINST}${MODQT_LIBDIR}/libexec \
+ -DKDE_INSTALL_SHAREDSTATEDIR=/var \
+ -DKDE_INSTALL_SYSCONFDIR=/etc \
+ -DKDE_INSTALL_MANDIR=${WRKINST}/man \
+ -DKDE_INSTALL_QTPLUGINDIR=${WRKINST}${MODQT_LIBDIR}/plugins \
+ -DKDE_INSTALL_LIBDIR=${WRKINST}${MODQT_LIBDIR} \
+ -DKDE_INSTALL_QMLDIR=${WRKINST}${MODQT_LIBDIR}/qml
+
+.include <bsd.port.arch.mk>
+
+# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
+.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
+    ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
+    ${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el"
+# #error "The MacroAssembler is not supported on this platform."
+CONFIGURE_ARGS += -DENABLE_JIT=OFF
+CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
+.endif
+
+# ld.lld does not have this option
+# save memory on 32bit arches
+.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
+LDFLAGS += -Wl,--no-keep-memory
+.endif
+
+# __sync_add_and_fetch_8
+.if ${MACHINE_ARCH} == "i386"
+CFLAGS += -march=i686
+CXXFLAGS += -march=i686
+.endif
+
+post-install:
+ find ${WRKINST} -type f -print0 | xargs -0r perl -pi \
+ -e 's,${WRKINST},,g;'
 
 .include <bsd.port.mk>
+
 .if ${CHOSEN_COMPILER} == "base-clang"
 CXXFLAGS += -fno-ret-protector
 .endif
Index: qtwebkit/distinfo
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- qtwebkit/distinfo 17 Jul 2017 08:34:39 -0000 1.2
+++ qtwebkit/distinfo 15 Feb 2020 09:05:07 -0000
@@ -1,2 +1,2 @@
-SHA256 (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = ja0ZO3QAVamYMS4EoEDy4yqSPAgjstI5sk6rCCdqTgQ=
-SIZE (qt/qtwebkit-opensource-src-5.9.0.tar.xz) = 35301288
+SHA256 (qt/qtwebkit-5.212.0-alpha3.tar.xz) = NX7uWCRFV0Ry5BDr7OYy0G+g7JQ1j8Q0XypxOSLfXhc=
+SIZE (qt/qtwebkit-5.212.0-alpha3.tar.xz) = 12457896
Index: qtwebkit/patches/patch-CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-CMakeLists_txt
diff -N qtwebkit/patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-CMakeLists_txt 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -71,7 +71,7 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64
+     set(WTF_CPU_X86_64 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
+     set(WTF_CPU_X86 1)
+-elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)")
+     set(WTF_CPU_PPC 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+     set(WTF_CPU_PPC64 1)
+@@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390
+     set(WTF_CPU_S390 1)
+ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+     set(WTF_CPU_S390X 1)
++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
++ set(WTF_CPU_SPARC64 1)
+ else ()
+     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
+ endif ()
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_API_JSStringRef_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_API_JSStringRef_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/JavaScriptCore/API/JSStringRef.cpp
---- Source/JavaScriptCore/API/JSStringRef.cpp.orig
-+++ 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(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
- }
-
- JSStringRef JSStringCreateWithUTF8CString(const char* string)
-@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char*
- JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
- {
-     initializeThreading();
--    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
-+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
- }
-
- JSStringRef JSStringRetain(JSStringRef string)
-@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
-
- const JSChar* JSStringGetCharactersPtr(JSStringRef string)
- {
--    return string->characters();
-+    return reinterpret_cast<const JSChar*>(string->characters());
- }
-
- size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_API_ObjCCallbackFunction_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/API/ObjCCallbackFunction.h
+--- Source/JavaScriptCore/API/ObjCCallbackFunction.h.orig
++++ Source/JavaScriptCore/API/ObjCCallbackFunction.h
+@@ -29,7 +29,7 @@
+
+ #if JSC_OBJC_API_ENABLED
+
+-#import <JavaScriptCore/JSCallbackFunction.h>
++#import <JavaScriptCore/API/JSCallbackFunction.h>
+
+ #if defined(__OBJC__)
+ JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_CMakeLists_txt 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/CMakeLists.txt
+--- Source/JavaScriptCore/CMakeLists.txt.orig
++++ Source/JavaScriptCore/CMakeLists.txt
+@@ -1286,6 +1286,7 @@ elseif (WTF_CPU_S390)
+ elseif (WTF_CPU_S390X)
+ elseif (WTF_CPU_MIPS)
+ elseif (WTF_CPU_SH4)
++elseif (WTF_CPU_SPARC64)
+ elseif (WTF_CPU_X86)
+ elseif (WTF_CPU_X86_64)
+     if (MSVC AND ENABLE_JIT)
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.2 2017/09/15 07:43:42 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
+--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
++++ Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2666,6 +2666,8 @@ class ARM64Assembler { (public)
+     {
+ #if OS(IOS)
+         sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
++#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #elif OS(LINUX)
+         size_t page = pageSize();
+         uintptr_t current = reinterpret_cast<uintptr_t>(code);
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_ARMAssembler_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.3 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/JavaScriptCore/assembler/ARMAssembler.h
+--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
++++ Source/JavaScriptCore/assembler/ARMAssembler.h
+@@ -1128,6 +1128,8 @@ namespace JSC {
+                 linuxPageFlush(current, current + page);
+
+             linuxPageFlush(current, end);
++#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
++ __clear_cache(code, reinterpret_cast<char*>(code) + size);
+ #else
+ #error "The cacheFlush support is missing on this platform."
+ #endif
Index: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.4 2018/03/19 08:13:15 ajacoutot Exp $
+
+XXX error: macro "swap32" passed 2 arguments, but takes just 1
+XXX error: macro "swap64" passed 2 arguments, but takes just 1
+
+Index: Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+@@ -36,6 +36,12 @@
+ #include <intrin.h>
+ #endif
+
++/* conflicting definition in endian.h */
++#if OS(OPENBSD)
++#undef swap32
++#undef swap64
++#endif
++
+ namespace JSC {
+
+ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler, MacroAssemblerX86Common> {
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp 15 Feb 2020 09:05:07 -0000
@@ -1,16 +1,14 @@
-$OpenBSD: patch-Source_JavaScriptCore_dfg_DFGDisassembler_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig Fri Dec 26 13:45:46 2014
-+++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp Fri Dec 26 13:48:04 2014
-@@ -152,8 +152,9 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
-         amountOfNodeWhiteSpace = 0;
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+--- Source/JavaScriptCore/dfg/DFGDisassembler.cpp.orig
++++ Source/JavaScriptCore/dfg/DFGDisassembler.cpp
+@@ -159,7 +159,7 @@ void Disassembler::dumpDisassembly(PrintStream& out, c
      else
          amountOfNodeWhiteSpace = Graph::amountOfNodeWhiteSpace(context);
--    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixLength + amountOfNodeWhiteSpace + 1]);
+     auto prefixBuffer = std::make_unique<char[]>(prefixLength + amountOfNodeWhiteSpace + 1);
 -    strcpy(prefixBuffer.get(), prefix);
-+    size_t prefixBufferSize = prefixLength + amountOfNodeWhiteSpace + 1;
-+    OwnArrayPtr<char> prefixBuffer = adoptArrayPtr(new char[prefixBufferSize]);
-+    memcpy(prefixBuffer.get(), prefix, prefixBufferSize);
++    memcpy(prefixBuffer.get(), prefix, prefixLength);
      for (int i = 0; i < amountOfNodeWhiteSpace; ++i)
          prefixBuffer[i + prefixLength] = ' ';
      prefixBuffer[prefixLength + amountOfNodeWhiteSpace] = 0;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGNode_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGNode_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGNode_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_dfg_DFGNode_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/dfg/DFGNode.h
+--- Source/JavaScriptCore/dfg/DFGNode.h.orig
++++ Source/JavaScriptCore/dfg/DFGNode.h
+@@ -226,7 +226,7 @@ struct OpInfo {
+     OpInfo() : m_value(0) { }
+     explicit OpInfo(int32_t value) : m_value(static_cast<uintptr_t>(value)) { }
+     explicit OpInfo(uint32_t value) : m_value(static_cast<uintptr_t>(value)) { }
+-#if OS(DARWIN) || USE(JSVALUE64)
++#if OS(DARWIN) || (CPU(ARM) && OS(OPENBSD)) || (CPU(X86) && OS(OPENBSD)) || USE(JSVALUE64)
+     explicit OpInfo(size_t value) : m_value(static_cast<uintptr_t>(value)) { }
+ #endif
+     explicit OpInfo(void* value) : m_value(reinterpret_cast<uintptr_t>(value)) { }
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
--- qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp 15 Feb 2020 09:05:07 -0000
@@ -1,9 +1,9 @@
-$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak build.
-Synchronized with WebKit upsteam.
---- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Thu Sep 11 14:48:22 2014
-+++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Wed Jan  7 01:01:51 2015
-@@ -45,6 +45,10 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.cpp
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -49,6 +49,10 @@
 
  #elif OS(UNIX)
 
@@ -14,45 +14,132 @@ Synchronized with WebKit upsteam.
  #include <sys/mman.h>
  #include <unistd.h>
 
-@@ -311,6 +315,8 @@ typedef arm_thread_state_t PlatformThreadRegisters;
- typedef CONTEXT PlatformThreadRegisters;
- #elif OS(QNX)
- typedef struct _debug_thread_info PlatformThreadRegisters;
-+#elif OS(OPENBSD)
-+typedef pthread_t PlatformThreadRegisters;
- #elif USE(PTHREADS)
- typedef pthread_attr_t PlatformThreadRegisters;
- #else
-@@ -369,6 +375,8 @@ static size_t getPlatformThreadRegisters(const Platfor
+@@ -86,11 +90,13 @@ static void pthreadSignalHandlerSuspendResume(int, sig
      }
-     close(fd);
-     return sizeof(struct _debug_thread_info);
+
+     ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
+-#if CPU(PPC)
++
++// XXX we don't have ucontext || fix an error on powerpc
++#if CPU(PPC) && !OS(OPENBSD)
+     thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+ #else
+-    thread->suspendedMachineContext = userContext->uc_mcontext;
+-#endif
++    thread->suspendedMachineContext = *userContext;
++#endif
+
+     // Allow suspend caller to see that this thread is suspended.
+     // sem_post is async-signal-safe function. It means that we can call this from a signal handler.
+@@ -566,6 +572,25 @@ void* MachineThreads::Thread::Registers::stackPointer(
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD) && ENABLE(JIT)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_edx);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_rsp);
++#elif CPU(ARM)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.__gregs[_REG_R1]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_x[1]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_regs[5]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_rsi);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__) && ENABLE(JIT)
+
+ #if CPU(X86)
+@@ -632,6 +657,7 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
++
+ #endif // __DARWIN_UNIX03
+
+ // end OS(DARWIN)
+@@ -665,6 +691,25 @@ void* MachineThreads::Thread::Registers::framePointer(
+ #error Unknown Architecture
+ #endif
+
 +#elif OS(OPENBSD)
-+    regs = platformThread;
- #elif USE(PTHREADS)
-     pthread_attr_init(&regs);
- #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
-@@ -437,7 +445,14 @@ static inline void* otherThreadStackPointer(const Plat
- #elif USE(PTHREADS)
-     void* stackBase = 0;
-     size_t stackSize = 0;
-+#if OS(OPENBSD)
-+    stack_t ss;
-+    int rc = pthread_stackseg_np(regs, &ss);
-+    stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
-+    stackSize = ss.ss_size;
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_esp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_rsp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.__gregs[_REG_SP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_sp);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_regs[29]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_rsp);
 +#else
-     int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#error Unknown Architecture
 +#endif
-     (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
-     ASSERT(stackBase);
-     return static_cast<char*>(stackBase) + stackSize;
-@@ -448,7 +463,7 @@ static inline void* otherThreadStackPointer(const Plat
-
- static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
- {
--#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
-+#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX) && !OS(OPENBSD)
-     pthread_attr_destroy(&regs);
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -747,6 +792,25 @@ void* MachineThreads::Thread::Registers::instructionPo
+ #error Unknown Architecture
+ #endif
+
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_ebp);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_rbp);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.__gregs[_REG_FP]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_x[29]);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_regs[30]);
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_rbp);
++#else
++#error Unknown Architecture
++#endif
++
++
+ #elif defined(__GLIBC__)
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+@@ -837,6 +901,25 @@ void* MachineThreads::Thread::Registers::llintPC() con
  #else
-     UNUSED_PARAM(regs);
+ #error Unknown Architecture
+ #endif
++
++#elif OS(OPENBSD)
++
++#if CPU(X86)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_eip);
++#elif CPU(X86_64)
++    //return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_rip);
++#elif CPU(ARM)#
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.__gregs[_REG_PC]);
++#elif CPU(ARM64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.sc_elr);
++#elif CPU(MIPS)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_pc);                                                                                                                  
++#elif CPU(SPARC64)
++    return reinterpret_cast<void*&>((uintptr_t&) regs.machineContext.mc_rip);
++#else
++#error Unknown Architecture
++#endif
++
+
+ #elif defined(__GLIBC__)
+
Index: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/JavaScriptCore/heap/MachineStackMarker.h
+--- Source/JavaScriptCore/heap/MachineStackMarker.h.orig
++++ Source/JavaScriptCore/heap/MachineStackMarker.h
+@@ -41,7 +41,10 @@
+ #if OS(FREEBSD)
+ #include <ucontext.h>
+ #endif
++#if OS(OPENBSD)
++typedef ucontext_t mcontext_t;
+ #endif
++#endif
+
+ #if OS(DARWIN)
+ typedef mach_port_t PlatformThread;
+@@ -51,6 +54,7 @@ typedef DWORD PlatformThread;
+ typedef pthread_t PlatformThread;
+ #endif // OS(DARWIN)
+
++
+ namespace JSC {
+
+ class CodeBlockSet;
+@@ -114,7 +118,6 @@ class MachineThreads { (public)
+ #else
+ #error Need a thread register struct for this platform
+ #endif
+-            
+             PlatformRegisters regs;
+         };
+        
Index: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,11 @@
+$OpenBSD: patch-Source_JavaScriptCore_javascriptcoregtk_pc_in,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+--- Source/JavaScriptCore/javascriptcoregtk.pc.in.orig Tue Aug  9 01:03:49 2016
++++ Source/JavaScriptCore/javascriptcoregtk.pc.in Tue Aug  9 01:03:57 2016
+@@ -7,5 +7,5 @@ Name: JavaScriptCoreGTK+
+ Description: GTK+ version of the JavaScriptCore engine
+ Version: @PROJECT_VERSION@
+ Requires: glib-2.0
+-Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@
++Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ -Wl,-z,wxneeded
+ Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
--- qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h 15 Feb 2020 09:05:07 -0000
@@ -1,13 +1,13 @@
-$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Taken from www/webkitgtk4 port, see also:
-https://bugs.webkit.org/show_bug.cgi?id=61137
---- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Tue Feb 17 07:57:12 2015
-+++ Source/JavaScriptCore/jit/ExecutableAllocator.h Wed Apr  8 00:38:31 2015
-@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
- #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
- #if CPU(ARM) || CPU(MIPS)
+$OpenBSD$
+
+Index: Source/JavaScriptCore/jit/ExecutableAllocator.h
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h
+@@ -80,7 +80,8 @@ static const size_t fixedExecutableMemoryPoolSize = FI
  static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
--#elif CPU(X86_64) && !CPU(X32)
+ #elif CPU(ARM64)
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
+-#elif CPU(X86_64)
 +#elif CPU(X86_64) && !CPU(X32) && !OS(OPENBSD)
 +// default limits on OpenBSD are far less than 1GB
  static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
Index: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
diff -N qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro
--- qtwebkit/patches/patch-Source_JavaScriptCore_jsc_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-Source_JavaScriptCore_jsc_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Enable W^X in QtWebkit's JIT.
-Index: Source/JavaScriptCore/jsc.pro
---- Source/JavaScriptCore/jsc.pro.orig
-+++ Source/JavaScriptCore/jsc.pro
-@@ -30,4 +30,5 @@ wince* {
- # Prevent warnings about difference in visibility on Mac OS X
- qtConfig(reduce_exports):CONFIG += hide_symbols
- unix:qtConfig(reduce_relocations):CONFIG += bsymbolic_functions
-+openbsd:DEFINES *= ASSEMBLER_WX_EXCLUSIVE=1
-
Index: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
diff -N qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp
--- qtwebkit/patches/patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-Source_ThirdParty_ANGLE_src_libGLESv2_Program_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Avoid strcpy().
---- Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp.orig Fri Dec 26 13:50:19 2014
-+++ Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp Fri Dec 26 13:53:09 2014
-@@ -107,17 +107,13 @@ void InfoLog::append(const char *format, ...)
-     if (!mInfoLog)
-     {
-         mInfoLog = new char[infoLength + 2];
--        strcpy(mInfoLog, info);
--        strcpy(mInfoLog + infoLength, "\n");
-+        snprintf(mInfoLog, infoLength + 2, "%s\n", info);
-     }
-     else
-     {
-         size_t logLength = strlen(mInfoLog);
-         char *newLog = new char[logLength + infoLength + 2];
--        strcpy(newLog, mInfoLog);
--        strcpy(newLog + logLength, info);
--        strcpy(newLog + logLength + infoLength, "\n");
--
-+        snprintf(mInfoLog, logLength + infoLength + 2, "%s%s\n", mInfoLog, info);
-         delete[] mInfoLog;
-         mInfoLog = newLog;
-     }
Index: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
diff -N qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
+@@ -188,6 +188,7 @@
+ #include <iostream>  // NOLINT
+ #include <sstream>  // NOLINT
+ #include <string>  // NOLINT
++#include <unistd.h>
+
+ #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
+ #define GTEST_FLAG_PREFIX_ "gtest_"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
diff -N qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_Assertions_cpp 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/Assertions.cpp
+--- Source/WTF/wtf/Assertions.cpp.orig
++++ Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || OS(OPENBSD) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* fil
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) || (OS(OPENBSD)) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -259,7 +259,7 @@ void WTFReportBacktrace()
+     WTFPrintBacktrace(samples + framesToSkip, frames - framesToSkip);
+ }
+
+-#if OS(DARWIN) || OS(LINUX)
++#if OS(DARWIN) || OS(LINUX) || OS(OPENBSD)
+ #  if PLATFORM(QT) || PLATFORM(GTK)
+ #    if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #      define USE_BACKTRACE_SYMBOLS 1
Index: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_InlineASM_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.2 2018/03/19 08:13:15 ajacoutot Exp $
+
+Index: Source/WTF/wtf/InlineASM.h
+--- Source/WTF/wtf/InlineASM.h.orig
++++ 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(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
Index: qtwebkit/patches/patch-Source_WTF_wtf_Platform_h
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WTF_wtf_Platform_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Source_WTF_wtf_Platform_h
--- qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ qtwebkit/patches/patch-Source_WTF_wtf_Platform_h 15 Feb 2020 09:05:07 -0000
@@ -1,15 +1,29 @@
-$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Use system malloc(3).
---- Source/WTF/wtf/Platform.h.orig Tue Feb 17 07:57:01 2015
-+++ Source/WTF/wtf/Platform.h Wed Apr  8 00:38:31 2015
-@@ -724,6 +724,10 @@
- #endif
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.12 2018/03/19 08:13:15 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=129963
+
+Index: Source/WTF/wtf/Platform.h
+--- Source/WTF/wtf/Platform.h.orig
++++ Source/WTF/wtf/Platform.h
+@@ -155,6 +155,13 @@
+ #define WTF_CPU_BIG_ENDIAN 1
  #endif
 
-+#if PLATFORM(OPENBSD)
-+#define USE_SYSTEM_MALLOC 1
++/* CPU(SPARC64) - SPARC V9 */
++#if defined(__sparc64__)
++#define WTF_CPU_KNOWN 1
++#define WTF_CPU_SPARC64 1
++#define WTF_CPU_BIG_ENDIAN 1
 +#endif
 +
- #if PLATFORM(EFL)
- #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
- #endif
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
+@@ -707,6 +714,7 @@
+     || CPU(S390X) \
+     || CPU(MIPS64) \
+     || CPU(PPC64) \
++    || CPU(SPARC64) \
+     || CPU(PPC64LE)
+ #define USE_JSVALUE64 1
+ #else
Index: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h
--- qtwebkit/patches/patch-Source_WTF_wtf_RandomNumberSeed_h 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_RandomNumberSeed_h,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Source/WTF/wtf/RandomNumberSeed.h.orig Fri Dec 19 23:00:04 2014
-+++ Source/WTF/wtf/RandomNumberSeed.h Fri Dec 19 23:01:03 2014
-@@ -55,6 +55,8 @@ inline void initializeRandomNumberGenerator()
-     timeval time;
-     gettimeofday(&time, 0);
-     srandom(static_cast<unsigned>(time.tv_usec * getpid()));
-+#elif OS(OPENBSD)
-+    // On OpenBSD we use arc4random() which initialises itself
- #else
-     srand(static_cast<unsigned>(time(0)));
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h
--- qtwebkit/patches/patch-Source_WTF_wtf_TypeTraits_h 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WTF_wtf_TypeTraits_h,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WTF/wtf/TypeTraits.h
---- Source/WTF/wtf/TypeTraits.h.orig
-+++ Source/WTF/wtf/TypeTraits.h
-@@ -72,6 +72,9 @@ namespace WTF {
-     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
-     template<> struct IsInteger<long long>          { static const bool value = true; };
-     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
-+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
-+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
-+#endif
- #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
-     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
- #endif
Index: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
diff -N qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WTF_wtf_dtoa_utils_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WTF/wtf/dtoa/utils.h
+--- Source/WTF/wtf/dtoa/utils.h.orig
++++ Source/WTF/wtf/dtoa/utils.h
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)  || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
Index: qtwebkit/patches/patch-Source_WebCore_Target_pri
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_Target_pri
diff -N qtwebkit/patches/patch-Source_WebCore_Target_pri
--- qtwebkit/patches/patch-Source_WebCore_Target_pri 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Source_WebCore_Target_pri,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebCore/Target.pri.orig Tue Feb 17 07:57:09 2015
-+++ Source/WebCore/Target.pri Wed Apr  8 00:38:31 2015
-@@ -4280,6 +4280,12 @@ win32:!mingw:contains(QMAKE_HOST.arch, x86_64):{
-    }
- }
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include/libsoup-2.4
-+    INCLUDEPATH += $(LOCALBASE)/include/harfbuzz
-+    INCLUDEPATH += $(X11BASE)/include/freetype2
-+}
-+
- contains(CONFIG, opengl-shims) {
-     HEADERS += platform/graphics/OpenGLShims.h
-     SOURCES += platform/graphics/OpenGLShims.cpp
Index: qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-Source_WebCore_dom_Document_cpp
--- qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ qtwebkit/patches/patch-Source_WebCore_dom_Document_cpp 15 Feb 2020 09:05:07 -0000
@@ -5,7 +5,7 @@ Fix build with icu4c >=65
 Index: Source/WebCore/dom/Document.cpp
 --- Source/WebCore/dom/Document.cpp.orig
 +++ Source/WebCore/dom/Document.cpp
-@@ -3846,12 +3846,12 @@ static bool isValidNameNonASCII(const UChar* character
+@@ -4407,12 +4407,12 @@ static bool isValidNameNonASCII(const UChar* character
      unsigned i = 0;
 
      UChar32 c;
@@ -20,12 +20,12 @@ Index: Source/WebCore/dom/Document.cpp
          if (!isValidNamePart(c))
              return false;
      }
-@@ -3914,7 +3914,7 @@ bool Document::parseQualifiedName(const String& qualif
-     const UChar* s = qualifiedName.characters();
+@@ -4474,7 +4474,7 @@ bool Document::parseQualifiedName(const String& qualif
+
      for (unsigned i = 0; i < length;) {
          UChar32 c;
--        U16_NEXT(s, i, length, c)
-+        U16_NEXT(s, i, length, c);
+-        U16_NEXT(qualifiedName, i, length, c)
++        U16_NEXT(qualifiedName, i, length, c);
          if (c == ':') {
              if (sawColon) {
                  ec = NAMESPACE_ERR;
Index: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_page_NavigatorBase_cpp 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/page/NavigatorBase.cpp
+--- Source/WebCore/page/NavigatorBase.cpp.orig
++++ Source/WebCore/page/NavigatorBase.cpp
+@@ -31,7 +31,7 @@
+ #include <wtf/NeverDestroyed.h>
+ #include <wtf/text/WTFString.h>
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ #include "sys/utsname.h"
+ #include <wtf/StdLibExtras.h>
+ #endif
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp
--- qtwebkit/patches/patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_graphics_SegmentedFontData_cpp,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/graphics/SegmentedFontData.cpp
---- Source/WebCore/platform/graphics/SegmentedFontData.cpp.orig
-+++ Source/WebCore/platform/graphics/SegmentedFontData.cpp
-@@ -61,7 +61,7 @@ bool SegmentedFontData::containsCharacters(const UChar
- {
-     UChar32 c;
-     for (int i = 0; i < length; ) {
--        U16_NEXT(characters, i, length, c)
-+        U16_NEXT(characters, i, length, c);
-         if (!containsCharacter(c))
-             return false;
-     }
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h
+@@ -33,7 +33,7 @@ struct GraphicsSurfaceToken {
+
+ #if OS(DARWIN)
+     typedef mach_port_t BufferHandle;
+-#elif OS(LINUX)
++#elif OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+     typedef uint32_t BufferHandle;
+ #elif OS(WINDOWS)
+     typedef HANDLE BufferHandle;
Index: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
diff -N qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface_h 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+--- Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h.orig
++++ Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
+@@ -34,7 +34,7 @@ typedef struct __IOSurface* IOSurfaceRef;
+ typedef IOSurfaceRef PlatformGraphicsSurface;
+ #endif
+
+-#if OS(LINUX)
++#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
+ typedef uint32_t PlatformGraphicsSurface;
+ #endif
+
Index: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
diff -N qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm
--- qtwebkit/patches/patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm 5 Oct 2019 09:51:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-Source_WebCore_platform_mac_WebCoreNSURLExtras_mm,v 1.1 2019/10/05 09:51:36 ajacoutot Exp $
-
-Fix build with icu4c >=65
-
-Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
---- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm.orig
-+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
-@@ -175,7 +175,7 @@ static BOOL allCharactersInIDNScriptWhiteList(const UC
-     int32_t i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(buffer, i, length, c)
-+        U16_NEXT(buffer, i, length, c);
-         UErrorCode error = U_ZERO_ERROR;
-         UScriptCode script = uscript_getScript(c, &error);
-         if (error != U_ZERO_ERROR) {
-@@ -746,7 +746,7 @@ static CFStringRef createStringWithEscapedUnsafeCharac
-     CFIndex i = 0;
-     while (i < length) {
-         UChar32 c;
--        U16_NEXT(sourceBuffer, i, length, c)
-+        U16_NEXT(sourceBuffer, i, length, c);
-        
-         if (isLookalikeCharacter(c)) {
-             uint8_t utf8Buffer[4];
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginPackageQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginPackageQt.cpp.orig Tue Oct 13 07:37:21 2015
-+++ Source/WebCore/plugins/qt/PluginPackageQt.cpp Thu Dec 10 09:05:23 2015
-@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0)
-         }
-     }
-
--    QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgtk-x11-2.0"));
-     if (library.load()) {
-         typedef void *(*gtk_init_check_ptr)(int*, char***);
-         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
Index: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
diff -N qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp
--- qtwebkit/patches/patch-Source_WebCore_plugins_qt_PluginViewQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebCore_plugins_qt_PluginViewQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebCore/plugins/qt/PluginViewQt.cpp.orig Fri Dec 26 02:28:55 2014
-+++ Source/WebCore/plugins/qt/PluginViewQt.cpp Fri Dec 26 02:29:10 2014
-@@ -697,7 +697,7 @@ static Display *getPluginDisplay()
-     // support gdk based plugins (like flash) that use a different X connection.
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp
--- qtwebkit/patches/patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_PluginProcess_qt_PluginProcessMainQt_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp.orig Fri Dec 26 02:29:24 2014
-+++ Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp Fri Dec 26 02:29:35 2014
-@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMess
-
- static bool initializeGtk()
- {
--    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
-+    QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"));
-     if (!gtkLibrary.load())
-         return false;
-     typedef void* (*gtk_init_ptr)(void*, void*);
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp
--- qtwebkit/patches/patch-Source_WebKit2_Shared_API_c_WKString_cpp 9 Dec 2018 21:01:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_Shared_API_c_WKString_cpp,v 1.1 2018/12/09 21:01:03 ajacoutot Exp $
-
-Fix build with icu>=61.1
-
-Index: Source/WebKit2/Shared/API/c/WKString.cpp
---- Source/WebKit2/Shared/API/c/WKString.cpp.orig
-+++ Source/WebKit2/Shared/API/c/WKString.cpp
-@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
- size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
- {
-     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
--    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
-+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
- }
-
- size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
Index: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit2_Shared_Plugins_unix_PluginSearchPath_cpp 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+--- Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp.orig
++++ Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp
+@@ -68,6 +68,7 @@ Vector<String> pluginsDirectories()
+     result.append("/usr/lib64/mozilla/plugins");
+     result.append("/usr/lib/nsbrowser/plugins");
+     result.append("/usr/lib64/nsbrowser/plugins");
++    result.append("${LOCALBASE}/lib/mozilla/plugins");
+ #endif
+
+     return result;
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_Plugins_Netscape_x11_NetscapePluginX11_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Fix Qt5 in situation GTK+ shared library version is overridden.
---- Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp.orig Fri Dec 26 02:30:14 2014
-+++ Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp Fri Dec 26 02:30:24 2014
-@@ -64,7 +64,7 @@ static Display* getPluginDisplay()
-     // The code below has the same effect as this one:
-     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
--    QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
-+    QLibrary library(QLatin1String("libgdk-x11-2.0"));
-     if (!library.load())
-         return 0;
-
Index: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
diff -N qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro
--- qtwebkit/patches/patch-Source_WebKit2_WebProcess_pro 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Source_WebKit2_WebProcess_pro,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak compilation.
---- Source/WebKit2/WebProcess.pro.orig Thu Sep 11 14:48:23 2014
-+++ Source/WebKit2/WebProcess.pro Mon Nov 10 20:49:42 2014
-@@ -15,6 +15,10 @@ INCLUDEPATH = \
-     $$PWD/Shared/linux/SandboxProcess/ \
-     $$INCLUDEPATH
-
-+openbsd: {
-+    INCLUDEPATH += $(LOCALBASE)/include
-+}
-+
- QT += network webkit
- macx: QT += xml
-
Index: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
diff -N qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_WebKit_qt_WebCoreSupport_QWebFrameAdapter_cpp 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+--- Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp.orig
++++ Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+@@ -964,6 +964,9 @@ void QWebFrameAdapter::setViewportSize(const QSize& si
+     if (view->needsLayout())
+         view->layout();
+     view->adjustViewSize();
++
++    if (view->needsLayout())
++        view->layout();
+ }
+
+
Index: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
===================================================================
RCS file: qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
diff -N qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qtwebkit/patches/patch-Source_cmake_OptionsCommon_cmake 15 Feb 2020 09:05:07 -0000
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_cmake_OptionsCommon_cmake,v 1.12 2017/09/15 07:43:42 ajacoutot Exp $
+
+Our ar(1) is too old and have not support for `T'.
+
+Undefined references to libc functions.
+
+Index: Source/cmake/OptionsCommon.cmake
+--- Source/cmake/OptionsCommon.cmake.orig
++++ Source/cmake/OptionsCommon.cmake
+@@ -19,10 +19,10 @@ option(USE_THIN_ARCHIVES "Produce all static libraries
+ 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 ()
+
+@@ -174,9 +174,9 @@ if (NOT MSVC)
+     string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+ endif ()
+
+-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+-    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+-endif ()
++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
++#    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
++#endif ()
+
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
Index: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
===================================================================
RCS file: qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
diff -N qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp
--- qtwebkit/patches/patch-Tools_DumpRenderTree_JavaScriptThreading_cpp 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_DumpRenderTree_JavaScriptThreading_cpp,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/DumpRenderTree/JavaScriptThreading.cpp.orig Fri Dec 19 23:01:59 2014
-+++ Tools/DumpRenderTree/JavaScriptThreading.cpp Fri Dec 19 23:02:47 2014
-@@ -101,7 +101,7 @@ void runJavaScriptThread(void*)
-         }
-
-         // Respawn probabilistically.
--        if (rand() % 5)
-+        if (arc4random_uniform(5))
-             continue;
-
-         MutexLocker locker(javaScriptThreadsMutex());
Index: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_mangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_mangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/mangle.cgi.c.orig Fri Dec 26 02:50:45 2014
-+++ Tools/mangleme/mangle.cgi.c Fri Dec 26 02:51:04 2014
-@@ -18,7 +18,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
===================================================================
RCS file: qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
diff -N qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c
--- qtwebkit/patches/patch-Tools_mangleme_remangle_cgi_c 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_mangleme_remangle_cgi_c,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
---- Tools/mangleme/remangle.cgi.c.orig Fri Dec 26 02:49:32 2014
-+++ Tools/mangleme/remangle.cgi.c Fri Dec 26 02:50:11 2014
-@@ -17,7 +17,7 @@
-
- #include "tags.h"
-
--#define R(x) (rand() % (x))
-+#define R(x) arc4random_uniform((x))
-
- #define MAXTCOUNT 100
- #define MAXPCOUNT 20
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_gccdepends_gccdepends_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/gccdepends/gccdepends.pro
---- Tools/qmake/config.tests/gccdepends/gccdepends.pro.orig
-+++ Tools/qmake/config.tests/gccdepends/gccdepends.pro
-@@ -1,27 +1,22 @@
- TEMPLATE = aux
--OBJECTS_DIR = obj
-+#OBJECTS_DIR = obj
- QMAKE_CXXFLAGS += -MD
-
- base_filename = empty
--object_file = $$OBJECTS_DIR/$${base_filename}.o
-+object_file = $${base_filename}.o
- deps_filename = $${base_filename}.d
-
- SOURCES += $${base_filename}.cpp
-
- test.commands = \
--    # Earlier teambuilder and icecream versions would not
--    # respect the -o argument for the .d file, so the file
--    # would end up in the root build dir.
--    test ! -f $${deps_filename} && \
--    \
-     # But it should end up in the OBJECTS_DIR
--    test -f $$OBJECTS_DIR/$${deps_filename} && \
-+    test -f $${deps_filename} && \
-     \
-     # Icecream 0.9.7 and earlier does not ensure that the
-     # target rule matches the path of the .o file, since
-     # the file is compiled into the current dir and then
-     # moved. Verify that we don't hit that case.
--    grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
-+    grep -q \"$${object_file}:\" $${deps_filename} && \
-     \
-     # If everything is all right we mark the test as succeeded
-     echo success > $$basename(PWD)
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_glx_glx_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_glx_glx_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/glx/glx.pro
---- Tools/qmake/config.tests/glx/glx.pro.orig
-+++ Tools/qmake/config.tests/glx/glx.pro
-@@ -1,4 +1,4 @@
-+CONFIG += opengl x11
- SOURCES = glx.cpp
--OBJECTS_DIR = obj
--LIBS += -lX11 -lGL
-+#OBJECTS_DIR = obj
-
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXcomposite_libXcomposite_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
---- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig
-+++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXcomposite.cpp
--OBJECTS_DIR = obj
--LIBS += -lXcomposite -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXcomposite ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
diff -N qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro
--- qtwebkit/patches/patch-Tools_qmake_config_tests_libXrender_libXrender_pro 17 Jul 2017 08:34:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Tools_qmake_config_tests_libXrender_libXrender_pro,v 1.2 2017/07/17 08:34:39 zhuk Exp $
-Unbreak configure stage.
-Index: Tools/qmake/config.tests/libXrender/libXrender.pro
---- Tools/qmake/config.tests/libXrender/libXrender.pro.orig
-+++ Tools/qmake/config.tests/libXrender/libXrender.pro
-@@ -1,3 +1,4 @@
-+CONFIG += x11
- SOURCES = libXrender.cpp
--OBJECTS_DIR = obj
--LIBS += -lXrender -lX11
-+#OBJECTS_DIR = obj
-+LIBS += -lXrender ${QMAKE_LIBS_X11}
Index: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
===================================================================
RCS file: qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
diff -N qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf
--- qtwebkit/patches/patch-Tools_qmake_mkspecs_features_functions_prf 25 Dec 2016 14:13:13 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
-Unbreak linking to static libraries by providing exact paths when possible.
-
-Particular problem: system version of leveldb gets picked up due to madness in -L.
---- Tools/qmake/mkspecs/features/functions.prf.orig Mon May 30 14:52:29 2016
-+++ Tools/qmake/mkspecs/features/functions.prf Sat Jul 30 00:00:45 2016
-@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
-         mac {
-             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
-         } else:win32-msvc*|wince*|win32-icc {
-+            LIBS += -L$$path
-             LIBS += -l$$target
-             QMAKE_LFLAGS += /OPT:REF
-         } else {
-             CONFIG *= no_smart_library_merge
--            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
-+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
-         }
--
--        LIBS += -L$$path
-
-         win32-msvc*|wince*|win32-icc {
-             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
Index: qtwebkit/pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/qt5/qtwebkit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- qtwebkit/pkg/PLIST 7 Jan 2020 20:22:08 -0000 1.2
+++ qtwebkit/pkg/PLIST 15 Feb 2020 09:05:07 -0000
@@ -1,11 +1,10 @@
-@comment $OpenBSD: PLIST,v 1.2 2020/01/07 20:22:08 zhuk Exp $
+@comment $OpenBSD: PLIST,v 1.1 2017/07/29 00:07:15 zhuk Exp $
 @conflict qt5-<5.6
 @pkgpath x11/qt5/qtwebkit,-main
 include/X11/qt5/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/bytearraytestdata.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qhttpheader_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkreply_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquicknetworkrequest_p.h
@@ -14,8 +13,6 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebpage_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qquickwebview_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qrawwebview_p_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qtwebsecurityorigin_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebchannelwebkittransport_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebdatabase_p.h
@@ -33,14 +30,12 @@ include/X11/qt5/QtWebKit/${VERSION}/QtWe
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebplugindatabase_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebpreferences_p_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebscriptworld_p.h
 include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/qwebsecurityorigin_p.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/testwindow.h
-include/X11/qt5/QtWebKit/${VERSION}/QtWebKit/private/util.h
 include/X11/qt5/QtWebKit/QWebDatabase
 include/X11/qt5/QtWebKit/QWebElement
 include/X11/qt5/QtWebKit/QWebElementCollection
+include/X11/qt5/QtWebKit/QWebFullScreenRequest
 include/X11/qt5/QtWebKit/QWebFullScreenVideoHandler
 include/X11/qt5/QtWebKit/QWebHapticFeedbackPlayer
 include/X11/qt5/QtWebKit/QWebHistory
@@ -62,6 +57,7 @@ include/X11/qt5/QtWebKit/QtWebKitVersion
 include/X11/qt5/QtWebKit/qtwebkitversion.h
 include/X11/qt5/QtWebKit/qwebdatabase.h
 include/X11/qt5/QtWebKit/qwebelement.h
+include/X11/qt5/QtWebKit/qwebfullscreenrequest.h
 include/X11/qt5/QtWebKit/qwebhistory.h
 include/X11/qt5/QtWebKit/qwebhistoryinterface.h
 include/X11/qt5/QtWebKit/qwebkitglobal.h
@@ -92,25 +88,36 @@ include/X11/qt5/QtWebKitWidgets/qwebfram
 include/X11/qt5/QtWebKitWidgets/qwebinspector.h
 include/X11/qt5/QtWebKitWidgets/qwebpage.h
 include/X11/qt5/QtWebKitWidgets/qwebview.h
+@lib lib/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
 @lib lib/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/libWTF.so.${LIBWTF_VERSION}
+@lib lib/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/pkgconfig/Qt5WebKit.pc
 lib/pkgconfig/Qt5WebKitWidgets.pc
 lib/qt5/cmake/Qt5WebKit/
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake
 lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfigVersion.cmake
+lib/qt5/cmake/Qt5WebKit/WebKitTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
 lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
-lib/qt5/libQt5WebKit.la
-lib/qt5/libQt5WebKit.prl
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets${MODCMAKE_BUILD_SUFFIX}
+lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
+@static-lib lib/qt5/libANGLESupport.a
+@lib lib/qt5/libJavaScriptCore.so.${LIBJavaScriptCore_VERSION}
 @lib lib/qt5/libQt5WebKit.so.${LIBQt5WebKit_VERSION}
-lib/qt5/libQt5WebKitWidgets.la
-lib/qt5/libQt5WebKitWidgets.prl
 @lib lib/qt5/libQt5WebKitWidgets.so.${LIBQt5WebKitWidgets_VERSION}
+@lib lib/qt5/libWTF.so.${LIBWTF_VERSION}
+@lib lib/qt5/libWebCore.so.${LIBWebCore_VERSION}
+@lib lib/qt5/libWebKit2.so.${LIBWebKit2_VERSION}
 lib/qt5/libexec/
+@bin lib/qt5/libexec/QtWebNetworkProcess
 @bin lib/qt5/libexec/QtWebPluginProcess
 @bin lib/qt5/libexec/QtWebProcess
+@bin lib/qt5/libexec/QtWebStorageProcess
 lib/qt5/mkspecs/modules/qt_lib_webkit.pri
 lib/qt5/mkspecs/modules/qt_lib_webkit_private.pri
 lib/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri