From f80afd2a665931a7e67bffae2578682080df851a Mon Sep 17 00:00:00 2001 From: chrysos349 Date: Mon, 1 Apr 2024 01:01:38 +0300 Subject: [PATCH] webkit2gtk: update to 2.44.0 --- .../patches/disable-dmabuf-nvidia.patch | 63 ------------------- .../webkit2gtk/patches/fix-ftbfs-i386.patch | 33 +++++----- srcpkgs/webkit2gtk/template | 17 +++-- 3 files changed, 27 insertions(+), 86 deletions(-) delete mode 100644 srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch diff --git a/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch deleted file mode 100644 index 652c639ce38bfa..00000000000000 --- a/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Carlos Garcia Campos -Subject: Disable DMABuf renderer for NVIDIA proprietary drivers -Bug: https://bugs.webkit.org/show_bug.cgi?id=262607 -Bug-Debian: https://bugs.debian.org/1039720 -Origin: https://github.com/WebKit/WebKit/pull/18614 -Index: webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -=================================================================== ---- webkitgtk.orig/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -+++ webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp -@@ -38,11 +38,13 @@ - #include - #include - #include -+#include - #include - #include - - #if USE(GBM) - #include -+#include - #include - static constexpr uint64_t s_dmabufInvalidModifier = uint64_t(WebCore::DMABufFormat::Modifier::Invalid); - #else -@@ -55,6 +57,29 @@ static constexpr uint64_t s_dmabufInvali - - namespace WebKit { - -+static bool isNVIDIA() -+{ -+ const char* forceDMABuf = getenv("WEBKIT_FORCE_DMABUF_RENDERER"); -+ if (forceDMABuf && strcmp(forceDMABuf, "0")) -+ return false; -+ -+ std::unique_ptr platformDisplay; -+#if USE(GBM) -+ const char* disableGBM = getenv("WEBKIT_DMABUF_RENDERER_DISABLE_GBM"); -+ if (!disableGBM || !strcmp(disableGBM, "0")) { -+ if (auto* device = WebCore::PlatformDisplay::sharedDisplay().gbmDevice()) -+ platformDisplay = WebCore::PlatformDisplayGBM::create(device); -+ } -+#endif -+ if (!platformDisplay) -+ platformDisplay = WebCore::PlatformDisplaySurfaceless::create(); -+ -+ WebCore::GLContext::ScopedGLContext glContext(WebCore::GLContext::createOffscreen(platformDisplay ? *platformDisplay : WebCore::PlatformDisplay::sharedDisplay())); -+ if (strstr(reinterpret_cast(glGetString(GL_VENDOR)), "NVIDIA")) -+ return true; -+ return false; -+} -+ - OptionSet AcceleratedBackingStoreDMABuf::rendererBufferMode() - { - static OptionSet mode; -@@ -70,6 +95,9 @@ OptionSet Acce - return; - } - -+ if (isNVIDIA()) -+ return; -+ - mode.add(DMABufRendererBufferMode::SharedMemory); - - const auto& eglExtensions = WebCore::PlatformDisplay::sharedDisplay().eglExtensions(); diff --git a/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch b/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch index 1b5ec0da142c09..be6a8db22bd96a 100644 --- a/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch +++ b/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch @@ -1,16 +1,21 @@ -From: Alberto Garcia -Subject: Fix FTBFS in i386 -Bug: https://bugs.webkit.org/show_bug.cgi?id=268739 -Index: webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp +From: Michael Catanzaro +Subject: Fix FTBFS on i386: static assertion failed: Timer should stay small +Bug: https://bugs.webkit.org/show_bug.cgi?id=271108 +Origin: https://github.com/WebKit/WebKit/commit/2922af379dc70b4b1a63b01d67179eb431f03ac4 +Index: webkitgtk/Source/WebCore/platform/Timer.cpp =================================================================== ---- webkitgtk.orig/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp -+++ webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp -@@ -336,8 +336,6 @@ JSValue CLoop::execute(OpcodeID entryOpc - UNUSED_VARIABLE(t2); - UNUSED_VARIABLE(t3); - UNUSED_VARIABLE(t5); -- UNUSED_VARIABLE(t6); -- UNUSED_VARIABLE(t7); +--- webkitgtk.orig/Source/WebCore/platform/Timer.cpp ++++ webkitgtk/Source/WebCore/platform/Timer.cpp +@@ -263,7 +263,11 @@ struct SameSizeAsTimer { - struct StackPointerScope { - StackPointerScope(CLoopStack& stack) + WeakPtr timerAlignment; + double times[2]; +- void* pointers[3]; ++ void* pointers[2]; ++#if CPU(ADDRESS32) ++ uint8_t bitfields; ++#endif ++ void* pointer; + }; + + static_assert(sizeof(Timer) == sizeof(SameSizeAsTimer), "Timer should stay small"); diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template index 5fc8c66d7a2782..6d7468c3fcb6f5 100644 --- a/srcpkgs/webkit2gtk/template +++ b/srcpkgs/webkit2gtk/template @@ -1,12 +1,12 @@ # Template file for 'webkit2gtk' pkgname=webkit2gtk -version=2.42.5 +version=2.44.0 revision=1 build_style=cmake build_helper="gir" configure_args="-DPORT=GTK -DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc -DCMAKE_SKIP_RPATH=ON - -DENABLE_JOURNALD_LOG=OFF -DUSE_WOFF2=ON -DUSE_WPE_RENDERER=ON + -DENABLE_JOURNALD_LOG=OFF -DUSE_WOFF2=ON -DENABLE_MINIBROWSER=$(vopt_if minibrowser ON OFF) -DENABLE_JIT=$(vopt_if jit ON OFF) -DENABLE_C_LOOP=$(vopt_if jit OFF ON) @@ -16,7 +16,7 @@ configure_args="-DPORT=GTK -DENABLE_X11_TARGET=$(vopt_if x11 ON OFF) -DENABLE_SAMPLING_PROFILER=$(vopt_if sampling_profiler ON OFF) -DENABLE_BUBBLEWRAP_SANDBOX=$(vopt_if bubblewrap ON OFF) - -DUSE_JPEGXL=OFF" + -DUSE_JPEGXL=OFF -DUSE_LIBBACKTRACE=OFF -DUSE_GTK4=OFF" # Don't remove which from hostmakedepends # Otherwise, they invoke /usr/bin/ccache /usr/lib/ccache/bin/$CC hostmakedepends="perl python3 pkg-config gperf flex ruby gettext glib-devel @@ -27,8 +27,7 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel libsoup-devel libsoup3-devel libxslt-devel gnutls-devel icu-devel enchant2-devel dbus-glib-devel libwebp-devel gtk+3-devel gtk4-devel libgudev-devel libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel - woff2-devel freetype-devel libopenjpeg2-devel libavif-devel - qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel + woff2-devel freetype-devel libavif-devel qt5-devel libmanette-devel libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel) $(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')" depends="gst-plugins-good1" @@ -37,7 +36,7 @@ maintainer="Orphaned " license="LGPL-2.1-or-later, BSD-2-Clause" homepage="https://webkitgtk.org/" distfiles="https://webkitgtk.org/releases/webkitgtk-${version}.tar.xz" -checksum=b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749 +checksum=c66530e41ba59b1edba4ee89ef20b2188e273bed0497e95084729e3cfbe30c87 make_check=no # TODO replaces="webkit2gtk-common>0" @@ -190,7 +189,7 @@ webkit2gtk-devel_package() { vmove "usr/share/gir-1.0/*-4.0.gir" fi if [ "$build_option_gtk_doc" ]; then - vmove "usr/share/gtk-doc/html/*-4.0" + vmove "usr/share/doc/*-4.0" fi vmove "usr/lib/*-4.0.so" } @@ -226,7 +225,7 @@ libwebkit2gtk41-devel_package() { vmove "usr/share/gir-1.0/*-4.1.gir" fi if [ "$build_option_gtk_doc" ]; then - vmove "usr/share/gtk-doc/html/*-4.1" + vmove "usr/share/doc/*-4.1" fi vmove "usr/lib/*-4.1.so" } @@ -261,7 +260,7 @@ libwebkitgtk60-devel_package() { vmove "usr/share/gir-1.0/*-6.0.gir" fi if [ "$build_option_gtk_doc" ]; then - vmove "usr/share/gtk-doc/html/*-6.0" + vmove "usr/share/doc/*-6.0" fi vmove "usr/lib/*-6.0.so" }