From a6441872523d8219fd242096736d48f76fd4a972 Mon Sep 17 00:00:00 2001 From: "Dan R. K. Ports" Date: Wed, 29 Apr 2026 14:56:13 -0700 Subject: [PATCH] webkit2-gtk: update to 2.52.4 Fixes: https://trac.macports.org/ticket/65492 --- www/webkit2-gtk/Portfile | 308 +++++++++--------- www/webkit2-gtk/files/OSLogPrintStream.cpp | 29 ++ ...ce_WebKit_Platform_IPC_Connection.cpp.diff | 20 -- .../files/patch-WTF-wtf-Randomdevice.diff | 87 ----- .../files/patch-WTF-wtf-getVTablePointer.diff | 37 --- ...f-spi-darwin-ProcessMemoryFootprint-h.diff | 13 - .../files/patch-Webcore-page-crypto.diff | 22 -- .../files/patch-angle-platform-gtk-apple.diff | 12 + .../files/patch-bmalloc-disable-tzone.diff | 27 ++ .../files/patch-bmalloc-kern-not-found.diff | 28 ++ ...patch-bmalloc-processcheck-darwin-gtk.diff | 14 + ...patch-bmalloc-pthread-self-is-exiting.diff | 42 +++ .../files/patch-bool_narrowed.diff | 11 - .../files/patch-bundle-link-webcore.diff | 11 - .../patch-deprecated-file-exists-rb32.diff | 33 -- .../files/patch-egl-display-no-crash.diff | 61 ++++ ...patch-enable-plugin-architecture-unix.diff | 16 - .../patch-gstreamer-int64-type-mismatch.diff | 76 +++++ .../files/patch-icu-68-true-false.diff | 141 -------- .../files/patch-ipc-darwin-sock-dgram.diff | 29 ++ ...patch-jsc-glib-include-case-collision.diff | 82 +++++ .../patch-minibrowser-fallthrough-c23.diff | 16 + .../files/patch-minibrowser-show-all.diff | 11 + www/webkit2-gtk/files/patch-ramsize.diff | 67 ---- .../files/patch-skia-add-skpathdump.diff | 9 + ...owleopard-cmakelists-stdcformatmacros.diff | 12 - ...-wtf-wtf-osallocatorposix-cpp-map-jit.diff | 16 - ...putimeunix-cpp-darwin-version-restore.diff | 79 ----- .../files/patch-sqlite-init-deadlock.diff | 26 ++ ...core-documentloader-eventloop-include.diff | 9 + ...-audio-directconvolver-disable-veclib.diff | 11 - ...patch-webkit-argumentcoders-glib-case.diff | 10 + ...h-webkit-gtkpagerange-incomplete-type.diff | 13 + .../files/patch-webkit-ipc-darwin-gtk.diff | 73 +++++ ...atch-webkit-serialization-elif-darwin.diff | 36 ++ ...-webkit2-gtk-fixes-for-libxml2-2.12.0.diff | 56 ---- ...h-webkit2gtk-2282-os-log-availability.diff | 22 -- ...bkit2gtk-2282-unprotected-egl-changes.diff | 68 ---- .../files/patch-webkit2gtk-272-macports.diff | 83 ----- .../files/patch-webkit2gtk-macports.diff | 200 ------------ ...llocator-missingfcntl-h-older-systems.diff | 13 - ...h-webkit2gtk-specify-installed-dylibs.diff | 29 -- .../patch-wtf-apple-cocoa-missing-files.diff | 26 ++ .../patch-wtf-mach-vm-types-include.diff | 13 + www/webkit2-gtk/files/snowmath.h | 8 - .../files/stub-TypeCastsOSObject.h | 16 + www/webkit2-gtk/files/stub-epoxy-egl.h | 256 +++++++++++++++ .../files/unused/PR-152650-2.patch | 62 ---- www/webkit2-gtk/files/unused/PR-153138.patch | 26 -- www/webkit2-gtk/files/unused/PR-157574.patch | 49 --- .../files/unused/patch-name-conflicts.diff | 57 ---- .../unused/patch_bad_optional_access.diff | 15 - 52 files changed, 1075 insertions(+), 1411 deletions(-) create mode 100644 www/webkit2-gtk/files/OSLogPrintStream.cpp delete mode 100644 www/webkit2-gtk/files/patch-Source_WebKit_Platform_IPC_Connection.cpp.diff delete mode 100644 www/webkit2-gtk/files/patch-WTF-wtf-Randomdevice.diff delete mode 100644 www/webkit2-gtk/files/patch-WTF-wtf-getVTablePointer.diff delete mode 100644 www/webkit2-gtk/files/patch-WTF-wtf-spi-darwin-ProcessMemoryFootprint-h.diff delete mode 100644 www/webkit2-gtk/files/patch-Webcore-page-crypto.diff create mode 100644 www/webkit2-gtk/files/patch-angle-platform-gtk-apple.diff create mode 100644 www/webkit2-gtk/files/patch-bmalloc-disable-tzone.diff create mode 100644 www/webkit2-gtk/files/patch-bmalloc-kern-not-found.diff create mode 100644 www/webkit2-gtk/files/patch-bmalloc-processcheck-darwin-gtk.diff create mode 100644 www/webkit2-gtk/files/patch-bmalloc-pthread-self-is-exiting.diff delete mode 100644 www/webkit2-gtk/files/patch-bool_narrowed.diff delete mode 100644 www/webkit2-gtk/files/patch-bundle-link-webcore.diff delete mode 100644 www/webkit2-gtk/files/patch-deprecated-file-exists-rb32.diff create mode 100644 www/webkit2-gtk/files/patch-egl-display-no-crash.diff delete mode 100644 www/webkit2-gtk/files/patch-enable-plugin-architecture-unix.diff create mode 100644 www/webkit2-gtk/files/patch-gstreamer-int64-type-mismatch.diff delete mode 100644 www/webkit2-gtk/files/patch-icu-68-true-false.diff create mode 100644 www/webkit2-gtk/files/patch-ipc-darwin-sock-dgram.diff create mode 100644 www/webkit2-gtk/files/patch-jsc-glib-include-case-collision.diff create mode 100644 www/webkit2-gtk/files/patch-minibrowser-fallthrough-c23.diff create mode 100644 www/webkit2-gtk/files/patch-minibrowser-show-all.diff delete mode 100644 www/webkit2-gtk/files/patch-ramsize.diff create mode 100644 www/webkit2-gtk/files/patch-skia-add-skpathdump.diff delete mode 100644 www/webkit2-gtk/files/patch-snowleopard-cmakelists-stdcformatmacros.diff delete mode 100644 www/webkit2-gtk/files/patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff delete mode 100644 www/webkit2-gtk/files/patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff create mode 100644 www/webkit2-gtk/files/patch-sqlite-init-deadlock.diff create mode 100644 www/webkit2-gtk/files/patch-webcore-documentloader-eventloop-include.diff delete mode 100644 www/webkit2-gtk/files/patch-webcore-platform-audio-directconvolver-disable-veclib.diff create mode 100644 www/webkit2-gtk/files/patch-webkit-argumentcoders-glib-case.diff create mode 100644 www/webkit2-gtk/files/patch-webkit-gtkpagerange-incomplete-type.diff create mode 100644 www/webkit2-gtk/files/patch-webkit-ipc-darwin-gtk.diff create mode 100644 www/webkit2-gtk/files/patch-webkit-serialization-elif-darwin.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-2282-os-log-availability.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-2282-unprotected-egl-changes.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-272-macports.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-macports.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff delete mode 100644 www/webkit2-gtk/files/patch-webkit2gtk-specify-installed-dylibs.diff create mode 100644 www/webkit2-gtk/files/patch-wtf-apple-cocoa-missing-files.diff create mode 100644 www/webkit2-gtk/files/patch-wtf-mach-vm-types-include.diff delete mode 100755 www/webkit2-gtk/files/snowmath.h create mode 100644 www/webkit2-gtk/files/stub-TypeCastsOSObject.h create mode 100644 www/webkit2-gtk/files/stub-epoxy-egl.h delete mode 100644 www/webkit2-gtk/files/unused/PR-152650-2.patch delete mode 100644 www/webkit2-gtk/files/unused/PR-153138.patch delete mode 100644 www/webkit2-gtk/files/unused/PR-157574.patch delete mode 100644 www/webkit2-gtk/files/unused/patch-name-conflicts.diff delete mode 100644 www/webkit2-gtk/files/unused/patch_bad_optional_access.diff diff --git a/www/webkit2-gtk/Portfile b/www/webkit2-gtk/Portfile index da930a94c69..825dd38c8b7 100644 --- a/www/webkit2-gtk/Portfile +++ b/www/webkit2-gtk/Portfile @@ -9,15 +9,16 @@ PortGroup active_variants 1.1 PortGroup cmake 1.1 PortGroup legacysupport 1.1 -compiler.cxx_standard 2017 +compiler.cxx_standard 2023 +compiler.blacklist-append {clang < 1600} +compiler.blacklist-append macports-clang-17 cmake.generator Ninja # Fix compilation for Angle subproject: platform.h: error: 'TARGET_OS_OSX' is not defined legacysupport.newest_darwin_requires_legacy 15 name webkit2-gtk conflicts webkit2-gtk-devel -version 2.28.2 -revision 11 +version 2.52.4 description Apple's WebKit2 HTML rendering library for GTK+3 long_description {*}${description} @@ -25,31 +26,29 @@ maintainers {devans @dbevans} {mascguy @mascguy} categories www gnome platforms darwin freebsd license LGPL-2+ BSD -homepage http://webkitgtk.org/ -master_sites http://webkitgtk.org/releases/ +homepage https://webkitgtk.org/ +master_sites https://webkitgtk.org/releases/ use_xz yes distname webkitgtk-${version} dist_subdir webkit-gtk -checksums rmd160 a626f58cf30b6dd1ef8a63c165ce85770c4da675 \ - sha256 b9d23525cfd8d22c37b5d964a9fe9a8ce7583042a2f8d3922e71e6bbc68c30bd \ - size 21427772 +checksums rmd160 247b1624c7502e35e20e873f462eb68f631f26b3 \ + sha256 cf4076a1ca2a64788edca8c452d8ebb68d5e2965e588fe46a388a016513edce4 \ + size 65093228 depends_build-append \ port:gperf \ - port:gtk-doc \ port:perl5.34 \ port:pkgconfig \ - port:python27 \ - port:py27-simplejson + port:python313 \ + port:ruby33 \ + port:unifdef depends_lib-append port:atk \ port:at-spi2-atk \ - port:bison \ path:lib/pkgconfig/cairo.pc:cairo \ - port:flex \ port:fontconfig \ port:freetype \ port:enchant2 \ @@ -64,11 +63,17 @@ depends_lib-append port:atk \ path:lib/pkgconfig/harfbuzz-icu.pc:harfbuzz-icu \ port:hyphen \ path:lib/pkgconfig/icu-uc.pc:icu \ + port:libavif \ + port:libjxl \ path:include/turbojpeg.h:libjpeg-turbo \ + port:lcms2 \ + port:libepoxy \ + port:libgcrypt \ port:libnotify \ port:libpng \ port:libsecret \ - path:lib/pkgconfig/libsoup-2.4.pc:libsoup-2.4 \ + path:lib/pkgconfig/libsoup-3.0.pc:libsoup \ + port:libtasn1 \ port:libxml2 \ port:libxslt \ port:sqlite3 \ @@ -76,70 +81,152 @@ depends_lib-append port:atk \ port:woff2 \ port:zlib -license_noconflict python27 py27-simplejson - -# 1. add missing JavaScriptCore include directory used only on Apple webkit builds -# 2. don't copy the ICU includes into the source tree -# 3. add missing WebCore include directory used only on Apple webkit builds -# 4. add a missing Apple-only header found in the WebKit project -# 5. change some int64_t to gint64 to stop typedef errors in gstreamer -patchfiles-append patch-webkit2gtk-macports.diff - -# and a few more for webkit2-gtk-2.27.2 -patchfiles-append patch-webkit2gtk-272-macports.diff - -# and a few more for 282 -patchfiles-append patch-webkit2gtk-2282-unprotected-egl-changes.diff - -# os log is only available on newer systems. -patchfiles-append patch-webkit2gtk-2282-os-log-availability.diff - -# enable Netscape plugin architecture on macOS -# or can be explicitly disabled with the following addition if preferred -# configure.args-append -DENABLE_NETSCAPE_PLUGIN_API=OFF -patchfiles-append patch-enable-plugin-architecture-unix.diff - -# add a link library to WebCore. I am not sure this is still needed; builds and -# runs without this patch. -patchfiles-append patch-bundle-link-webcore.diff - -# Fix incompatibility with XCode 12: -# https://bugs.webkit.org/show_bug.cgi?id=207871 -patchfiles-append patch-WTF-wtf-getVTablePointer.diff - -# Fix build errors due to -WWc++11-narrowing -# https://bugs.webkit.org/show_bug.cgi?id=211193 -patchfiles-append patch-bool_narrowed.diff - -# Explicitly specify installed dylib paths to g-ir-compile -# Fixes dlopen errors in apps using webkit2gtk introspection -patchfiles-append patch-webkit2gtk-specify-installed-dylibs.diff - -# Backport https://github.com/WebKit/WebKit/commit/b83958928838b8a997c12a8de06f89377df0a903 -patchfiles-append patch-icu-68-true-false.diff - -# API changed with libxml2 2.12+ -# https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b -patchfiles-append patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff - -# Fix build with Ruby 3.2+ -# https://github.com/WebKit/WebKit/commit/b7ac5d0ccc7ca3ed6bf4f2d40fde60247ce87d3c -patchfiles-append patch-deprecated-file-exists-rb32.diff - -# Reduce compilation warnings configure.cppflags-append \ + -Wno-unknown-warning-option \ -Wno-missing-template-arg-list-after-template-kw \ - -Wno-deprecated-declarations + -Wno-deprecated-declarations \ + -isystem ${worksrcpath}/stub-headers + +# Update WTF CMakeLists for stubs added in post-extract. +patchfiles-append patch-wtf-apple-cocoa-missing-files.diff + +# Add missing EventLoop.h include in DocumentLoader.cpp +patchfiles-append patch-webcore-documentloader-eventloop-include.diff + +# ANGLE assumes ANGLE_PLATFORM_LINUX for GTK; use ANGLE_PLATFORM_APPLE +# instead. +patchfiles-append patch-angle-platform-gtk-apple.diff + +# bmalloc ProcessCheck: provide inline stubs for processNameString() and +# shouldAllowMiniMode() on Darwin without Cocoa (implementations are in +# a .mm file not included in the GTK tarball). +patchfiles-append patch-bmalloc-processcheck-darwin-gtk.diff + +# Disable TZONE (not included in the GTK tarball) +patchfiles-append patch-bmalloc-disable-tzone.diff + +# Use portable TLS sentinel instead of private pthread_self_is_exiting_np +patchfiles-append patch-bmalloc-pthread-self-is-exiting.diff + +# Replace forward declarations with #include to avoid incomplete type +# errors with std::span in older libc++ (macports-clang-16) +patchfiles-append patch-webkit-gtkpagerange-incomplete-type.diff + +# Fix GStreamer API calls to use gint64/guint64 instead of int64_t. +patchfiles-append patch-gstreamer-int64-type-mismatch.diff + +# On macOS with GTK, both OS(DARWIN) and USE(UNIX_DOMAIN_SOCKETS) are true. +# Prefer UnixFileDescriptor (GTK) over MachSendRight (Cocoa-only). +patchfiles-append patch-webkit-ipc-darwin-gtk.diff + +# ...and use only unix sockets in serialization.in. +patchfiles-append patch-webkit-serialization-elif-darwin.diff + +# rename include of ArgumentCodersGlib.h to avoid case-insensitive +# collision (see post-extract) +patchfiles-append patch-webkit-argumentcoders-glib-case.diff + +# Fix jsc/JSC include path collision on case-insensitive FS +patchfiles-append patch-jsc-glib-include-case-collision.diff + +# Fall back to CPU rendering when no EGL display can be created +# instead of crashing +patchfiles-append patch-egl-display-no-crash.diff + +# Add missing SkPathDump.cpp to Skia CMakeLists to fix linker error +patchfiles-append patch-skia-add-skpathdump.diff + +# macOS does not support SOCK_SEQPACKET; use SOCK_DGRAM for IPC sockets +# with enlarged buffers to accommodate WebKit's 4KB max message size. +patchfiles-append patch-ipc-darwin-sock-dgram.diff + +# Skip broken Darwin path for sqlite3 init +patchfiles-append patch-sqlite-init-deadlock.diff + +# KERN_NOT_FOUND missing from SDKs before macOS 12 +platform darwin { + # mach_vm_offset_t not declared in older SDK headers + patchfiles-append patch-wtf-mach-vm-types-include.diff + if {${os.major} < 21} { + patchfiles-append patch-bmalloc-kern-not-found.diff + } + +} + +# Create empty stub headers for Apple-specific WTF headers referenced under +# OS(DARWIN) guards. The GTK tarball omits these but code still includes them. +post-extract { + set wtfdir ${worksrcpath}/Source/WTF/wtf + foreach subdir {cf cocoa spi/cf spi/cocoa spi/mac text/cf} { + file mkdir ${wtfdir}/${subdir} + } + foreach stub { + cf/CFURLExtras.h cf/NotificationCenterCF.h cf/TypeCastsCF.h cf/VectorCF.h + cocoa/CrashReporter.h cocoa/Entitlements.h cocoa/NSURLExtras.h + cocoa/RuntimeApplicationChecksCocoa.h cocoa/SoftLinking.h + cocoa/TollFreeBridging.h cocoa/TypeCastsCocoa.h cocoa/VectorCocoa.h + spi/cf/CFBundleSPI.h spi/cf/CFStringSPI.h + spi/cocoa/CFXPCBridgeSPI.h spi/cocoa/CrashReporterClientSPI.h + spi/cocoa/IOSurfaceSPI.h spi/cocoa/MachVMSPI.h spi/cocoa/NSLocaleSPI.h + spi/cocoa/NSObjCRuntimeSPI.h spi/cocoa/SecuritySPI.h spi/cocoa/objcSPI.h + spi/mac/MetadataSPI.h + text/cf/StringConcatenateCF.h text/cf/TextBreakIteratorCF.h + } { + close [open ${wtfdir}/${stub} w] + } + + # OSLogPrintStream.mm is not included in the GTK tarball (Apple-only). + # Provide a .cpp implementation using the public os_log API. + file copy ${filespath}/OSLogPrintStream.cpp ${wtfdir}/darwin/OSLogPrintStream.cpp + + # TypeCastsOSObject.h uses Objective-C constructs (bridge_id_cast, object_getClass) + # that cannot compile in C++ mode. Replace with a stub providing no-op macros. + file copy -force ${filespath}/stub-TypeCastsOSObject.h \ + ${wtfdir}/darwin/TypeCastsOSObject.h + + # We do not have EGL but WebCore and Skia need the headers to + # compile. Provide stubs with no-op implementations so they can + # compile. The EGL paths will never be taken at runtime because + # there is no EGL display. + set stubdir ${worksrcpath}/stub-headers/epoxy + file mkdir ${stubdir} + file copy ${filespath}/stub-epoxy-egl.h ${stubdir}/egl.h + + # Rename Platform/IPC/ArgumentCodersGlib.h to prevent collision + # with Shared/glib/ArgumentCodersGLib.h on case-insensitive FS. + file rename ${worksrcpath}/Source/WebKit/Platform/IPC/glib/ArgumentCodersGlib.h \ + ${worksrcpath}/Source/WebKit/Platform/IPC/glib/ArgumentCodersGlibStrv.h +} # it is preferred to use the WebKit built in bmalloc if it builds on a given os. # it has improved security features, but not all systems can build it at present. configure.args-append \ -DPORT=GTK \ + -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ + -DENABLE_DOCUMENTATION=OFF \ + -DENABLE_GAMEPAD=OFF \ -DENABLE_INTROSPECTION=ON \ + -DENABLE_JOURNALD_LOG=OFF \ -DENABLE_MINIBROWSER=OFF \ - -DENABLE_VIDEO=ON \ + -DENABLE_SPEECH_SYNTHESIS=OFF \ + -DENABLE_WAYLAND_TARGET=OFF \ + -DENABLE_WEBGL=OFF \ + -DUSE_FLITE=OFF \ + -DUSE_GBM=OFF \ + -DUSE_GSTREAMER_GL=OFF \ + -DUSE_GTK4=OFF \ + -DUSE_LIBBACKTRACE=OFF \ + -DUSE_LIBDRM=OFF \ + -DUSE_LIBHYPHEN=ON \ + -DUSE_SPIEL=OFF \ -DUSE_SYSTEM_MALLOC=OFF \ - -DPERL_EXECUTABLE=${prefix}/bin/perl5.34 + -DUSE_SYSTEM_SYSPROF_CAPTURE=OFF \ + -DUSE_SYSPROF_CAPTURE=OFF \ + -DUSE_APPLE_ICU=OFF \ + -DICU_ROOT=${prefix} \ + -DPERL_EXECUTABLE=${prefix}/bin/perl5.34 \ + -DPython_EXECUTABLE=${prefix}/bin/python3.13 \ + -DRuby_EXECUTABLE=${prefix}/bin/ruby3.3 pre-configure { if {![variant_isset quartz] && ![variant_isset x11]} { @@ -157,19 +244,9 @@ default_variants-append +minibrowser variant quartz conflicts x11 { require_active_variants path:lib/pkgconfig/gtk+-3.0.pc:gtk3 quartz - # TODO: restrict this patch to just Big Sur? - patchfiles-append patch-Source_WebKit_Platform_IPC_Connection.cpp.diff - configure.args-append \ -DENABLE_QUARTZ_TARGET=ON \ - -DENABLE_X11_TARGET=OFF \ - -DENABLE_OPENGL=OFF - -# OPENGL does not work with +quartz, eg: https://trac.macports.org/ticket/52495 -# OPENGL must be explicitly turned off, otherwise GLX is found, but X11 is not, and: -# CMake Error at Source/cmake/OptionsGTK.cmake:280 (message): -# Either GLX or EGL is needed for ENABLE_OPENGL. - + -DENABLE_X11_TARGET=OFF } variant x11 conflicts quartz { @@ -177,8 +254,7 @@ variant x11 conflicts quartz { configure.args-append \ -DENABLE_QUARTZ_TARGET=OFF \ - -DENABLE_X11_TARGET=ON \ - -DENABLE_OPENGL=OFF + -DENABLE_X11_TARGET=ON depends_lib-append \ port:mesa \ @@ -189,6 +265,9 @@ variant minibrowser description {Build and install MiniBrowser (for testing)} { configure.args-delete -DENABLE_MINIBROWSER=OFF configure.args-append -DENABLE_MINIBROWSER=ON depends_run-append port:adwaita-icon-theme + patchfiles-append patch-minibrowser-show-all.diff + # [[fallthrough]] is a C23 attribute; use __attribute__ for compatibility + patchfiles-append patch-minibrowser-fallthrough-c23.diff } # see https://trac.macports.org/ticket/56792 @@ -203,71 +282,6 @@ if {![option configure.ccache]} { build.env-append CCACHE_DIR=${workpath}/.ccache } -# the above code presently builds as-in on 10.13 and up -if {${os.platform} eq "darwin" && ${os.major} <= 16} { - - # build of bmalloc fails up to 10.12 https://trac.macports.org/ticket/59447 - configure.args-replace -DUSE_SYSTEM_MALLOC=OFF -DUSE_SYSTEM_MALLOC=ON - patchfiles-append patch-ramsize.diff - - # Source/WTF/wtf/unix/CPUTimeUnix.cpp : add back a previous Darwin compat version - patchfiles-append patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff - - # some Darwin versions don't have MAP_JIT; only use it if available - patchfiles-append patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff - - # gl cocoa build continues to fail due to use of API not available on darwin 12 or earlier - # so gstreamergl is not available at present for darwin 12 or earlier - # todo clarify further where this is exactly needed - configure.args-append -DUSE_GSTREAMER_GL=OFF - - # for the webcore/page/crypt code to flow correctly, - # ENABLE_WEB_CRYPTO has to be ON for 10.10+ and OFF for 10.9 and less - if {${os.major} <= 13} { - configure.args-append -DENABLE_WEB_CRYPTO=OFF - } - # disable Apple internal security libraries, available only on new systems - patchfiles-append patch-Webcore-page-crypto.diff - - # restrict special process memory kernel calls to 10.9+ that support them - patchfiles-append patch-WTF-wtf-spi-darwin-ProcessMemoryFootprint-h.diff - - # the darwin build uses security features that are Apple internal only, but - # the unix version does not FIXME: sort the ifdefs out - # https://bugs.webkit.org/show_bug.cgi?id=157554 - patchfiles-append patch-WTF-wtf-Randomdevice.diff - - # disable veclib on 10.7 and 10.8. There is a definition for - # class complex<> in the vForce.h header that collides with libc++ - # if anyone has a more elegant fix for this, please volunteer it - if {${os.major} == 11 || ${os.major} == 12} { - patchfiles-append patch-webcore-platform-audio-directconvolver-disable-veclib.diff - } - - # there is a missing header that manifests on 10.7 and less - patchfiles-append patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff - - # add dep for newer ruby and spec this for build - # https://trac.macports.org/ticket/52016 - depends_build-append port:ruby25 - configure.args-append -DRUBY_EXECUTABLE=${prefix}/bin/ruby2.5 - - # fix missing PRId64 definitions on systems - # that don't define __STDC_FORMAT_MACROS by default - # https://bugs.webkit.org/show_bug.cgi?id=156596 - # https://trac.macports.org/ticket/52016 - # also added defn for TARGET_OS_IOS to avoid innumerable warnings - patchfiles-append patch-snowleopard-cmakelists-stdcformatmacros.diff - - # special case: fix build on 10.6 with macports-libstdc++ - # contents of snowmath.h should someday become part of gcc6 cmath - # TODO: remove this? - if { ${configure.cxx_stdlib} eq "macports-libstdc++" && ${os.major} < 11 } { - configure.cxxflags-append -D_GLIBCXX_USE_C99_MATH_TR1=1 - configure.cxxflags-append -include ${filespath}/snowmath.h - } -} - notes-append " If you are porting new software to use webkit2gtk on Apple systems,\ you will likely need to define BUILDING_GTK__ to get the correct\ @@ -275,5 +289,5 @@ behaviour from WebKitAvailability.h. " livecheck.type regex -livecheck.url http://webkitgtk.org/releases/ +livecheck.url https://webkitgtk.org/releases/ livecheck.regex "webkitgtk-(\\d+\\.\\d*\[02468\](?:\\.\\d+)*)" diff --git a/www/webkit2-gtk/files/OSLogPrintStream.cpp b/www/webkit2-gtk/files/OSLogPrintStream.cpp new file mode 100644 index 00000000000..207a9455d59 --- /dev/null +++ b/www/webkit2-gtk/files/OSLogPrintStream.cpp @@ -0,0 +1,29 @@ +#include "config.h" +#include +#if OS(DARWIN) +#include +namespace WTF { + +OSLogPrintStream::OSLogPrintStream(os_log_t log, os_log_type_t type) + : m_log(log) + , m_logType(type) +{ +} + +OSLogPrintStream::~OSLogPrintStream() { } + +std::unique_ptr OSLogPrintStream::open(const char* subsystem, const char* category, os_log_type_t logType) +{ + return std::unique_ptr(new OSLogPrintStream(os_log_create(subsystem, category), logType)); +} + +void OSLogPrintStream::vprintf(const char* format, va_list args) +{ + Locker locker { m_stringLock }; + char buf[512]; + std::vsnprintf(buf, sizeof(buf), format, args); + os_log_with_type(m_log, m_logType, "%{public}s", buf); +} + +} // namespace WTF +#endif diff --git a/www/webkit2-gtk/files/patch-Source_WebKit_Platform_IPC_Connection.cpp.diff b/www/webkit2-gtk/files/patch-Source_WebKit_Platform_IPC_Connection.cpp.diff deleted file mode 100644 index 313b3908edd..00000000000 --- a/www/webkit2-gtk/files/patch-Source_WebKit_Platform_IPC_Connection.cpp.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- Source/WebKit/Platform/IPC/Connection.cpp.bak 2021-05-08 09:24:06.000000000 -0400 -+++ Source/WebKit/Platform/IPC/Connection.cpp 2021-05-08 10:04:20.000000000 -0400 -@@ -36,6 +36,8 @@ - #include - #include - -+#include -+ - #if PLATFORM(COCOA) - #include "MachMessage.h" - #endif -@@ -669,7 +671,7 @@ - } - - #if OS(DARWIN) -- RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %{public}s::%{public}s from process %d, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), remoteProcessID(), syncRequestID); -+ RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %{public}s::%{public}s from process %d, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), (int)getpid(), syncRequestID); - #else - RELEASE_LOG_ERROR(IPC, "Connection::waitForSyncReply: Timed-out while waiting for reply for %s::%s, id = %" PRIu64, messageReceiverName.toString().data(), messageName.toString().data(), syncRequestID); - #endif diff --git a/www/webkit2-gtk/files/patch-WTF-wtf-Randomdevice.diff b/www/webkit2-gtk/files/patch-WTF-wtf-Randomdevice.diff deleted file mode 100644 index bfd2ee91035..00000000000 --- a/www/webkit2-gtk/files/patch-WTF-wtf-Randomdevice.diff +++ /dev/null @@ -1,87 +0,0 @@ -diff --git Source/WTF/wtf/RandomDevice.cpp Source/WTF/wtf/RandomDevice.cpp -index 89165f03..99251674 100644 ---- Source/WTF/wtf/RandomDevice.cpp -+++ Source/WTF/wtf/RandomDevice.cpp -@@ -30,7 +30,7 @@ - #include - #include - --#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX) -+#if (1) - #include - #include - #include -@@ -41,7 +41,7 @@ - #include // windows.h must be included before wincrypt.h. - #endif - --#if OS(DARWIN) -+#if (0) - #include - #include - #endif -@@ -52,7 +52,7 @@ - - namespace WTF { - --#if !OS(DARWIN) && !OS(FUCHSIA) && OS(UNIX) -+#if (1) - NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToOpenURandom() - { - CRASH(); -@@ -64,7 +64,7 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom() - } - #endif - --#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS) -+#if (1) - RandomDevice::RandomDevice() - { - int ret = 0; -@@ -77,7 +77,7 @@ RandomDevice::RandomDevice() - } - #endif - --#if !OS(DARWIN) && !OS(FUCHSIA) && !OS(WINDOWS) -+#if (1) - RandomDevice::~RandomDevice() - { - close(m_fd); -@@ -88,11 +88,11 @@ RandomDevice::~RandomDevice() - // https://bugs.webkit.org/show_bug.cgi?id=170190 - void RandomDevice::cryptographicallyRandomValues(unsigned char* buffer, size_t length) - { --#if OS(DARWIN) -+#if (0) - RELEASE_ASSERT(!CCRandomGenerateBytes(buffer, length)); - #elif OS(FUCHSIA) - zx_cprng_draw(buffer, length); --#elif OS(UNIX) -+#elif (1) - ssize_t amountRead = 0; - while (static_cast(amountRead) < length) { - ssize_t currentRead = read(m_fd, buffer + amountRead, length - amountRead); -diff --git Source/WTF/wtf/RandomDevice.h Source/WTF/wtf/RandomDevice.h -index 411bde3e..9c9c6da8 100644 ---- Source/WTF/wtf/RandomDevice.h -+++ Source/WTF/wtf/RandomDevice.h -@@ -35,7 +35,7 @@ class RandomDevice { - WTF_MAKE_NONCOPYABLE(RandomDevice); - WTF_MAKE_FAST_ALLOCATED; - public: --#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS) -+#if (0) - RandomDevice() = default; - #else - RandomDevice(); -@@ -48,8 +48,8 @@ public: - void cryptographicallyRandomValues(unsigned char* buffer, size_t length); - - private: --#if OS(DARWIN) || OS(FUCHSIA) || OS(WINDOWS) --#elif OS(UNIX) -+#if (0) -+#elif (1) - int m_fd { -1 }; - #else - #error "This configuration doesn't have a strong source of randomness." diff --git a/www/webkit2-gtk/files/patch-WTF-wtf-getVTablePointer.diff b/www/webkit2-gtk/files/patch-WTF-wtf-getVTablePointer.diff deleted file mode 100644 index 1aae3e8c964..00000000000 --- a/www/webkit2-gtk/files/patch-WTF-wtf-getVTablePointer.diff +++ /dev/null @@ -1,37 +0,0 @@ -diff --git Source/WTF/wtf/PointerPreparations.h Source/WTF/wtf/PointerPreparations.h -index ef20a5e48512..ef9495169ff4 100644 ---- Source/WTF/wtf/PointerPreparations.h -+++ Source/WTF/wtf/PointerPreparations.h -@@ -34,16 +34,16 @@ namespace WTF { - #if COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer) - - template --ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); } -+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); } - - #else // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer) - - #if CPU(ARM64E) - template --ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast(o)), ptrauth_key_cxx_vtable_pointer, 0); } -+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast(o)), ptrauth_key_cxx_vtable_pointer, 0); } - #else // not CPU(ARM64E) - template --ALWAYS_INLINE void* getVTablePointer(T* o) { return (*(reinterpret_cast(o))); } -+ALWAYS_INLINE const void* getVTablePointer(T* o) { return (*(reinterpret_cast(o))); } - #endif // not CPU(ARM64E) - - #endif // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer) -diff --git Source/WebCore/bindings/scripts/CodeGeneratorJS.pm Source/WebCore/bindings/scripts/CodeGeneratorJS.pm -index 35db4d28ccd6..03dd9c161a83 100644 ---- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm -+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm -@@ -4881,7 +4881,7 @@ END - push(@implContent, <) -+#if !PLATFORM(IOS_FAMILY_SIMULATOR) && __has_include() && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) - # include - # if RUSAGE_INFO_CURRENT >= 4 - # define HAS_MAX_FOOTPRINT diff --git a/www/webkit2-gtk/files/patch-Webcore-page-crypto.diff b/www/webkit2-gtk/files/patch-Webcore-page-crypto.diff deleted file mode 100644 index e33df9df1aa..00000000000 --- a/www/webkit2-gtk/files/patch-Webcore-page-crypto.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git Source/WebCore/page/Crypto.cpp Source/WebCore/page/Crypto.cpp -index 69c36e97..07969aad 100644 ---- Source/WebCore/page/Crypto.cpp -+++ Source/WebCore/page/Crypto.cpp -@@ -36,7 +36,7 @@ - #include - #include - --#if OS(DARWIN) -+#if OS(DARWIN) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1090) - #include - #include - #endif -@@ -58,7 +58,7 @@ ExceptionOr Crypto::getRandomValues(ArrayBufferView& array) - return Exception { TypeMismatchError }; - if (array.byteLength() > 65536) - return Exception { QuotaExceededError }; --#if OS(DARWIN) -+#if OS(DARWIN) && (__MAC_OS_X_VERSION_MIN_REQUIRED > 1090) - auto rc = CCRandomGenerateBytes(array.baseAddress(), array.byteLength()); - RELEASE_ASSERT(rc == kCCSuccess); - #else diff --git a/www/webkit2-gtk/files/patch-angle-platform-gtk-apple.diff b/www/webkit2-gtk/files/patch-angle-platform-gtk-apple.diff new file mode 100644 index 00000000000..1871c75d7da --- /dev/null +++ b/www/webkit2-gtk/files/patch-angle-platform-gtk-apple.diff @@ -0,0 +1,12 @@ +--- Source/ThirdParty/ANGLE/PlatformGTK.cmake.orig 2026-04-28 00:36:35 ++++ Source/ThirdParty/ANGLE/PlatformGTK.cmake 2026-04-28 00:36:35 +@@ -1,3 +1,9 @@ ++# On macOS, ANGLE's GTK platform file assumes Linux. Skip ANGLE backends ++# entirely on Apple since the GTK tarball does not include Metal or CGL sources. ++if (APPLE) ++ return() ++endif () ++ + list(APPEND ANGLE_DEFINITIONS ANGLE_PLATFORM_LINUX EGL_NO_PLATFORM_SPECIFIC_TYPES USE_SYSTEM_EGL) + include(linux.cmake) + diff --git a/www/webkit2-gtk/files/patch-bmalloc-disable-tzone.diff b/www/webkit2-gtk/files/patch-bmalloc-disable-tzone.diff new file mode 100644 index 00000000000..9bfae5a56a5 --- /dev/null +++ b/www/webkit2-gtk/files/patch-bmalloc-disable-tzone.diff @@ -0,0 +1,27 @@ +--- Source/bmalloc/bmalloc/BPlatform.h.orig 2026-04-29 22:00:00 ++++ Source/bmalloc/bmalloc/BPlatform.h 2026-04-29 22:00:00 +@@ -429,9 +429,5 @@ + #endif + + #if !defined(BUSE_TZONE) +-#if BUSE(LIBPAS) && BOS(DARWIN) && (BCPU(ARM64) || BCPU(X86_64)) +-#define BUSE_TZONE 1 +-#else + #define BUSE_TZONE 0 + #endif +-#endif +--- Source/WTF/wtf/PlatformUse.h.orig 2026-04-29 22:00:00 ++++ Source/WTF/wtf/PlatformUse.h 2026-04-29 22:00:00 +@@ -305,12 +305,8 @@ + #endif + + #if !defined(USE_TZONE_MALLOC) +-#if (CPU(ARM64) || CPU(X86_64)) && OS(DARWIN) && (__SIZEOF_POINTER__ == 8) +-#define USE_TZONE_MALLOC 1 +-#else + #define USE_TZONE_MALLOC 0 + #endif +-#endif + + #if !defined(USE_PROTECTED_JIT) + #if CPU(ADDRESS64) && OS(DARWIN) && USE(APPLE_INTERNAL_SDK) diff --git a/www/webkit2-gtk/files/patch-bmalloc-kern-not-found.diff b/www/webkit2-gtk/files/patch-bmalloc-kern-not-found.diff new file mode 100644 index 00000000000..37e53a32229 --- /dev/null +++ b/www/webkit2-gtk/files/patch-bmalloc-kern-not-found.diff @@ -0,0 +1,28 @@ +--- Source/bmalloc/libpas/src/libpas/pas_mar_report_crash.c.orig ++++ Source/bmalloc/libpas/src/libpas/pas_mar_report_crash.c +@@ -35,6 +35,11 @@ + + #include + ++/* KERN_NOT_FOUND was added after the macOS 10.14 SDK (value 56). */ ++#ifndef KERN_NOT_FOUND ++#define KERN_NOT_FOUND 56 ++#endif ++ + PAS_BEGIN_EXTERN_C; + + kern_return_t pas_mar_populate_crash_report(pas_mar_crash_report* report, const char* error_type, const char* confidence, +--- Source/bmalloc/libpas/src/libpas/pas_report_crash.c.orig ++++ Source/bmalloc/libpas/src/libpas/pas_report_crash.c +@@ -33,6 +33,11 @@ + #include "pas_report_crash.h" + #include "pas_probabilistic_guard_malloc_allocator.h" + ++/* KERN_NOT_FOUND was added after the macOS 10.14 SDK (value 56). */ ++#ifndef KERN_NOT_FOUND ++#define KERN_NOT_FOUND 56 ++#endif ++ + #ifdef __APPLE__ + static void* pas_enumerator_reader_adapter(pas_enumerator* enumerator, + void* remote_address, size_t size, void* arg) diff --git a/www/webkit2-gtk/files/patch-bmalloc-processcheck-darwin-gtk.diff b/www/webkit2-gtk/files/patch-bmalloc-processcheck-darwin-gtk.diff new file mode 100644 index 00000000000..64952e37a7d --- /dev/null +++ b/www/webkit2-gtk/files/patch-bmalloc-processcheck-darwin-gtk.diff @@ -0,0 +1,14 @@ +--- Source/bmalloc/bmalloc/ProcessCheck.h.orig 2026-04-28 00:52:36 ++++ Source/bmalloc/bmalloc/ProcessCheck.h 2026-04-28 00:52:36 +@@ -40,9 +40,8 @@ + #endif + + #if BOS(DARWIN) +-const char* processNameString(); +- +-bool shouldAllowMiniMode(); ++inline const char* processNameString() { return ""; } ++inline bool shouldAllowMiniMode() { return true; } + #else + inline bool shouldAllowMiniMode() { return true; } + #endif diff --git a/www/webkit2-gtk/files/patch-bmalloc-pthread-self-is-exiting.diff b/www/webkit2-gtk/files/patch-bmalloc-pthread-self-is-exiting.diff new file mode 100644 index 00000000000..cb94bf44693 --- /dev/null +++ b/www/webkit2-gtk/files/patch-bmalloc-pthread-self-is-exiting.diff @@ -0,0 +1,42 @@ +--- Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h.orig ++++ Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h +@@ -105,20 +105,14 @@ + static inline pas_thread_local_cache* pas_thread_local_cache_try_get(void) + { + pas_thread_local_cache* cache = pas_thread_local_cache_try_get_impl(); +-#if !PAS_OS(DARWIN) + if (((uintptr_t)cache) == PAS_THREAD_LOCAL_CACHE_DESTROYED) + return NULL; +-#endif + return cache; + } + + static inline bool pas_thread_local_cache_can_set(void) + { +-#if PAS_OS(DARWIN) +- return !pthread_self_is_exiting_np() && !pas_msl_is_enabled(); +-#else + return ((uintptr_t)pas_thread_local_cache_try_get_impl()) != PAS_THREAD_LOCAL_CACHE_DESTROYED; +-#endif + } + + static inline void pas_thread_local_cache_set_impl(pas_thread_local_cache* thread_local_cache) + +--- Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c.orig ++++ Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c +@@ -147,7 +147,6 @@ + if (verbose) + pas_log("[%d] Destructor call for TLS %p\n", getpid(), thread_local_cache); + +-#if !PAS_OS(DARWIN) + /* If pthread_self_is_exiting_np does not exist, we set PAS_THREAD_LOCAL_CACHE_DESTROYED in the TLS so that + subsequent calls of pas_thread_local_cache_try_get() can detect whether TLS is destroyed. Since + PAS_THREAD_LOCAL_CACHE_DESTROYED is a non-null value, pthread will call this destructor again (up to +@@ -155,7 +154,6 @@ + PAS_THREAD_LOCAL_CACHE_DESTROYED in the TLS each time to continue to indicate that destroy() has already been called once. */ + pas_thread_local_cache_set_impl((pas_thread_local_cache*)PAS_THREAD_LOCAL_CACHE_DESTROYED); + PAS_ASSERT(!pas_thread_local_cache_can_set()); +-#endif + + if (((uintptr_t)thread_local_cache) != PAS_THREAD_LOCAL_CACHE_DESTROYED) + destroy(thread_local_cache, pas_lock_is_not_held); diff --git a/www/webkit2-gtk/files/patch-bool_narrowed.diff b/www/webkit2-gtk/files/patch-bool_narrowed.diff deleted file mode 100644 index b35c18fdb0b..00000000000 --- a/www/webkit2-gtk/files/patch-bool_narrowed.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- Source/WebCore/style/StyleResolver.cpp -+++ Source/WebCore/style/StyleResolver.cpp -@@ -107,7 +107,7 @@ Resolver::Resolver(Document& document) - if (view) - m_mediaQueryEvaluator = MediaQueryEvaluator { view->mediaType() }; - else -- m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; -+ m_mediaQueryEvaluator = MediaQueryEvaluator { "all", false }; - - if (root) { - m_rootDefaultStyle = styleForElement(*root, m_document.renderStyle(), nullptr, RuleMatchingBehavior::MatchOnlyUserAgentRules).renderStyle; diff --git a/www/webkit2-gtk/files/patch-bundle-link-webcore.diff b/www/webkit2-gtk/files/patch-bundle-link-webcore.diff deleted file mode 100644 index 454ff9cb2ac..00000000000 --- a/www/webkit2-gtk/files/patch-bundle-link-webcore.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- Source/WebKit/PlatformGTK.cmake.orig 2020-02-04 02:24:08.000000000 -0800 -+++ Source/WebKit/PlatformGTK.cmake 2022-08-23 16:17:18.000000000 -0700 -@@ -576,7 +576,7 @@ - # Commands for building the built-in injected bundle. - add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp") - ADD_WEBKIT_PREFIX_HEADER(webkit2gtkinjectedbundle) --target_link_libraries(webkit2gtkinjectedbundle WebKit) -+target_link_libraries(webkit2gtkinjectedbundle WebKit WebCore) - - target_include_directories(webkit2gtkinjectedbundle PRIVATE - ${WebKit_INCLUDE_DIRECTORIES} diff --git a/www/webkit2-gtk/files/patch-deprecated-file-exists-rb32.diff b/www/webkit2-gtk/files/patch-deprecated-file-exists-rb32.diff deleted file mode 100644 index b46183d3eb6..00000000000 --- a/www/webkit2-gtk/files/patch-deprecated-file-exists-rb32.diff +++ /dev/null @@ -1,33 +0,0 @@ -Fix: - -undefined method `exists?' for class File (NoMethodError) - -https://bugs.webkit.org/show_bug.cgi?id=246743 -https://github.com/WebKit/WebKit/commit/b7ac5d0ccc7ca3ed6bf4f2d40fde60247ce87d3c ---- Source/JavaScriptCore/offlineasm/config.rb -+++ Source/JavaScriptCore/offlineasm/config.rb -@@ -22,11 +22,11 @@ - # THE POSSIBILITY OF SUCH DAMAGE. - - buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR']; --if buildProductsDirectory and File.exists?(buildProductsDirectory) -+if buildProductsDirectory and File.exist?(buildProductsDirectory) - $: << "#{buildProductsDirectory}/usr/local/include/WebKitAdditions/Scripts" - end - sdkRootDirectory = ENV['SDKROOT']; --if sdkRootDirectory and File.exists?(sdkRootDirectory) -+if sdkRootDirectory and File.exist?(sdkRootDirectory) - $: << "#{sdkRootDirectory}/usr/local/include/WebKitAdditions/Scripts" - end - ---- Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb -+++ Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb -@@ -36,7 +36,7 @@ - end - - generated_path = File.join tmpdir, output_filename -- if !File.exists?(generated_path) -+ if !File.exist?(generated_path) - puts "ERROR: Generated file does not exist at expected path." - exit 1 - end diff --git a/www/webkit2-gtk/files/patch-egl-display-no-crash.diff b/www/webkit2-gtk/files/patch-egl-display-no-crash.diff new file mode 100644 index 00000000000..2a03da34fc1 --- /dev/null +++ b/www/webkit2-gtk/files/patch-egl-display-no-crash.diff @@ -0,0 +1,61 @@ +--- Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp.orig ++++ Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp +@@ -37,8 +37,7 @@ std::unique_ptr PlatformDisplayDefault::create() + { + auto glDisplay = GLDisplay::create(eglGetDisplay(EGL_DEFAULT_DISPLAY)); + if (!glDisplay) { +- WTFLogAlways("Could not create default EGL display: %s. Aborting...", GLContext::lastErrorString()); +- CRASH(); ++ return nullptr; + } + + return std::unique_ptr(new PlatformDisplayDefault(WTFMove(glDisplay))); +--- Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp.orig ++++ Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp +@@ -44,8 +44,7 @@ std::unique_ptr PlatformDisplaySurfaceless::create() + glDisplay = GLDisplay::create(eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, EGL_DEFAULT_DISPLAY, nullptr)); + + if (!glDisplay) { +- WTFLogAlways("Could not create surfaceless EGL display: %s. Aborting...", GLContext::lastErrorString()); +- CRASH(); ++ return nullptr; + } + + return std::unique_ptr(new PlatformDisplaySurfaceless(WTFMove(glDisplay))); +--- Source/WebKit/WebProcess/glib/WebProcessGLib.cpp.orig ++++ Source/WebKit/WebProcess/glib/WebProcessGLib.cpp +@@ -169,8 +169,7 @@ void WebProcess::initializePlatformDisplayIfNeeded() const + } + #endif + +- WTFLogAlways("Could not create EGL display: no supported platform available. Aborting..."); +- CRASH(); ++ return; + } + + void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& parameters) +--- Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp.orig ++++ Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -204,8 +205,13 @@ void DrawingAreaCoordinatedGraphics::updatePreferences(const WebPreferencesStore& + { + Settings& settings = m_webPage->corePage()->settings(); + #if PLATFORM(GTK) +- if (settings.acceleratedCompositingEnabled()) ++ if (settings.acceleratedCompositingEnabled()) { + WebProcess::singleton().initializePlatformDisplayIfNeeded(); ++ if (!PlatformDisplay::sharedDisplayIfExists()) { ++ settings.setAcceleratedCompositingEnabled(false); ++ settings.setForceCompositingMode(false); ++ } ++ } + #endif + settings.setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey())); + // Fixed position elements need to be composited and create stacking contexts diff --git a/www/webkit2-gtk/files/patch-enable-plugin-architecture-unix.diff b/www/webkit2-gtk/files/patch-enable-plugin-architecture-unix.diff deleted file mode 100644 index 8f4401906d7..00000000000 --- a/www/webkit2-gtk/files/patch-enable-plugin-architecture-unix.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- Source/WebKit/config.h.orig 2018-06-13 23:57:05.000000000 +0800 -+++ Source/WebKit/config.h 2018-06-13 23:59:35.000000000 +0800 -@@ -49,10 +49,10 @@ - #endif - - #ifndef PLUGIN_ARCHITECTURE_UNSUPPORTED --#if PLATFORM(MAC) --#define PLUGIN_ARCHITECTURE_MAC 1 --#elif PLATFORM(GTK) && OS(UNIX) && !OS(MAC_OS_X) -+#if PLATFORM(GTK) && OS(UNIX) - #define PLUGIN_ARCHITECTURE_UNIX 1 -+#elif PLATFORM(MAC) -+#define PLUGIN_ARCHITECTURE_MAC 1 - #else - #define PLUGIN_ARCHITECTURE_UNSUPPORTED 1 - #endif diff --git a/www/webkit2-gtk/files/patch-gstreamer-int64-type-mismatch.diff b/www/webkit2-gtk/files/patch-gstreamer-int64-type-mismatch.diff new file mode 100644 index 00000000000..3c60a812cf9 --- /dev/null +++ b/www/webkit2-gtk/files/patch-gstreamer-int64-type-mismatch.diff @@ -0,0 +1,76 @@ +--- Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp.orig 2026-04-29 22:00:00 ++++ Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2026-04-29 22:00:00 +@@ -1364,14 +1364,20 @@ + if (gst_structure_get_int(structure, key.utf8(), &value)) + return value; + } else if constexpr(std::is_same_v) { +- if (gst_structure_get_int64(structure, key.utf8(), &value)) ++ gint64 gstValue; ++ if (gst_structure_get_int64(structure, key.utf8(), &gstValue)) { ++ value = gstValue; + return value; ++ } + } else if constexpr(std::is_same_v) { + if (gst_structure_get_uint(structure, key.utf8(), &value)) + return value; + } else if constexpr(std::is_same_v) { +- if (gst_structure_get_uint64(structure, key.utf8(), &value)) ++ guint64 gstValue; ++ if (gst_structure_get_uint64(structure, key.utf8(), &gstValue)) { ++ value = gstValue; + return value; ++ } + } else if constexpr(std::is_same_v) { + if (gst_structure_get_double(structure, key.utf8(), &value)) + return value; +--- Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp.orig 2026-04-29 23:00:00 ++++ Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp 2026-04-29 23:00:00 +@@ -828,7 +828,7 @@ + double rate; + GstFormat format; + GstSeekType startType; +- int64_t start; ++ gint64 start; + gst_event_parse_seek(event.get(), &rate, &format, nullptr, &startType, &start, nullptr, nullptr); + if (format != GST_FORMAT_TIME || startType != GST_SEEK_TYPE_SET) { + GST_ERROR_OBJECT(element, "Rejecting unsupported seek event: %" GST_PTR_FORMAT, event.get()); +--- Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.orig 2026-04-29 23:00:00 ++++ Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2026-04-29 23:00:00 +@@ -644,7 +644,7 @@ + GstFormat format; + GstSeekFlags flags; + GstSeekType startType, stopType; +- int64_t start, stop; ++ gint64 start, stop; + gst_event_parse_seek(data->event.get(), &rate, &format, &flags, &startType, &start, &stopType, &stop); + if (!gst_element_send_event(pipeline, data->event.leakRef())) + return; +@@ -1408,7 +1408,7 @@ + if (GST_STATE(m_pipeline.get()) < GST_STATE_PAUSED) + return MediaTime::invalidTime(); + +- int64_t duration = 0; ++ gint64 duration = 0; + if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &duration) || !GST_CLOCK_TIME_IS_VALID(duration)) { + GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data()); + // https://www.w3.org/TR/2011/WD-html5-20110113/video.html#getting-media-metadata +@@ -4688,7 +4688,7 @@ + if (GST_BUFFER_PTS_IS_VALID(buffer)) { + auto segment = gst_sample_get_segment(m_sample.get()); + RELEASE_ASSERT(segment); +- uint64_t streamTime; ++ guint64 streamTime; + if (int sign = gst_segment_to_stream_time_full(segment, GST_FORMAT_TIME, GST_BUFFER_PTS(buffer), &streamTime)) + metadata.mediaTime = sign * fromGstClockTime(streamTime).toDouble(); + } +--- Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp.orig 2026-04-29 23:00:00 ++++ Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp 2026-04-29 23:00:00 +@@ -174,7 +174,7 @@ + + void MediaRecorderPrivateBackend::positionUpdated() + { +- int64_t position; ++ gint64 position; + if (!gst_element_query_position(m_pipeline.get(), GST_FORMAT_TIME, &position)) { + GST_LOG_OBJECT(m_pipeline.get(), "Could not query position"); + return; diff --git a/www/webkit2-gtk/files/patch-icu-68-true-false.diff b/www/webkit2-gtk/files/patch-icu-68-true-false.diff deleted file mode 100644 index 6b9617f239a..00000000000 --- a/www/webkit2-gtk/files/patch-icu-68-true-false.diff +++ /dev/null @@ -1,141 +0,0 @@ -diff --git Source/WTF/wtf/text/icu/UTextProvider.h Source/WTF/wtf/text/icu/UTextProvider.h -index c8f28d6ed3da..3c6fbeab6a5c 100644 ---- Source/WTF/wtf/text/icu/UTextProvider.h -+++ Source/WTF/wtf/text/icu/UTextProvider.h -@@ -79,12 +79,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int - // Ensure chunk offset is well formed if computed offset exceeds int32_t range. - ASSERT(offset < std::numeric_limits::max()); - text->chunkOffset = offset < std::numeric_limits::max() ? static_cast(offset) : 0; -- isAccessible = TRUE; -+ isAccessible = true; - return true; - } - if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) { - text->chunkOffset = text->chunkLength; -- isAccessible = FALSE; -+ isAccessible = false; - return true; - } - } else { -@@ -93,12 +93,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int - // Ensure chunk offset is well formed if computed offset exceeds int32_t range. - ASSERT(offset < std::numeric_limits::max()); - text->chunkOffset = offset < std::numeric_limits::max() ? static_cast(offset) : 0; -- isAccessible = TRUE; -+ isAccessible = true; - return true; - } - if (nativeIndex <= 0 && !text->chunkNativeStart) { - text->chunkOffset = 0; -- isAccessible = FALSE; -+ isAccessible = false; - return true; - } - } -diff --git Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp -index 0a646b7f390d..49980f95ba79 100644 ---- Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp -+++ Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp -@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward) - if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) { - // Already inside the buffer. Set the new offset. - uText->chunkOffset = static_cast(index - uText->chunkNativeStart); -- return TRUE; -+ return true; - } - if (index >= length && uText->chunkNativeLimit == length) { - // Off the end of the buffer, but we can't get it. - uText->chunkOffset = static_cast(index - uText->chunkNativeStart); -- return FALSE; -+ return false; - } - } else { - if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) { - // Already inside the buffer. Set the new offset. - uText->chunkOffset = static_cast(index - uText->chunkNativeStart); -- return TRUE; -+ return true; - } - if (!index && !uText->chunkNativeStart) { - // Already at the beginning; can't go any farther. - uText->chunkOffset = 0; -- return FALSE; -+ return false; - } - } - -@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward) - - uText->nativeIndexingLimit = uText->chunkLength; - -- return TRUE; -+ return true; - } - - static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status) -@@ -337,7 +337,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text) - static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) - { - if (!text->context) -- return FALSE; -+ return false; - int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text); - UBool isAccessible; - if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) -@@ -357,7 +357,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo - ASSERT(newContext == UTextProviderContext::PriorContext); - textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); - } -- return TRUE; -+ return true; - } - - static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) -diff --git Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp -index 69c8d091bd62..9c3fa709200a 100644 ---- Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp -+++ Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp -@@ -126,7 +126,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text) - static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) - { - if (!text->context) -- return FALSE; -+ return false; - int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); - UBool isAccessible; - if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) -@@ -146,7 +146,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo - ASSERT(newContext == UTextProviderContext::PriorContext); - textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); - } -- return TRUE; -+ return true; - } - - static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) -diff --git Source/WebCore/platform/text/TextCodecICU.cpp Source/WebCore/platform/text/TextCodecICU.cpp -index 19b41eb7125f..2f7d1930b8d7 100644 ---- Source/WebCore/platform/text/TextCodecICU.cpp -+++ Source/WebCore/platform/text/TextCodecICU.cpp -@@ -194,7 +194,7 @@ void TextCodecICU::createICUConverter() const - UErrorCode error = U_ZERO_ERROR; - m_converter = ICUConverterPtr { ucnv_open(m_canonicalConverterName, &error), ucnv_close }; - if (m_converter) -- ucnv_setFallback(m_converter.get(), TRUE); -+ ucnv_setFallback(m_converter.get(), true); - } - - int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& error) -diff --git Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -index 61e3f6050d7f..5a51b9ec1d68 100644 ---- Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -+++ Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -@@ -402,7 +402,7 @@ DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::~DrawingMonitor() - int DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::webViewDrawCallback(DrawingAreaProxyCoordinatedGraphics::DrawingMonitor* monitor) - { - monitor->didDraw(); -- return FALSE; -+ return false; - } - - void DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start(WTF::Function&& callback) diff --git a/www/webkit2-gtk/files/patch-ipc-darwin-sock-dgram.diff b/www/webkit2-gtk/files/patch-ipc-darwin-sock-dgram.diff new file mode 100644 index 00000000000..14f7f2706d4 --- /dev/null +++ b/www/webkit2-gtk/files/patch-ipc-darwin-sock-dgram.diff @@ -0,0 +1,29 @@ +--- Source/WebKit/Platform/IPC/unix/IPCUtilitiesUnix.cpp.orig ++++ Source/WebKit/Platform/IPC/unix/IPCUtilitiesUnix.cpp +@@ -34,6 +34,18 @@ + SocketPair createPlatformConnection(int socketType, unsigned options) + { + std::array sockets; ++ ++#if OS(DARWIN) ++ // macOS has a very small default buffer for AF_UNIX SOCK_DGRAM (2KB). ++ // WebKit IPC messages can be up to 4KB, so increase the buffer size. ++ socketType = SOCK_DGRAM; ++ RELEASE_ASSERT(socketpair(AF_UNIX, socketType, 0, sockets.data()) != -1); ++ constexpr int bufferSize = 262144; ++ setsockopt(sockets[0], SOL_SOCKET, SO_SNDBUF, &bufferSize, sizeof(bufferSize)); ++ setsockopt(sockets[1], SOL_SOCKET, SO_SNDBUF, &bufferSize, sizeof(bufferSize)); ++ setsockopt(sockets[0], SOL_SOCKET, SO_RCVBUF, &bufferSize, sizeof(bufferSize)); ++ setsockopt(sockets[1], SOL_SOCKET, SO_RCVBUF, &bufferSize, sizeof(bufferSize)); ++#else + + #if OS(LINUX) + if ((options & SetCloexecOnServer) || (options & SetCloexecOnClient)) { +@@ -48,6 +60,7 @@ + #endif + + RELEASE_ASSERT(socketpair(AF_UNIX, socketType, 0, sockets.data()) != -1); ++#endif // OS(DARWIN) + + if (options & SetCloexecOnServer) + RELEASE_ASSERT(setCloseOnExec(sockets[1])); diff --git a/www/webkit2-gtk/files/patch-jsc-glib-include-case-collision.diff b/www/webkit2-gtk/files/patch-jsc-glib-include-case-collision.diff new file mode 100644 index 00000000000..66575fb2b24 --- /dev/null +++ b/www/webkit2-gtk/files/patch-jsc-glib-include-case-collision.diff @@ -0,0 +1,82 @@ +--- Source/WebKit/PlatformGTK.cmake 2026-04-28 17:51:20 ++++ Source/WebKit/PlatformGTK.cmake 2026-04-28 17:51:20 +@@ -263,6 +263,7 @@ + "${WebKitGTK_FRAMEWORK_HEADERS_DIR}/webkitgtk-web-process-extension" + "${WebKitGTK_DERIVED_SOURCES_DIR}/webkit" + "${WebKitGTK_DERIVED_SOURCES_DIR}" ++ "${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}" + ) + + list(APPEND WebKit_PRIVATE_INCLUDE_DIRECTORIES +@@ -325,6 +326,7 @@ + list(APPEND WebKit_INTERFACE_INCLUDE_DIRECTORIES + ${WebKitGTK_DERIVED_SOURCES_DIR} + ${WebKitGTK_FRAMEWORK_HEADERS_DIR}/webkitgtk-web-process-extension ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR} + ) + + list(APPEND WebProcess_SOURCES +--- Source/JavaScriptCore/GLib.cmake 2026-04-28 17:51:20 ++++ Source/JavaScriptCore/GLib.cmake 2026-04-28 17:51:20 +@@ -63,12 +63,41 @@ + # These symbolic link allows includes like #include which simulates installed headers. + add_custom_command( + OUTPUT ${JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR}/jsc +- DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib +- COMMAND ln -n -s -f ${JAVASCRIPTCORE_DIR}/API/glib ${JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR}/jsc ++ DEPENDS ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc ++ COMMAND ln -n -s -f ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc ${JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR}/jsc ++ COMMENT "Installing jsc symlink" + VERBATIM + ) ++add_custom_command( ++ OUTPUT ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCOptions.h ++ DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib/JSCOptions.h ++ COMMAND cp -p ${JAVASCRIPTCORE_DIR}/API/glib/JSCOptions.h ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCOptions.h ++ VERBATIM ++) ++add_custom_command( ++ OUTPUT ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCAutocleanups.h ++ DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib/JSCAutocleanups.h ++ COMMAND cp -p ${JAVASCRIPTCORE_DIR}/API/glib/JSCAutocleanups.h ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCAutocleanups.h ++ VERBATIM ++) ++add_custom_command( ++ OUTPUT ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCContextPrivate.h ++ DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib/JSCContextPrivate.h ++ COMMAND cp -p ${JAVASCRIPTCORE_DIR}/API/glib/JSCContextPrivate.h ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCContextPrivate.h ++ VERBATIM ++) ++add_custom_command( ++ OUTPUT ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCValuePrivate.h ++ DEPENDS ${JAVASCRIPTCORE_DIR}/API/glib/JSCValuePrivate.h ++ COMMAND cp -p ${JAVASCRIPTCORE_DIR}/API/glib/JSCValuePrivate.h ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCValuePrivate.h ++ VERBATIM ++) + add_custom_target(JSC-fake-api-headers + DEPENDS ${JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR}/jsc ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCOptions.h ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCAutocleanups.h ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCContextPrivate.h ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR}/jsc/JSCValuePrivate.h + ) + set(JavaScriptCore_EXTRA_DEPENDENCIES + JSC-fake-api-headers +--- Tools/MiniBrowser/gtk/CMakeLists.txt 2026-04-29 22:00:00 ++++ Tools/MiniBrowser/gtk/CMakeLists.txt 2026-04-29 22:00:00 +@@ -22,6 +22,7 @@ + ${MiniBrowser_DERIVED_SOURCES_DIR} + ${WebKitGTK_FRAMEWORK_HEADERS_DIR} + ${CMAKE_SOURCE_DIR}/Source ++ ${JavaScriptCoreGLib_DERIVED_SOURCES_DIR} + ) + + set(MiniBrowser_PRIVATE_LIBRARIES +@@ -29,7 +30,7 @@ + + set(MiniBrowser_PRIVATE_LIBRARIES +- ${JavaScriptCore_LIBRARY_NAME} ++ JavaScriptCore + GTK::GTK + WebKit::WebKit + ) diff --git a/www/webkit2-gtk/files/patch-minibrowser-fallthrough-c23.diff b/www/webkit2-gtk/files/patch-minibrowser-fallthrough-c23.diff new file mode 100644 index 00000000000..aed0ad4ebc4 --- /dev/null +++ b/www/webkit2-gtk/files/patch-minibrowser-fallthrough-c23.diff @@ -0,0 +1,16 @@ +--- Tools/MiniBrowser/gtk/main.c.orig ++++ Tools/MiniBrowser/gtk/main.c +@@ -288,11 +288,11 @@ + switch (item[0]) { + case '!': + case '-': + enabled = FALSE; +- [[fallthrough]]; ++ __attribute__((fallthrough)); + case '+': + item++; +- [[fallthrough]]; ++ __attribute__((fallthrough)); + default: + break; + } diff --git a/www/webkit2-gtk/files/patch-minibrowser-show-all.diff b/www/webkit2-gtk/files/patch-minibrowser-show-all.diff new file mode 100644 index 00000000000..0a073a43d32 --- /dev/null +++ b/www/webkit2-gtk/files/patch-minibrowser-show-all.diff @@ -0,0 +1,11 @@ +--- Tools/MiniBrowser/gtk/main.c.orig ++++ Tools/MiniBrowser/gtk/main.c +@@ -983,7 +983,7 @@ + #endif + + gtk_widget_grab_focus(firstTab); +- gtk_widget_show(GTK_WIDGET(mainWindow)); ++ gtk_widget_show_all(GTK_WIDGET(mainWindow)); + } + + int main(int argc, char *argv[]) diff --git a/www/webkit2-gtk/files/patch-ramsize.diff b/www/webkit2-gtk/files/patch-ramsize.diff deleted file mode 100644 index f1bc41ba7bf..00000000000 --- a/www/webkit2-gtk/files/patch-ramsize.diff +++ /dev/null @@ -1,67 +0,0 @@ ---- Source/WTF/wtf/RAMSize.cpp.orig 2019-10-14 22:59:02.000000000 -0700 -+++ Source/WTF/wtf/RAMSize.cpp 2019-10-14 23:02:19.000000000 -0700 -@@ -29,6 +29,15 @@ - #include - #include - -+#if OS(DARWIN) -+#import -+#import -+#import -+#import -+#import -+static const size_t ramSizeGuess = 512 * MB; -+#else -+ - #if OS(WINDOWS) - #include - #elif defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC -@@ -39,6 +47,8 @@ - #include - #endif - -+#endif //OS(DARWIN) -+ - namespace WTF { - - #if OS(WINDOWS) -@@ -47,6 +57,29 @@ - - static size_t computeRAMSize() - { -+#if OS(DARWIN) -+ host_basic_info_data_t hostInfo; -+ -+ mach_port_t host = mach_host_self(); -+ mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT; -+ kern_return_t r = host_info(host, HOST_BASIC_INFO, (host_info_t)&hostInfo, &count); -+ mach_port_deallocate(mach_task_self(), host); -+ if (r != KERN_SUCCESS) { -+ LOG_ERROR("%s : host_info(%d) : %s.\n", __FUNCTION__, r, mach_error_string(r)); -+ return ramSizeGuess; -+ } -+ -+ if (hostInfo.max_mem > std::numeric_limits::max()) -+ return std::numeric_limits::max(); -+ -+ size_t sizeAccordingToKernel = static_cast(hostInfo.max_mem); -+ size_t multiple = 128 * MB; -+ -+ // Round up the memory size to a multiple of 128MB because max_mem may not be exactly 512MB -+ // (for example) and we have code that depends on those boundaries. -+ return ((sizeAccordingToKernel + multiple - 1) / multiple) * multiple; -+#else -+ - #if OS(WINDOWS) - MEMORYSTATUSEX status; - status.dwLength = sizeof(status); -@@ -65,6 +98,9 @@ - #else - return bmalloc::api::availableMemory(); - #endif -+ -+#endif //OS(DARWIN) -+ - } - - size_t ramSize() diff --git a/www/webkit2-gtk/files/patch-skia-add-skpathdump.diff b/www/webkit2-gtk/files/patch-skia-add-skpathdump.diff new file mode 100644 index 00000000000..2f96f0c1a0c --- /dev/null +++ b/www/webkit2-gtk/files/patch-skia-add-skpathdump.diff @@ -0,0 +1,9 @@ +--- Source/ThirdParty/skia/CMakeLists.txt.orig 2026-04-30 09:00:00 ++++ Source/ThirdParty/skia/CMakeLists.txt 2026-04-30 09:00:00 +@@ -191,6 +191,7 @@ + src/core/SkPathBuilder.cpp + src/core/SkPathData.cpp ++ src/core/SkPathDump.cpp + src/core/SkPathEffect.cpp + src/core/SkPathIter.cpp + src/core/SkPathMeasure.cpp diff --git a/www/webkit2-gtk/files/patch-snowleopard-cmakelists-stdcformatmacros.diff b/www/webkit2-gtk/files/patch-snowleopard-cmakelists-stdcformatmacros.diff deleted file mode 100644 index 9b45bf38e88..00000000000 --- a/www/webkit2-gtk/files/patch-snowleopard-cmakelists-stdcformatmacros.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- CMakeLists.txt.orig 2017-08-14 17:41:03.000000000 -0700 -+++ CMakeLists.txt 2017-08-14 17:43:39.000000000 -0700 -@@ -18,6 +18,9 @@ - set(ENABLE_TOOLS ON) - endif () - -+add_definitions(-D__STDC_FORMAT_MACROS) -+add_definitions(-DTARGET_OS_IOS=0) -+ - # ----------------------------------------------------------------------------- - # Determine which port will be built - # ----------------------------------------------------------------------------- diff --git a/www/webkit2-gtk/files/patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff b/www/webkit2-gtk/files/patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff deleted file mode 100644 index 8040dc72c23..00000000000 --- a/www/webkit2-gtk/files/patch-source-wtf-wtf-osallocatorposix-cpp-map-jit.diff +++ /dev/null @@ -1,16 +0,0 @@ -diff --git Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp -index a5eb8d44..051c439e 100644 ---- Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp -+++ Source/WTF/wtf/posix/OSAllocatorPOSIX.cpp -@@ -72,9 +72,11 @@ void* OSAllocator::reserveAndCommit(size_t bytes, Usage usage, bool writable, bo - - int flags = MAP_PRIVATE | MAP_ANON; - #if OS(DARWIN) -+#if defined(MAP_JIT) - if (executable) - flags |= MAP_JIT; - #endif -+#endif - - #if OS(DARWIN) - int fd = usage; diff --git a/www/webkit2-gtk/files/patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff b/www/webkit2-gtk/files/patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff deleted file mode 100644 index 47be9329e9b..00000000000 --- a/www/webkit2-gtk/files/patch-source-wtf-wtf-unix-cputimeunix-cpp-darwin-version-restore.diff +++ /dev/null @@ -1,79 +0,0 @@ -diff --git Source/WTF/wtf/unix/CPUTimeUnix.cpp Source/WTF/wtf/unix/CPUTimeUnix.cpp -index 27990893..fe279865 100644 ---- Source/WTF/wtf/unix/CPUTimeUnix.cpp -+++ Source/WTF/wtf/unix/CPUTimeUnix.cpp -@@ -26,6 +26,68 @@ - #include "config.h" - #include "CPUTime.h" - -+#if OS(DARWIN) -+#import -+#import -+#import -+#import -+#import -+#import -+ -+#include -+ -+namespace WTF { -+ -+static const int64_t microsecondsPerSecond = 1000000; -+ -+static int64_t timeValueToMicroseconds(const time_value_t& value) -+{ -+ int64_t result = value.seconds; -+ result *= microsecondsPerSecond; -+ result += value.microseconds; -+ return result; -+} -+ -+Optional CPUTime::get() -+{ -+ // Account for current threads. -+ task_thread_times_info threadInfoData; -+ mach_msg_type_number_t threadInfoCount = TASK_THREAD_TIMES_INFO_COUNT; -+ kern_return_t result = task_info(mach_task_self(), TASK_THREAD_TIMES_INFO, reinterpret_cast(&threadInfoData), &threadInfoCount); -+ if (result != KERN_SUCCESS) -+ return nullopt; -+ -+ int64_t userTime = timeValueToMicroseconds(threadInfoData.user_time); -+ int64_t systemTime = timeValueToMicroseconds(threadInfoData.system_time); -+ -+ // Account for termined threads. -+ task_basic_info taskInfoData; -+ mach_msg_type_number_t taskInfoCount = TASK_BASIC_INFO_COUNT; -+ result = task_info(mach_task_self(), TASK_BASIC_INFO, reinterpret_cast(&taskInfoData), &taskInfoCount); -+ if (result != KERN_SUCCESS) -+ return nullopt; -+ -+ userTime += timeValueToMicroseconds(taskInfoData.user_time); -+ systemTime += timeValueToMicroseconds(taskInfoData.system_time); -+ -+ return CPUTime { MonotonicTime::now(), Seconds::fromMicroseconds(userTime), Seconds::fromMicroseconds(systemTime) }; -+} -+ -+Seconds CPUTime::forCurrentThread() -+{ -+ mach_msg_type_number_t infoCount = THREAD_BASIC_INFO_COUNT; -+ thread_basic_info_data_t info; -+ -+ mach_port_t threadPort = mach_thread_self(); -+ thread_info(threadPort, THREAD_BASIC_INFO, reinterpret_cast(&info), &infoCount); -+ mach_port_deallocate(mach_task_self(), threadPort); -+ -+ return Seconds(info.user_time.seconds + info.system_time.seconds) + Seconds::fromMicroseconds(info.user_time.microseconds + info.system_time.microseconds); -+} -+ -+} -+#else //OS(DARWIN) -+ - #include - #include - #include -@@ -54,3 +114,4 @@ Seconds CPUTime::forCurrentThread() - } - - } -+#endif //OS(DARWIN) -\ No newline at end of file diff --git a/www/webkit2-gtk/files/patch-sqlite-init-deadlock.diff b/www/webkit2-gtk/files/patch-sqlite-init-deadlock.diff new file mode 100644 index 00000000000..40a9516e613 --- /dev/null +++ b/www/webkit2-gtk/files/patch-sqlite-init-deadlock.diff @@ -0,0 +1,26 @@ +--- Source/WebCore/platform/sql/SQLiteDatabase.cpp.orig 2026-05-11 14:00:40 ++++ Source/WebCore/platform/sql/SQLiteDatabase.cpp 2026-05-11 14:00:45 +@@ -70,23 +70,7 @@ + // aren't confident that it really is, and we still support ancient versions of SQLite. So + // std::call_once is used to stay on the safe side. See bug #143245. + +-#if OS(DARWIN) +- int ret; +- callOnMainThreadAndWait([&] { +- // In the Network process, this function can be called on a background thread when +- // creating WebKit::ResourceLoadStatisticsStore, which then races with +- // WebKit::NetworkProcess::initializeNetworkProcess(). Since both of those calls query +- // the Darwin user temp directory via confstr(), this should only be called from the +- // main thread. +- ret = sqlite3_initialize(); +- }); +-#else +- // On non-Darwin systems confstr() is MT-safe and it does not try to fiddle with environment +- // variables, and it is better initialize directly. This is true at least on Linux with the +- // supported C libraries (glibc, Musl, uClibc), the "big" BSDs (FreeBSD, NetBSD, OpenBSD), +- // and the Android C library (Bionic) does not even provide confstr(). + int ret = sqlite3_initialize(); +-#endif + + if (ret != SQLITE_OK) { + #if SQLITE_VERSION_NUMBER >= 3007015 diff --git a/www/webkit2-gtk/files/patch-webcore-documentloader-eventloop-include.diff b/www/webkit2-gtk/files/patch-webcore-documentloader-eventloop-include.diff new file mode 100644 index 00000000000..ae12ac69757 --- /dev/null +++ b/www/webkit2-gtk/files/patch-webcore-documentloader-eventloop-include.diff @@ -0,0 +1,9 @@ +--- Source/WebCore/loader/DocumentLoader.cpp.orig 2026-04-29 23:00:00 ++++ Source/WebCore/loader/DocumentLoader.cpp 2026-04-29 23:00:00 +@@ -53,6 +53,7 @@ + #include "Event.h" + #include "EventNames.h" ++#include "EventLoop.h" + #include "ExtensionStyleSheets.h" + #include "FormSubmission.h" + #include "FrameDestructionObserverInlines.h" diff --git a/www/webkit2-gtk/files/patch-webcore-platform-audio-directconvolver-disable-veclib.diff b/www/webkit2-gtk/files/patch-webcore-platform-audio-directconvolver-disable-veclib.diff deleted file mode 100644 index 76dd310f0e2..00000000000 --- a/www/webkit2-gtk/files/patch-webcore-platform-audio-directconvolver-disable-veclib.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- Source/WebCore/platform/audio/DirectConvolver.cpp.orig 2019-10-24 21:10:45.000000000 -0700 -+++ Source/WebCore/platform/audio/DirectConvolver.cpp 2019-10-24 21:11:19.000000000 -0700 -@@ -32,7 +32,7 @@ - - #include "DirectConvolver.h" - --#if OS(DARWIN) -+#if OS(DARWIN) && 0 - #include - #endif - diff --git a/www/webkit2-gtk/files/patch-webkit-argumentcoders-glib-case.diff b/www/webkit2-gtk/files/patch-webkit-argumentcoders-glib-case.diff new file mode 100644 index 00000000000..d9ccbc48a32 --- /dev/null +++ b/www/webkit2-gtk/files/patch-webkit-argumentcoders-glib-case.diff @@ -0,0 +1,10 @@ +--- Source/WebKit/Platform/IPC/ArgumentCoders.h.orig 2026-04-29 22:00:00 ++++ Source/WebKit/Platform/IPC/ArgumentCoders.h 2026-04-29 22:00:00 +@@ -50,7 +50,7 @@ + #endif + #if USE(GLIB) +-#include "ArgumentCodersGlib.h" ++#include "ArgumentCodersGlibStrv.h" + #include "RendererBufferFormat.h" + #endif + #if USE(UNIX_DOMAIN_SOCKETS) diff --git a/www/webkit2-gtk/files/patch-webkit-gtkpagerange-incomplete-type.diff b/www/webkit2-gtk/files/patch-webkit-gtkpagerange-incomplete-type.diff new file mode 100644 index 00000000000..c8d2ca9ef4d --- /dev/null +++ b/www/webkit2-gtk/files/patch-webkit-gtkpagerange-incomplete-type.diff @@ -0,0 +1,13 @@ +--- Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.h.orig ++++ Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.h +@@ -46,9 +46,7 @@ + WTF_IGNORE_WARNINGS_IN_THIRD_PARTY_CODE_END + #endif + +-typedef struct _GtkPrintSettings GtkPrintSettings; +-typedef struct _GtkPageSetup GtkPageSetup; +-typedef struct _GtkPageRange GtkPageRange; ++#include + + namespace WebCore { + class PrintContext; diff --git a/www/webkit2-gtk/files/patch-webkit-ipc-darwin-gtk.diff b/www/webkit2-gtk/files/patch-webkit-ipc-darwin-gtk.diff new file mode 100644 index 00000000000..e9501d9c469 --- /dev/null +++ b/www/webkit2-gtk/files/patch-webkit-ipc-darwin-gtk.diff @@ -0,0 +1,73 @@ +--- Source/WebKit/Platform/IPC/Attachment.h.orig 2026-04-30 01:00:00 ++++ Source/WebKit/Platform/IPC/Attachment.h 2026-04-30 01:00:00 +@@ -26,7 +26,9 @@ + + #pragma once + +-#if OS(DARWIN) ++#if USE(UNIX_DOMAIN_SOCKETS) ++#include ++#elif OS(DARWIN) + #include + #endif + +@@ -35,22 +37,18 @@ + #include + #endif + +-#if USE(UNIX_DOMAIN_SOCKETS) +-#include +-#endif +- + namespace IPC { + + // IPC::Attachment is a type representing objects that cannot be transferred as data, + // rather they are transferred via operating system cross-process communication primitives. +-#if OS(DARWIN) ++#if USE(UNIX_DOMAIN_SOCKETS) ++using Attachment = UnixFileDescriptor; ++#elif OS(DARWIN) + using Attachment = MachSendRight; + #elif OS(WINDOWS) + struct Attachment { }; // Windows does not need attachments at the moment. + #elif OS(ANDROID) + using Attachment = Variant>; +-#elif USE(UNIX_DOMAIN_SOCKETS) +-using Attachment = UnixFileDescriptor; + #else + #error Unsupported platform + #endif +--- Source/WebKit/Platform/IPC/Connection.h.orig 2026-04-30 01:00:00 ++++ Source/WebKit/Platform/IPC/Connection.h 2026-04-30 01:00:00 +@@ -342,10 +342,8 @@ + }; + + #if OS(DARWIN) +- xpc_connection_t xpcConnection() const { return m_xpcConnection.get(); } +- XPCObjectPtr protectedXPCConnection() const { return xpcConnection(); } + std::optional getAuditToken(); + pid_t remoteProcessID() const; + #endif + + #if USE(GLIB) +--- Source/WebKit/Platform/IPC/glib/ConnectionGLib.cpp.orig 2026-04-30 01:00:00 ++++ Source/WebKit/Platform/IPC/glib/ConnectionGLib.cpp 2026-04-30 01:00:00 +@@ -482,6 +482,18 @@ + g_socket_set_blocking(m_socket.get(), FALSE); + } + ++#if OS(DARWIN) ++pid_t Connection::remoteProcessID() const ++{ ++ return 0; ++} ++ ++std::optional Connection::getAuditToken() ++{ ++ return std::nullopt; ++} ++#endif ++ + pid_t Connection::remoteProcessID(GSocket* socket) + { + GRefPtr connection = adoptGRef(G_UNIX_CONNECTION(g_object_new(G_TYPE_UNIX_CONNECTION, "socket", socket, nullptr))); diff --git a/www/webkit2-gtk/files/patch-webkit-serialization-elif-darwin.diff b/www/webkit2-gtk/files/patch-webkit-serialization-elif-darwin.diff new file mode 100644 index 00000000000..d6c7ff07c17 --- /dev/null +++ b/www/webkit2-gtk/files/patch-webkit-serialization-elif-darwin.diff @@ -0,0 +1,36 @@ +--- Source/WebKit/Platform/IPC/ConnectionHandle.serialization.in.orig 2026-04-28 13:00:57 ++++ Source/WebKit/Platform/IPC/ConnectionHandle.serialization.in 2026-04-28 13:00:57 +@@ -25,10 +25,4 @@ + #if USE(UNIX_DOMAIN_SOCKETS) + UnixFileDescriptor m_handle; + #endif +-#if OS(WINDOWS) +- Win32Handle m_handle; +-#endif +-#if OS(DARWIN) +- MachSendRight m_handle; +-#endif + } +--- Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in.orig 2026-04-29 22:00:00 ++++ Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in 2026-04-29 22:00:00 +@@ -2578,21 +2578,12 @@ + + #if USE(UNIX_DOMAIN_SOCKETS) + headers: "ArgumentCodersUnix.h" +-#endif +-#if OS(DARWIN) +-header: + #endif + + [CustomHeader, RValue, WebKitPlatform] class WebCore::SharedMemoryHandle { + #if USE(UNIX_DOMAIN_SOCKETS) + [Validator='!!m_handle && *m_handle'] UnixFileDescriptor m_handle; + #endif +-#if OS(DARWIN) +- [Validator='!!m_handle && *m_handle'] MachSendRight m_handle; +-#endif +-#if OS(WINDOWS) +- [Validator='!!m_handle && *m_handle'] Win32Handle m_handle; +-#endif + uint64_t m_size; + }; diff --git a/www/webkit2-gtk/files/patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff b/www/webkit2-gtk/files/patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff deleted file mode 100644 index 940cfd4dfce..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2-gtk-fixes-for-libxml2-2.12.0.diff +++ /dev/null @@ -1,56 +0,0 @@ -From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001 -From: Adrian Perez de Castro -Date: Mon, 20 Nov 2023 07:42:30 -0800 -Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change - https://bugs.webkit.org/show_bug.cgi?id=265128 - -Reviewed by Philippe Normand. - -Starting with libxml2 2.12.0, the API has changed the const-ness of the -xmlError pointers, which results in a build error due to a mismatched -type in the parsing error callback. This papers over the difference by -using preprocessor conditionals. - -* Source/WebCore/xml/XSLTProcessor.h: Use const when building against - libxml2 2.12.0 or newer. -* Source/WebCore/xml/XSLTProcessorLibxslt.cpp: -(WebCore::XSLTProcessor::parseErrorFunc): Ditto. - -Canonical link: https://commits.webkit.org/270977@main ---- - Source/WebCore/xml/XSLTProcessor.h | 4 ++++ - Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git Source/WebCore/xml/XSLTProcessor.h Source/WebCore/xml/XSLTProcessor.h -index 21bb45b5cbe16..5cf20557918fa 100644 ---- Source/WebCore/xml/XSLTProcessor.h -+++ Source/WebCore/xml/XSLTProcessor.h -@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted { - - void reset(); - -+#if LIBXML_VERSION >= 21200 -+ static void parseErrorFunc(void* userData, const xmlError*); -+#else - static void parseErrorFunc(void* userData, xmlError*); -+#endif - static void genericErrorFunc(void* userData, const char* msg, ...); - - // Only for libXSLT callbacks -diff --git Source/WebCore/xml/XSLTProcessorLibxslt.cpp Source/WebCore/xml/XSLTProcessorLibxslt.cpp -index a65691087e3c5..9f6b363dfc6c9 100644 ---- Source/WebCore/xml/XSLTProcessorLibxslt.cpp -+++ Source/WebCore/xml/XSLTProcessorLibxslt.cpp -@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...) - // It would be nice to do something with this error message. - } - -+#if LIBXML_VERSION >= 21200 -+void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error) -+#else - void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error) -+#endif - { - PageConsoleClient* console = static_cast(userData); - if (!console) \ No newline at end of file diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-2282-os-log-availability.diff b/www/webkit2-gtk/files/patch-webkit2gtk-2282-os-log-availability.diff deleted file mode 100644 index 9c12d69184d..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-2282-os-log-availability.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git Source/ThirdParty/ANGLE/src/common/debug.cpp Source/ThirdParty/ANGLE/src/common/debug.cpp -index c26815d3..b07914be 100644 ---- Source/ThirdParty/ANGLE/src/common/debug.cpp -+++ Source/ThirdParty/ANGLE/src/common/debug.cpp -@@ -21,7 +21,7 @@ - # include - #endif - --#if defined(ANGLE_PLATFORM_APPLE) -+#if defined(ANGLE_PLATFORM_APPLE) && MAC_OS_X_VERSION_MAX_ALLOWED > 101200 - # include - #endif - -@@ -232,7 +232,7 @@ void Trace(LogSeverity severity, const char *message) - } - __android_log_print(android_priority, "ANGLE", "%s: %s\n", LogSeverityName(severity), - str.c_str()); --#elif defined(ANGLE_PLATFORM_APPLE) -+#elif defined(ANGLE_PLATFORM_APPLE) && MAC_OS_X_VERSION_MAX_ALLOWED > 101200 - if (__builtin_available(macOS 10.12, iOS 10.0, *)) - { - os_log_type_t apple_log_type = OS_LOG_TYPE_DEFAULT; diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-2282-unprotected-egl-changes.diff b/www/webkit2-gtk/files/patch-webkit2gtk-2282-unprotected-egl-changes.diff deleted file mode 100644 index 6c35a2c3b4a..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-2282-unprotected-egl-changes.diff +++ /dev/null @@ -1,68 +0,0 @@ -These changes were added in - - -they don't compile, as they use EGL unprotected, but even when some of them were protected by USE(EGL) there were - errors when trying to play videos in the MiniBrowser. So I added protection to all the addition bits in - the commit that were not initially protected. - - -diff --git Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp -index ad632205..29a9eace 100644 ---- Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp -+++ Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp -@@ -23,7 +23,7 @@ - #if USE(GSTREAMER) - #include - --#if USE(GSTREAMER_GL) -+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) - #include - #endif - -@@ -508,6 +508,7 @@ template<> void derefGPtr(GstGLContext* ptr) - gst_object_unref(GST_OBJECT(ptr)); - } - -+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) - template <> GRefPtr adoptGRef(GstEGLImage* ptr) - { - return GRefPtr(ptr, GRefPtrAdopt); -@@ -525,6 +526,7 @@ template <> void derefGPtr(GstEGLImage* ptr) - if (ptr) - gst_egl_image_unref(ptr); - } -+#endif //USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) - - #endif // USE(GSTREAMER_GL) - -diff --git Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h -index d940f8ca..bda2f024 100644 ---- Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h -+++ Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h -@@ -30,9 +30,13 @@ typedef struct _WebKitWebSrc WebKitWebSrc; - #if USE(GSTREAMER_GL) - typedef struct _GstGLDisplay GstGLDisplay; - typedef struct _GstGLContext GstGLContext; -+ -+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) - typedef struct _GstEGLImage GstEGLImage; - #endif - -+#endif -+ - namespace WTF { - - template<> GRefPtr adoptGRef(GstPlugin* ptr); -@@ -133,9 +137,12 @@ template<> GRefPtr adoptGRef(GstGLContext* ptr); - template<> GstGLContext* refGPtr(GstGLContext* ptr); - template<> void derefGPtr(GstGLContext* ptr); - -+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) - template<> GRefPtr adoptGRef(GstEGLImage* ptr); - template<> GstEGLImage* refGPtr(GstEGLImage* ptr); - template<> void derefGPtr(GstEGLImage* ptr); -+#endif // USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF) -+ - #endif - - } // namespace WTF diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-272-macports.diff b/www/webkit2-gtk/files/patch-webkit2gtk-272-macports.diff deleted file mode 100644 index 1acbf10ec3a..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-272-macports.diff +++ /dev/null @@ -1,83 +0,0 @@ -diff --git Source/WebKit/NetworkProcess/NetworkLoadParameters.h Source/WebKit/NetworkProcess/NetworkLoadParameters.h -index de74d33a..fb021faa 100644 ---- Source/WebKit/NetworkProcess/NetworkLoadParameters.h -+++ Source/WebKit/NetworkProcess/NetworkLoadParameters.h -@@ -35,6 +35,9 @@ - #include - #include - -+/* audit_token_t */ -+#include -+ - namespace WebKit { - - enum class PreconnectOnly { No, Yes }; -diff --git Source/WebKit/Platform/IPC/ArgumentCoders.h Source/WebKit/Platform/IPC/ArgumentCoders.h -index f1ea1ecb..12ceec79 100644 ---- Source/WebKit/Platform/IPC/ArgumentCoders.h -+++ Source/WebKit/Platform/IPC/ArgumentCoders.h -@@ -34,6 +34,9 @@ - #include - #include - -+/* audit_token_t */ -+#include -+ - namespace IPC { - - // An argument coder works on POD types -diff --git Source/WebKit/Shared/SandboxExtension.h Source/WebKit/Shared/SandboxExtension.h -index 5839d3fc..6f110183 100644 ---- Source/WebKit/Shared/SandboxExtension.h -+++ Source/WebKit/Shared/SandboxExtension.h -@@ -33,6 +33,9 @@ - #include - #include - -+/* audit_token_t */ -+#include -+ - namespace IPC { - class Encoder; - class Decoder; -diff --git Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp -index 57e8a557..45df4cf6 100644 ---- ./Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp.orig 2019-11-22 04:57:54.000000000 -0800 -+++ ./Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp 2019-11-27 05:52:39.000000000 -0800 -@@ -354,9 +354,10 @@ - " ", - webGLEnabled(request) ? "Yes" : "No"); - -+#if USE(GLX) - auto glContext = GLContext::createOffscreenContext(); - glContext->makeContextCurrent(); -- -+#endif - g_string_append_printf(html, - " " - "
API
" -@@ -370,7 +371,7 @@ - " %s" - " ", - nativeInterface()); -- -+#if USE(GLX) - g_string_append_printf(html, - " " - "
GL_RENDERER
" -@@ -398,7 +399,6 @@ - " %s" - " ", - reinterpret_cast(glGetString(GL_SHADING_LANGUAGE_VERSION))); -- - #if USE(OPENGL_ES) - g_string_append_printf(html, - " " -@@ -423,6 +423,7 @@ - extensions->str); - g_string_free(extensions, TRUE); - #endif -+#endif - - bool isGLX = false; - #if USE(GLX) diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-macports.diff b/www/webkit2-gtk/files/patch-webkit2gtk-macports.diff deleted file mode 100644 index 2bef47e1e2c..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-macports.diff +++ /dev/null @@ -1,200 +0,0 @@ -commit 504d7c6714f59b27028a43949f0088f9c19b39d7 -Date: Sun Oct 13 16:03:12 2019 -0700 - - webkit2-gtk: patchset to enable build on MacPorts - - presently Mojave against 10.14 SDK, building X11 - -diff --git Source/JavaScriptCore/shell/PlatformGTK.cmake Source/JavaScriptCore/shell/PlatformGTK.cmake -index c4ac7c9a..cf2fc2d6 100644 ---- Source/JavaScriptCore/shell/PlatformGTK.cmake -+++ Source/JavaScriptCore/shell/PlatformGTK.cmake -@@ -1,3 +1,7 @@ - list(APPEND jsc_LIBRARIES - ${GLIB_LIBRARIES} - ) -+ -+list(APPEND jsc_PRIVATE_INCLUDE_DIRECTORIES -+ ${WTF_DIR} -+) -diff --git Source/WTF/CMakeLists.txt Source/WTF/CMakeLists.txt -index 7c615c55..dd221b1a 100644 ---- Source/WTF/CMakeLists.txt -+++ Source/WTF/CMakeLists.txt -@@ -6,6 +6,6 @@ add_subdirectory(wtf) - - # Apple builds have the ICU headers checked into ${WTF_DIR}/icu - # Copy them into ${ICU_INCLUDE_DIRS} so the build behaves like find_package was used --if (APPLE) -+if (DISABLEAPPLE) - file(COPY ${WTF_DIR}/icu/unicode DESTINATION ${ICU_INCLUDE_DIRS}) - endif () -diff --git Source/WebCore/CMakeLists.txt Source/WebCore/CMakeLists.txt -index a5b62f40..440ef671 100644 ---- Source/WebCore/CMakeLists.txt -+++ Source/WebCore/CMakeLists.txt -@@ -178,6 +178,10 @@ set(WebCore_SYSTEM_INCLUDE_DIRECTORIES - ${ZLIB_INCLUDE_DIRS} - ) - -+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES -+ ${PAL_DIR} -+) -+ - set(WebCore_IDL_INCLUDES - css - dom -diff --git Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h -new file mode 100644 -index 00000000..cf113819 ---- /dev/null -+++ Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h -@@ -0,0 +1,117 @@ -+/* -+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' -+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS -+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -+ * THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#pragma once -+ -+#if USE(APPLE_INTERNAL_SDK) -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#else -+ -+#ifndef _CC_RSACRYPTOR_H_ -+enum { -+ kCCDigestNone = 0, -+ kCCDigestSHA1 = 8, -+ kCCDigestSHA224 = 9, -+ kCCDigestSHA256 = 10, -+ kCCDigestSHA384 = 11, -+ kCCDigestSHA512 = 12, -+}; -+typedef uint32_t CCDigestAlgorithm; -+ -+enum { -+ ccRSAKeyPublic = 0, -+ ccRSAKeyPrivate = 1 -+}; -+typedef uint32_t CCRSAKeyType; -+ -+enum { -+ ccPKCS1Padding = 1001, -+ ccOAEPPadding = 1002, -+ ccRSAPSSPadding = 1005 -+}; -+typedef uint32_t CCAsymmetricPadding; -+#endif -+ -+typedef struct _CCRSACryptor *CCRSACryptorRef; -+extern "C" CCCryptorStatus CCRSACryptorEncrypt(CCRSACryptorRef publicKey, CCAsymmetricPadding padding, const void *plainText, size_t plainTextLen, void *cipherText, size_t *cipherTextLen, const void *tagData, size_t tagDataLen, CCDigestAlgorithm digestType); -+extern "C" CCCryptorStatus CCRSACryptorDecrypt(CCRSACryptorRef privateKey, CCAsymmetricPadding padding, const void *cipherText, size_t cipherTextLen, void *plainText, size_t *plainTextLen, const void *tagData, size_t tagDataLen, CCDigestAlgorithm digestType); -+extern "C" CCCryptorStatus CCRSACryptorSign(CCRSACryptorRef privateKey, CCAsymmetricPadding padding, const void *hashToSign, size_t hashSignLen, CCDigestAlgorithm digestType, size_t saltLen, void *signedData, size_t *signedDataLen); -+extern "C" CCCryptorStatus CCRSACryptorVerify(CCRSACryptorRef publicKey, CCAsymmetricPadding padding, const void *hash, size_t hashLen, CCDigestAlgorithm digestType, size_t saltLen, const void *signedData, size_t signedDataLen); -+extern "C" CCCryptorStatus CCRSACryptorGeneratePair(size_t keysize, uint32_t e, CCRSACryptorRef *publicKey, CCRSACryptorRef *privateKey); -+extern "C" CCRSACryptorRef CCRSACryptorGetPublicKeyFromPrivateKey(CCRSACryptorRef privkey); -+extern "C" void CCRSACryptorRelease(CCRSACryptorRef key); -+extern "C" CCCryptorStatus CCRSAGetKeyComponents(CCRSACryptorRef rsaKey, uint8_t *modulus, size_t *modulusLength, uint8_t *exponent, size_t *exponentLength, uint8_t *p, size_t *pLength, uint8_t *q, size_t *qLength); -+extern "C" CCRSAKeyType CCRSAGetKeyType(CCRSACryptorRef key); -+extern "C" CCCryptorStatus CCRSACryptorImport(const void *keyPackage, size_t keyPackageLen, CCRSACryptorRef *key); -+extern "C" CCCryptorStatus CCRSACryptorExport(CCRSACryptorRef key, void *out, size_t *outLen); -+ -+extern "C" CCCryptorStatus CCRSAGetCRTComponentsSizes(CCRSACryptorRef rsaKey, size_t *dpSize, size_t *dqSize, size_t *qinvSize); -+extern "C" CCCryptorStatus CCRSAGetCRTComponents(CCRSACryptorRef rsaKey, void *dp, size_t dpSize, void *dq, size_t dqSize, void *qinv, size_t qinvSize); -+ -+#ifndef _CC_ECCRYPTOR_H_ -+enum { -+ ccECKeyPublic = 0, -+ ccECKeyPrivate = 1, -+}; -+typedef uint32_t CCECKeyType; -+ -+enum { -+ kCCImportKeyBinary = 0, -+}; -+typedef uint32_t CCECKeyExternalFormat; -+#endif -+ -+typedef struct _CCECCryptor *CCECCryptorRef; -+extern "C" CCCryptorStatus CCECCryptorGeneratePair(size_t keysize, CCECCryptorRef *publicKey, CCECCryptorRef *privateKey); -+extern "C" void CCECCryptorRelease(CCECCryptorRef key); -+extern "C" CCCryptorStatus CCECCryptorImportKey(CCECKeyExternalFormat format, const void *keyPackage, size_t keyPackageLen, CCECKeyType keyType, CCECCryptorRef *key); -+extern "C" CCCryptorStatus CCECCryptorExportKey(CCECKeyExternalFormat format, void *keyPackage, size_t *keyPackageLen, CCECKeyType keyType, CCECCryptorRef key); -+extern "C" int CCECGetKeySize(CCECCryptorRef key); -+extern "C" CCCryptorStatus CCECCryptorCreateFromData(size_t keySize, uint8_t *qX, size_t qXLength, uint8_t *qY, size_t qYLength, CCECCryptorRef *ref); -+extern "C" CCCryptorStatus CCECCryptorGetKeyComponents(CCECCryptorRef ecKey, size_t *keySize, uint8_t *qX, size_t *qXLength, uint8_t *qY, size_t *qYLength, uint8_t *d, size_t *dLength); -+extern "C" CCCryptorStatus CCECCryptorComputeSharedSecret(CCECCryptorRef privateKey, CCECCryptorRef publicKey, void *out, size_t *outLen); -+extern "C" CCCryptorStatus CCECCryptorSignHash(CCECCryptorRef privateKey, const void *hashToSign, size_t hashSignLen, void *signedData, size_t *signedDataLen); -+extern "C" CCCryptorStatus CCECCryptorVerifyHash(CCECCryptorRef publicKey, const void *hash, size_t hashLen, const void *signedData, size_t signedDataLen, uint32_t *valid); -+ -+#ifndef CommonCrypto_CommonNistKeyDerivation_h -+enum { -+ kCCKDFAlgorithmHKDF = 6 -+}; -+typedef uint32_t CCKDFAlgorithm; -+#endif -+ -+extern "C" CCStatus CCKeyDerivationHMac(CCKDFAlgorithm algorithm, CCDigestAlgorithm digest, unsigned rounds, const void *keyDerivationKey, size_t keyDerivationKeyLen, const void *label, size_t labelLen, const void *context, size_t contextLen, const void *iv, size_t ivLen, const void *salt, size_t saltLen, void *derivedKey, size_t derivedKeyLen); -+ -+extern "C" CCCryptorStatus CCCryptorGCM(CCOperation op, CCAlgorithm alg, const void* key, size_t keyLength, const void* iv, size_t ivLen, const void* aData, size_t aDataLen, const void* dataIn, size_t dataInLength, void* dataOut, void* tag, size_t* tagLength); -+extern "C" CCCryptorStatus CCRSACryptorCreateFromData(CCRSAKeyType keyType, const uint8_t *modulus, size_t modulusLength, const uint8_t *exponent, size_t exponentLength, const uint8_t *p, size_t pLength, const uint8_t *q, size_t qLength, CCRSACryptorRef *ref); -+ -+#endif // !USE(APPLE_INTERNAL_SDK) ---- Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.orig 2019-11-26 03:02:20.000000000 -0800 -+++ Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-11-26 14:56:04.000000000 -0800 -@@ -1504,7 +1504,7 @@ - if (GST_STATE(m_pipeline.get()) < GST_STATE_PAUSED) - return MediaTime::invalidTime(); - -- int64_t duration = 0; -+ gint64 duration = 0; - if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &duration) || !GST_CLOCK_TIME_IS_VALID(duration)) { - GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data()); - return MediaTime::positiveInfiniteTime(); -@@ -2267,7 +2267,7 @@ - GUniqueOutPtr responseHeaders; - if (gst_structure_get(structure, "response-headers", GST_TYPE_STRUCTURE, &responseHeaders.outPtr(), nullptr)) { - CString contentLengthHeaderName = httpHeaderNameString(HTTPHeaderName::ContentLength).utf8(); -- uint64_t contentLength = 0; -+ guint64 contentLength = 0; - if (!gst_structure_get_uint64(responseHeaders.get(), contentLengthHeaderName.data(), &contentLength)) { - // souphttpsrc sets a string for Content-Length, so - // handle it here, until we remove the webkit+ protocol -@@ -3707,8 +3707,8 @@ Optional MediaPlayerPrivateGStreamer::videoPlayback - if (!webkitGstCheckVersion(1, 17, 0) && !m_fpsSink) - return WTF::nullopt; - -- uint64_t totalVideoFrames = 0; -- uint64_t droppedVideoFrames = 0; -+ guint64 totalVideoFrames = 0; -+ guint64 droppedVideoFrames = 0; - if (webkitGstCheckVersion(1, 17, 0)) { - GUniqueOutPtr stats; - g_object_get(m_videoSink.get(), "stats", &stats.outPtr(), nullptr); diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff b/www/webkit2-gtk/files/patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff deleted file mode 100644 index 1467441a2bc..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-source-javascriptcore-jit-executableallocator-missingfcntl-h-older-systems.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- Source/JavaScriptCore/jit/ExecutableAllocator.cpp.orig 2019-11-30 14:05:23.000000000 -0800 -+++ Source/JavaScriptCore/jit/ExecutableAllocator.cpp 2019-11-30 14:07:28.000000000 -0800 -@@ -43,6 +43,10 @@ - #include - #endif - -+#if OS(DARWIN) && (__MAC_OS_X_VERSION_MAX_ALLOWED <= 1070) -+#include -+#endif -+ - #if PLATFORM(IOS_FAMILY) - #include - #endif diff --git a/www/webkit2-gtk/files/patch-webkit2gtk-specify-installed-dylibs.diff b/www/webkit2-gtk/files/patch-webkit2gtk-specify-installed-dylibs.diff deleted file mode 100644 index 4835e65a084..00000000000 --- a/www/webkit2-gtk/files/patch-webkit2gtk-specify-installed-dylibs.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- Source/WebKit/PlatformGTK.cmake.orig 2022-08-26 16:20:42.000000000 -0700 -+++ Source/WebKit/PlatformGTK.cmake 2022-08-26 16:48:49.000000000 -0700 -@@ -727,13 +727,13 @@ - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib - DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -- COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib -+ COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib --shared-library=${CMAKE_INSTALL_NAME_DIR}/libwebkit2gtk-${WEBKITGTK_API_VERSION}.dylib - ) - - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib - DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -- COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib -+ COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.typelib --shared-library=${CMAKE_INSTALL_NAME_DIR}/libwebkit2gtk-${WEBKITGTK_API_VERSION}.dylib - ) - - ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib) ---- Source/JavaScriptCore/PlatformGTK.cmake.orig 2022-08-26 16:56:19.000000000 -0700 -+++ Source/JavaScriptCore/PlatformGTK.cmake 2022-08-26 16:58:25.000000000 -0700 -@@ -101,7 +101,7 @@ - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -- COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib -+ COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.typelib --shared-library=${CMAKE_INSTALL_NAME_DIR}/libjavascriptcoregtk-${WEBKITGTK_API_VERSION}.dylib - VERBATIM - ) - diff --git a/www/webkit2-gtk/files/patch-wtf-apple-cocoa-missing-files.diff b/www/webkit2-gtk/files/patch-wtf-apple-cocoa-missing-files.diff new file mode 100644 index 00000000000..4bcbaf7b40c --- /dev/null +++ b/www/webkit2-gtk/files/patch-wtf-apple-cocoa-missing-files.diff @@ -0,0 +1,26 @@ +--- Source/WTF/wtf/CMakeLists.txt.orig 2026-04-29 23:00:00 ++++ Source/WTF/wtf/CMakeLists.txt 2026-04-29 23:00:00 +@@ -700,10 +700,10 @@ + win/SoftLinking.h + win/Win32Handle.h + ) + elseif (APPLE) + list(APPEND WTF_SOURCES +- darwin/OSLogPrintStream.mm ++ darwin/OSLogPrintStream.cpp + ) + + list(APPEND WTF_PUBLIC_HEADERS + cf/CFURLExtras.h +@@ -723,8 +723,11 @@ + darwin/DispatchExtras.h + darwin/DispatchOSObject.h ++ darwin/LibraryPathDiagnostics.h + darwin/NetworkOSObject.h + darwin/OSLogPrintStream.h ++ darwin/TypeCastsOSObject.h + darwin/WeakLinking.h + darwin/XPCExtras.h ++ darwin/XPCObjectPtr.h + + spi/cf/CFBundleSPI.h diff --git a/www/webkit2-gtk/files/patch-wtf-mach-vm-types-include.diff b/www/webkit2-gtk/files/patch-wtf-mach-vm-types-include.diff new file mode 100644 index 00000000000..522ad06a5aa --- /dev/null +++ b/www/webkit2-gtk/files/patch-wtf-mach-vm-types-include.diff @@ -0,0 +1,13 @@ +--- Source/WTF/wtf/PlatformHave.h.orig ++++ Source/WTF/wtf/PlatformHave.h +@@ -66,6 +66,10 @@ + #define HAVE_ARM_IDIV_INSTRUCTIONS 1 + #endif + ++/* Older macOS SDKs use mach_vm_offset_t in MACH_VM_MAX_ADDRESS without ++ including its declaration; pull it in explicitly. */ ++#include ++ + #if CPU(ADDRESS64) + #if HAVE(36BIT_ADDRESS) + #define WTF_OS_CONSTANT_EFFECTIVE_ADDRESS_WIDTH 36 diff --git a/www/webkit2-gtk/files/snowmath.h b/www/webkit2-gtk/files/snowmath.h deleted file mode 100755 index 898913ec4eb..00000000000 --- a/www/webkit2-gtk/files/snowmath.h +++ /dev/null @@ -1,8 +0,0 @@ -extern "C" { - extern long long int llrint ( double ); - extern long long int llrintf ( float ); - extern long long int llround ( double ); - extern long long int llroundf ( float ); - extern long long int llrintl(long double); - extern long long int llroundl(long double); -} diff --git a/www/webkit2-gtk/files/stub-TypeCastsOSObject.h b/www/webkit2-gtk/files/stub-TypeCastsOSObject.h new file mode 100644 index 00000000000..3b34d65991b --- /dev/null +++ b/www/webkit2-gtk/files/stub-TypeCastsOSObject.h @@ -0,0 +1,16 @@ +// Stub for GTK port on macOS — the real header requires Objective-C. +#pragma once + +#include + +#ifndef OS_OBJECT_CLASS +#define OS_OBJECT_CLASS(name) OS_##name +#endif + +namespace WTF { +template struct OSObjectTypeCastTraits; +} + +// No-op macros: type-cast traits and isOSObject checks are not needed for GTK. +#define WTF_DECLARE_OS_OBJECT_TYPE_CAST_TRAITS_INTERNAL(TypeName, Suffix) +#define WTF_IMPLEMENT_IS_OS_OBJECT_FUNCTIONS_INTERNAL(TypeName, ProtocolString) diff --git a/www/webkit2-gtk/files/stub-epoxy-egl.h b/www/webkit2-gtk/files/stub-epoxy-egl.h new file mode 100644 index 00000000000..240117ae90a --- /dev/null +++ b/www/webkit2-gtk/files/stub-epoxy-egl.h @@ -0,0 +1,256 @@ +/* stub epoxy/egl.h for macOS — EGL is not available on this platform. + * Provides type definitions and no-op stubs so that WebKit EGL source files + * compile. At runtime, EGL code paths are never taken on macOS. + * + * Type definitions follow the Khronos EGL 1.5 specification. + */ +#pragma once + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EGL basic types */ +typedef unsigned int EGLBoolean; +typedef unsigned int EGLenum; +typedef int32_t EGLint; +typedef intptr_t EGLAttrib; +typedef void *EGLDisplay; +typedef void *EGLConfig; +typedef void *EGLSurface; +typedef void *EGLContext; +typedef void *EGLImage; +typedef void *EGLImageKHR; +typedef void *EGLSync; +typedef void *EGLSyncKHR; +typedef void *EGLClientBuffer; +typedef void *EGLDeviceEXT; +typedef void (*__eglMustCastToProperFunctionPointerType)(void); +typedef uint64_t EGLNativeWindowType; +typedef void *EGLNativeDisplayType; + +/* EGL constants */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E +#define EGL_NONE 0x3038 +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) +#define EGL_NO_IMAGE ((EGLImage)0) +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#define EGL_NO_SYNC ((EGLSync)0) + +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_EXTENSIONS 0x3055 +#define EGL_VERSION 0x3054 +#define EGL_VENDOR 0x3053 + +#define EGL_PBUFFER_BIT 0x0001 +#define EGL_PIXMAP_BIT 0x0002 +#define EGL_WINDOW_BIT 0x0004 + +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENGL_API 0x30A2 +#define EGL_OPENGL_ES_BIT 0x0001 +#define EGL_OPENGL_ES2_BIT 0x0004 +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + +#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_SYNC_FENCE_KHR 0x30F9 +#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 +#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 + +/* Extension tokens */ +#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD +#define EGL_PIXEL_LAYOUT 0 /* placeholder */ + +/* EGL_EXT_image_dma_buf_import */ +#define EGL_LINUX_DMA_BUF_EXT 0x3270 +#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 +#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 +#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 +#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 +#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 +#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 +#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 +#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 +#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 +#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A +/* EGL_EXT_image_dma_buf_import_modifiers */ +#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 +#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 +#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 +#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 +#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 +#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 +#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 +#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 +#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 +#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 +#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A + +/* Platform / device extension tokens */ +#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 +#define EGL_PLATFORM_X11_KHR 0x31D5 +#define EGL_DEVICE_EXT 0x322C +#define EGL_DRM_DEVICE_FILE_EXT 0x3233 +#define EGL_DRM_RENDER_NODE_FILE_EXT 0x3377 + +/* EGL_KHR_gl_texture_2D_image */ +#define EGL_GL_TEXTURE_2D 0x30B1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 + +/* EGL function stubs — all return failure/null */ +static inline EGLint eglGetError(void) { return EGL_NOT_INITIALIZED; } +static inline EGLDisplay eglGetDisplay(EGLNativeDisplayType id) { (void)id; return EGL_NO_DISPLAY; } +static inline EGLDisplay eglGetPlatformDisplay(EGLenum platform, void *native, const EGLAttrib *attrs) + { (void)platform; (void)native; (void)attrs; return EGL_NO_DISPLAY; } +static inline EGLDisplay eglGetPlatformDisplayEXT(EGLenum platform, void *native, const EGLint *attrs) + { (void)platform; (void)native; (void)attrs; return EGL_NO_DISPLAY; } +static inline EGLBoolean eglInitialize(EGLDisplay d, EGLint *maj, EGLint *min) + { (void)d; (void)maj; (void)min; return EGL_FALSE; } +static inline EGLBoolean eglTerminate(EGLDisplay d) { (void)d; return EGL_FALSE; } +static inline const char *eglQueryString(EGLDisplay d, EGLint name) { (void)d; (void)name; return NULL; } +static inline EGLBoolean eglChooseConfig(EGLDisplay d, const EGLint *a, EGLConfig *c, EGLint cs, EGLint *n) + { (void)d; (void)a; (void)c; (void)cs; (void)n; return EGL_FALSE; } +static inline EGLBoolean eglGetConfigAttrib(EGLDisplay d, EGLConfig c, EGLint a, EGLint *v) + { (void)d; (void)c; (void)a; (void)v; return EGL_FALSE; } +static inline EGLBoolean eglBindAPI(EGLenum api) { (void)api; return EGL_FALSE; } +static inline EGLenum eglQueryAPI(void) { return EGL_OPENGL_ES_API; } +static inline EGLContext eglCreateContext(EGLDisplay d, EGLConfig c, EGLContext s, const EGLint *a) + { (void)d; (void)c; (void)s; (void)a; return EGL_NO_CONTEXT; } +static inline EGLBoolean eglDestroyContext(EGLDisplay d, EGLContext c) + { (void)d; (void)c; return EGL_FALSE; } +static inline EGLBoolean eglMakeCurrent(EGLDisplay d, EGLSurface dr, EGLSurface rd, EGLContext c) + { (void)d; (void)dr; (void)rd; (void)c; return EGL_FALSE; } +static inline EGLContext eglGetCurrentContext(void) { return EGL_NO_CONTEXT; } +static inline EGLDisplay eglGetCurrentDisplay(void) { return EGL_NO_DISPLAY; } +static inline EGLSurface eglGetCurrentSurface(EGLint r) { (void)r; return EGL_NO_SURFACE; } +static inline EGLSurface eglCreateWindowSurface(EGLDisplay d, EGLConfig c, EGLNativeWindowType w, const EGLint *a) + { (void)d; (void)c; (void)w; (void)a; return EGL_NO_SURFACE; } +static inline EGLSurface eglCreatePbufferSurface(EGLDisplay d, EGLConfig c, const EGLint *a) + { (void)d; (void)c; (void)a; return EGL_NO_SURFACE; } +static inline EGLBoolean eglDestroySurface(EGLDisplay d, EGLSurface s) { (void)d; (void)s; return EGL_FALSE; } +static inline EGLBoolean eglSwapBuffers(EGLDisplay d, EGLSurface s) { (void)d; (void)s; return EGL_FALSE; } +static inline EGLImage eglCreateImage(EGLDisplay d, EGLContext c, EGLenum t, EGLClientBuffer b, const EGLAttrib *a) + { (void)d; (void)c; (void)t; (void)b; (void)a; return EGL_NO_IMAGE; } +static inline EGLImageKHR eglCreateImageKHR(EGLDisplay d, EGLContext c, EGLenum t, EGLClientBuffer b, const EGLint *a) + { (void)d; (void)c; (void)t; (void)b; (void)a; return EGL_NO_IMAGE_KHR; } +static inline EGLBoolean eglDestroyImage(EGLDisplay d, EGLImage i) { (void)d; (void)i; return EGL_FALSE; } +static inline EGLBoolean eglDestroyImageKHR(EGLDisplay d, EGLImageKHR i) { (void)d; (void)i; return EGL_FALSE; } +static inline EGLSync eglCreateSync(EGLDisplay d, EGLenum t, const EGLAttrib *a) + { (void)d; (void)t; (void)a; return EGL_NO_SYNC; } +static inline EGLSyncKHR eglCreateSyncKHR(EGLDisplay d, EGLenum t, const EGLint *a) + { (void)d; (void)t; (void)a; return (EGLSyncKHR)0; } +static inline EGLBoolean eglDestroySync(EGLDisplay d, EGLSync s) { (void)d; (void)s; return EGL_FALSE; } +static inline EGLBoolean eglDestroySyncKHR(EGLDisplay d, EGLSyncKHR s) { (void)d; (void)s; return EGL_FALSE; } +static inline EGLint eglClientWaitSync(EGLDisplay d, EGLSync s, EGLint f, uint64_t t) + { (void)d; (void)s; (void)f; (void)t; return EGL_FALSE; } +static inline EGLint eglClientWaitSyncKHR(EGLDisplay d, EGLSyncKHR s, EGLint f, uint64_t t) + { (void)d; (void)s; (void)f; (void)t; return EGL_FALSE; } +static inline EGLBoolean eglWaitSync(EGLDisplay d, EGLSync s, EGLint f) + { (void)d; (void)s; (void)f; return EGL_FALSE; } +static inline EGLBoolean eglWaitSyncKHR(EGLDisplay d, EGLSyncKHR s, EGLint f) + { (void)d; (void)s; (void)f; return EGL_FALSE; } +static inline EGLint eglDupNativeFenceFDANDROID(EGLDisplay d, EGLSyncKHR s) + { (void)d; (void)s; return -1; } +static inline __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *name) + { (void)name; return 0; } +static inline EGLBoolean eglQueryDmaBufFormatsEXT(EGLDisplay d, EGLint max, EGLint *fmts, EGLint *n) + { (void)d; (void)max; (void)fmts; (void)n; return EGL_FALSE; } +static inline EGLBoolean eglQueryDmaBufModifiersEXT(EGLDisplay d, EGLint fmt, EGLint max, uint64_t *m, EGLBoolean *e, EGLint *n) + { (void)d; (void)fmt; (void)max; (void)m; (void)e; (void)n; return EGL_FALSE; } +static inline EGLBoolean eglQueryDisplayAttribEXT(EGLDisplay d, EGLint attr, EGLAttrib *val) + { (void)d; (void)attr; (void)val; return EGL_FALSE; } +static inline const char *eglQueryDeviceStringEXT(EGLDeviceEXT dev, EGLint name) + { (void)dev; (void)name; return NULL; } +static inline EGLBoolean eglExportDMABUFImageQueryMESA(EGLDisplay d, EGLImage img, int *fourcc, int *nplanes, uint64_t *modifiers) + { (void)d; (void)img; (void)fourcc; (void)nplanes; (void)modifiers; return EGL_FALSE; } +static inline EGLBoolean eglExportDMABUFImageMESA(EGLDisplay d, EGLImage img, int *fds, int *strides, int *offsets) + { (void)d; (void)img; (void)fds; (void)strides; (void)offsets; return EGL_FALSE; } + +/* epoxy-style wrappers (libepoxy prefixes EGL functions with epoxy_) */ +#define epoxy_eglGetError eglGetError +#define epoxy_eglGetDisplay eglGetDisplay +#define epoxy_eglGetPlatformDisplay eglGetPlatformDisplay +#define epoxy_eglGetPlatformDisplayEXT eglGetPlatformDisplayEXT +#define epoxy_eglInitialize eglInitialize +#define epoxy_eglTerminate eglTerminate +#define epoxy_eglQueryString eglQueryString +#define epoxy_eglChooseConfig eglChooseConfig +#define epoxy_eglGetConfigAttrib eglGetConfigAttrib +#define epoxy_eglBindAPI eglBindAPI +#define epoxy_eglCreateContext eglCreateContext +#define epoxy_eglDestroyContext eglDestroyContext +#define epoxy_eglMakeCurrent eglMakeCurrent +#define epoxy_eglGetCurrentContext eglGetCurrentContext +#define epoxy_eglGetCurrentDisplay eglGetCurrentDisplay +#define epoxy_eglGetCurrentSurface eglGetCurrentSurface +#define epoxy_eglCreateWindowSurface eglCreateWindowSurface +#define epoxy_eglCreatePbufferSurface eglCreatePbufferSurface +#define epoxy_eglDestroySurface eglDestroySurface +#define epoxy_eglSwapBuffers eglSwapBuffers +#define epoxy_eglCreateImage eglCreateImage +#define epoxy_eglCreateImageKHR eglCreateImageKHR +#define epoxy_eglDestroyImage eglDestroyImage +#define epoxy_eglDestroyImageKHR eglDestroyImageKHR +#define epoxy_eglCreateSync eglCreateSync +#define epoxy_eglCreateSyncKHR eglCreateSyncKHR +#define epoxy_eglDestroySync eglDestroySync +#define epoxy_eglDestroySyncKHR eglDestroySyncKHR +#define epoxy_eglClientWaitSync eglClientWaitSync +#define epoxy_eglClientWaitSyncKHR eglClientWaitSyncKHR +#define epoxy_eglWaitSync eglWaitSync +#define epoxy_eglWaitSyncKHR eglWaitSyncKHR +#define epoxy_eglDupNativeFenceFDANDROID eglDupNativeFenceFDANDROID +#define epoxy_eglGetProcAddress eglGetProcAddress +#define epoxy_eglQueryDmaBufFormatsEXT eglQueryDmaBufFormatsEXT +#define epoxy_eglQueryDmaBufModifiersEXT eglQueryDmaBufModifiersEXT + +/* Additional type aliases used by some extension code */ +#ifndef EGLAPIENTRYP +#define EGLAPIENTRYP * +#endif + +typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLAttrib*); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC)(EGLDisplay, EGLImage); +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC)(EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint*); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC)(EGLDisplay, EGLImageKHR); + +#ifdef __cplusplus +} +#endif diff --git a/www/webkit2-gtk/files/unused/PR-152650-2.patch b/www/webkit2-gtk/files/unused/PR-152650-2.patch deleted file mode 100644 index e134b971b37..00000000000 --- a/www/webkit2-gtk/files/unused/PR-152650-2.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 4607ea0a569b3c527ae8dce341ab55eb0d69d8f7 Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston Sequoia -Date: Tue, 8 Mar 2016 17:26:23 -0800 -Subject: [PATCH 2/2] [GTK][Mac] Enable support for gtk-doc on Mac - -https://bugs.webkit.org/show_bug.cgi?id=152650 - -Signed-off-by: Jeremy Huddleston Sequoia ---- - ChangeLog | 10 ++++++++++ - Source/PlatformGTK.cmake | 2 +- - Source/cmake/OptionsGTK.cmake | 5 ----- - 3 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake -index af4d2e3..0b11b56 100644 ---- Source/PlatformGTK.cmake -+++ Source/PlatformGTK.cmake -@@ -34,7 +34,7 @@ endmacro() - add_gtkdoc_generator("docs-build.stamp" "") - if (ENABLE_GTKDOC) - add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") --elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE) -+elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING) - add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") - - # Add a default build step which check that documentation does not have any warnings -diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake -index 6b01f1a..b443d10 100644 ---- Source/cmake/OptionsGTK.cmake -+++ Source/cmake/OptionsGTK.cmake -@@ -424,11 +424,6 @@ if (CMAKE_CROSSCOMPILING) - set(ENABLE_INTROSPECTION OFF) - endif () - --# Override the cached variable, gtk-doc does not really work when building on Mac. --if (APPLE) -- set(ENABLE_GTKDOC OFF) --endif () -- - set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkitgtk) - set(DERIVED_SOURCES_WEBKITGTK_API_DIR ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkit) - set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/webkit2gtk) -diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py -index 4c8237b..a628ae0 100644 ---- Tools/gtk/gtkdoc.py -+++ Tools/gtk/gtkdoc.py -@@ -322,6 +322,11 @@ class GTKDoc(object): - env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path) - else: - env['LD_LIBRARY_PATH'] = self.library_path -+ current_dyld_library_path = env.get('DYLD_LIBRARY_PATH') -+ if current_dyld_library_path: -+ env['DYLD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_dyld_library_path) -+ else: -+ env['DYLD_LIBRARY_PATH'] = self.library_path - - if ldflags: - env['LDFLAGS'] = '%s %s' % (ldflags, env.get('LDFLAGS', '')) --- -2.7.2 - diff --git a/www/webkit2-gtk/files/unused/PR-153138.patch b/www/webkit2-gtk/files/unused/PR-153138.patch deleted file mode 100644 index 10851e83086..00000000000 --- a/www/webkit2-gtk/files/unused/PR-153138.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 07886d9eacb7587dd52a9bcae10c1fc8ab56a910 Mon Sep 17 00:00:00 2001 -From: Jeremy Huddleston Sequoia -Date: Fri, 15 Jan 2016 11:53:07 -0800 -Subject: [PATCH] https://bugs.webkit.org/show_bug.cgi?id=153138 - -Signed-off-by: Jeremy Huddleston Sequoia ---- - Source/JavaScriptCore/bytecode/StructureStubInfo.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp -index 1e4b4f5..9b27aed 100644 ---- Source/JavaScriptCore/bytecode/StructureStubInfo.cpp -+++ Source/JavaScriptCore/bytecode/StructureStubInfo.cpp -@@ -26,6 +26,8 @@ - #include "config.h" - #include "StructureStubInfo.h" - -+#include "JSCellInlines.h" -+ - #include "JSObject.h" - #include "PolymorphicAccess.h" - #include "Repatch.h" --- -2.7.0 - diff --git a/www/webkit2-gtk/files/unused/PR-157574.patch b/www/webkit2-gtk/files/unused/PR-157574.patch deleted file mode 100644 index d395c5956de..00000000000 --- a/www/webkit2-gtk/files/unused/PR-157574.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- Source/JavaScriptCore/API/WebKitAvailability.h.orig 2018-08-20 01:32:25.000000000 -0700 -+++ Source/JavaScriptCore/API/WebKitAvailability.h 2018-08-20 01:35:33.000000000 -0700 -@@ -28,46 +28,8 @@ - - #if defined(__APPLE__) - --#include - #include - --#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED < 101100 --/* To support availability macros that mention newer OS X versions when building on older OS X versions, -- we provide our own definitions of the underlying macros that the availability macros expand to. We're -- free to expand the macros as no-ops since frameworks built on older OS X versions only ship bundled with -- an application rather than as part of the system. --*/ -- --#ifndef __NSi_10_10 // Building from trunk rather than SDK. --#define __NSi_10_10 introduced=10.0 // Use 10.0 to indicate that everything is available. --#endif -- --#ifndef __NSi_10_11 // Building from trunk rather than SDK. --#define __NSi_10_11 introduced=10.0 // Use 10.0 to indicate that everything is available. --#endif -- --#ifndef __NSi_10_12 // Building from trunk rather than SDK. --#define __NSi_10_12 introduced=10.0 // Use 10.0 to indicate that everything is available. --#endif -- --#ifndef __AVAILABILITY_INTERNAL__MAC_10_9 --#define __AVAILABILITY_INTERNAL__MAC_10_9 --#endif -- --#ifndef __AVAILABILITY_INTERNAL__MAC_10_10 --#define __AVAILABILITY_INTERNAL__MAC_10_10 --#endif -- --#ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER --#define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER --#endif -- --#ifndef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER --#define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER --#endif -- --#endif /* !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED < 101100 */ -- - #if defined(BUILDING_GTK__) - #undef JSC_API_AVAILABLE - #define JSC_API_AVAILABLE(...) diff --git a/www/webkit2-gtk/files/unused/patch-name-conflicts.diff b/www/webkit2-gtk/files/unused/patch-name-conflicts.diff deleted file mode 100644 index 2763cebe1a8..00000000000 --- a/www/webkit2-gtk/files/unused/patch-name-conflicts.diff +++ /dev/null @@ -1,57 +0,0 @@ ---- Source/WebCore/page/SecurityOriginData.cpp.orig 2018-06-13 14:43:40.000000000 +0800 -+++ Source/WebCore/page/SecurityOriginData.cpp 2018-06-13 14:37:12.000000000 +0800 -@@ -33,8 +33,6 @@ - #include - #include - --using namespace WebCore; -- - namespace WebCore { - - SecurityOriginData SecurityOriginData::fromSecurityOrigin(const SecurityOrigin& securityOrigin) ---- Source/WebCore/page/TextIndicator.cpp.orig 2018-06-13 21:38:47.000000000 +0800 -+++ Source/WebCore/page/TextIndicator.cpp 2018-06-13 21:39:03.000000000 +0800 -@@ -50,8 +50,6 @@ - #include "SelectionRect.h" - #endif - --using namespace WebCore; -- - namespace WebCore { - - static bool initializeIndicator(TextIndicatorData&, Frame&, const Range&, FloatSize margin, bool indicatesCurrentSelection); ---- Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp.orig 2018-06-13 23:03:53.000000000 +0800 -+++ Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp 2018-06-13 23:17:03.000000000 +0800 -@@ -25,7 +25,9 @@ - #include - #include - --using namespace WebCore; -+using WebCore::Event; -+using WebCore::EventTarget; -+using WebCore::ScriptExecutionContext; - - namespace WebKit { - ---- Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp.orig 2018-06-13 23:18:03.000000000 +0800 -+++ Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/GObjectNodeFilterCondition.cpp 2018-06-13 23:29:20.000000000 +0800 -@@ -22,7 +22,7 @@ - #include "WebKitDOMNodePrivate.h" - #include - --using namespace WebCore; -+using WebCore::Node; - - namespace WebKit { - ---- Source/WebCore/html/HTMLKeygenElement.cpp.orig 2018-06-26 08:48:28.000000000 -0700 -+++ Source/WebCore/html/HTMLKeygenElement.cpp 2018-06-26 08:48:39.000000000 -0700 -@@ -39,7 +39,7 @@ - #include - #include - --using namespace WebCore; -+//using namespace WebCore; - - namespace WebCore { - diff --git a/www/webkit2-gtk/files/unused/patch_bad_optional_access.diff b/www/webkit2-gtk/files/unused/patch_bad_optional_access.diff deleted file mode 100644 index 508b5fd92e5..00000000000 --- a/www/webkit2-gtk/files/unused/patch_bad_optional_access.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- Source/WTF/wtf/Optional.h (revision 235660) -+++ Source/WTF/wtf/Optional.h (revision 235661) -@@ -278,12 +278,4 @@ - - --// 20.5.8, class bad_optional_access --class bad_optional_access : public std::logic_error { --public: -- explicit bad_optional_access(const std::string& what_arg) : std::logic_error{what_arg} {} -- explicit bad_optional_access(const char* what_arg) : std::logic_error{what_arg} {} --}; -- -- - template - union storage_t