Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] webkit2gtk: update to 2.42.5
@ 2024-02-19 21:58 chrysos349
  2024-02-19 22:43 ` [PR REVIEW] " oreo639
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-19 21:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

There is a new pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages webkit2gtk
https://github.com/void-linux/void-packages/pull/48839

webkit2gtk: update to 2.42.5
[ci skip]

**NOTES**
- `2.42.5` (and `2.42.4` before `.5` was released) was tested as a part of `gnome-45.*`
- Required for `gnome-45.*` (#48762)
- (Cross)-built for all archs that are checked in ci

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - aarch64 x
  - armv7l x
  - armv6l-musl x
  - x86_64-musl
  - i686


A patch file from https://github.com/void-linux/void-packages/pull/48839.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-48839.patch --]
[-- Type: text/x-diff, Size: 38976 bytes --]

From 46a7ca367cc6915475cf847abf1d69fe2a56b176 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Tue, 20 Feb 2024 00:49:10 +0300
Subject: [PATCH] webkit2gtk: update to 2.42.5

---
 .../patches/be-imagebufferbackend.patch       | 241 ------------------
 .../webkit2gtk/patches/be-typedarray.patch    | 206 ---------------
 .../patches/disable-dmabuf-nvidia.patch       |  63 +++++
 .../webkit2gtk/patches/fix-ftbfs-i386.patch   |  16 ++
 .../patches/fix-riscv64-build.patch           |  28 --
 srcpkgs/webkit2gtk/patches/initial-exec.patch |  23 --
 srcpkgs/webkit2gtk/patches/le-check.patch     |  26 --
 .../webkit2gtk/patches/prefer-pthread.patch   |  28 ++
 .../patches/reduce-memory-overheads.patch     |  19 ++
 srcpkgs/webkit2gtk/patches/reproducible.patch |  81 ------
 srcpkgs/webkit2gtk/template                   |  21 +-
 11 files changed, 138 insertions(+), 614 deletions(-)
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/initial-exec.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/le-check.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/prefer-pthread.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/reproducible.patch

diff --git a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch b/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
deleted file mode 100644
index fd90cdb99ba3d..0000000000000
--- a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-Original source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-diff --git a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-index 9acf304d..618b7b26 100644
---- a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-+++ b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-@@ -140,9 +140,17 @@ static void convertImagePixelsAccelerated(const ConstPixelBufferConversionView&
- enum class PixelFormatConversion { None, Permute };
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha) {
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = 0;
-         return;
-@@ -151,23 +158,81 @@ static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* source
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8)
-+        {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else
-+        {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[3] * 255) / alpha;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[3] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[2] * 255) / alpha;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-@@ -180,17 +245,58 @@ static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[3] * alpha + 254) / 255;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[3] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[2] * alpha + 254) / 255;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-@@ -203,23 +309,49 @@ static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        UNUSED_PARAM(sourcePixelFormat);
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
-+#if CPU(BIG_ENDIAN)
-+template<void (*convertFunctor)(PixelFormat, const uint8_t*, PixelFormat, uint8_t*)>
-+#else
- template<void (*convertFunctor)(const uint8_t*, uint8_t*)>
-+#endif
- static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView& source, const PixelBufferConversionView& destination, const IntSize& destinationSize)
- {
-     const uint8_t* sourceRows = source.rows;
-@@ -228,7 +360,11 @@ static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView
-     size_t bytesPerRow = destinationSize.width() * 4;
-     for (int y = 0; y < destinationSize.height(); ++y) {
-         for (size_t x = 0; x < bytesPerRow; x += 4)
-+#if CPU(BIG_ENDIAN)
-+            convertFunctor(source.format.pixelFormat, &sourceRows[x], destination.format.pixelFormat, &destinationRows[x]);
-+#else
-             convertFunctor(&sourceRows[x], &destinationRows[x]);
-+#endif
-         sourceRows += source.bytesPerRow;
-         destinationRows += destination.bytesPerRow;
-     }
-diff --git a/Source/WebCore/platform/graphics/PixelFormat.h b/Source/WebCore/platform/graphics/PixelFormat.h
-index 1ca711b8..4a7168f8 100644
---- a/Source/WebCore/platform/graphics/PixelFormat.h
-+++ b/Source/WebCore/platform/graphics/PixelFormat.h
-@@ -33,6 +33,9 @@ namespace WebCore {
- enum class PixelFormat : uint8_t {
-     RGBA8,
-     BGRA8,
-+#if CPU(BIG_ENDIAN)
-+    ARGB8 = BGRA8, // BGRA will actually be ARGB on BIG_ENDIAN
-+#endif
-     RGB10,
-     RGB10A8,
- };
diff --git a/srcpkgs/webkit2gtk/patches/be-typedarray.patch b/srcpkgs/webkit2gtk/patches/be-typedarray.patch
deleted file mode 100644
index cbb706564fe9c..0000000000000
--- a/srcpkgs/webkit2gtk/patches/be-typedarray.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-Source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-https://tenfourfox.tenderapp.com/discussions/problems/7505-problems-uploading-to-facebook
-
-Updated by @q66.
-
-diff --git a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-index e76dada0..4de2e3ea 100644
---- a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-+++ b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-@@ -198,3 +198,9 @@
- #else
- #define OFFLINE_ASM_HAVE_FAST_TLS 0
- #endif
-+
-+#if CPU(BIG_ENDIAN)
-+#define OFFLINE_ASM_BIG_ENDIAN 1
-+#else
-+#define OFFLINE_ASM_BIG_ENDIAN 0
-+#endif
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-index 22716f81..4f9374ce 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-@@ -1732,7 +1732,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
- 
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     loadi ArrayStorage::m_vector + TagOffset[t3, t1, 8], t2
-     loadi ArrayStorage::m_vector + PayloadOffset[t3, t1, 8], t1
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-index c453351d..e61529e5 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-@@ -1867,7 +1867,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
-     
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     get(m_dst, t0)
-     loadq ArrayStorage::m_vector[t3, t1, 8], t2
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-index 86f48a02..1541b3a8 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-@@ -29,6 +29,7 @@
- #include "ThrowScope.h"
- #include "ToNativeFromValue.h"
- #include <wtf/CheckedArithmetic.h>
-+#include <wtf/FlipBytes.h>
- 
- namespace JSC {
- 
-@@ -147,7 +148,18 @@ public:
-     
-     JSValue getIndexQuickly(size_t i) const
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return Adaptor::toJSValue(nullptr, flipBytes(getIndexQuicklyAsNativeValue(i)));
-+        }
-+#else
-         return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+#endif
-     }
-     
-     void setIndexQuicklyToNativeValue(size_t i, typename Adaptor::Type value)
-@@ -159,7 +171,20 @@ public:
-     void setIndexQuickly(size_t i, JSValue value)
-     {
-         ASSERT(!value.isObject());
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(toNativeFromValue<Adaptor>(value)));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+#endif
-     }
-     
-     bool setIndex(JSGlobalObject* globalObject, size_t i, JSValue jsValue)
-@@ -173,18 +198,55 @@ public:
-         if (isDetached() || i >= m_length)
-             return false;
- 
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, value);
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(value));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, value);
-+#endif
-         return true;
-     }
- 
-     static ElementType toAdaptorNativeFromValue(JSGlobalObject* globalObject, JSValue jsValue)
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return flipBytes(toNativeFromValue<Adaptor>(globalObject, jsValue));
-+        }
-+#else
-         return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+#endif
-     }
- 
-     static std::optional<ElementType> toAdaptorNativeFromValueWithoutCoercion(JSValue jsValue)
-     {
--        return toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+        auto opt = toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            if (!opt)
-+                break;
-+            return std::optional<ElementType>{flipBytes(*opt)};
-+        }
-+#endif
-+        return opt;
-     }
- 
-     void sort()
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-index df0435f6..3017563c 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-@@ -385,9 +385,36 @@ ALWAYS_INLINE EncodedJSValue genericType
- 
-     size_t searchLength = std::min<size_t>(length, updatedLength);
-     if constexpr (ViewClass::Adaptor::isFloat) {
--        if (std::isnan(static_cast<double>(*targetOption))) {
-+        double targetOptionLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+        switch (ViewClass::TypedArrayStorageType) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            targetOptionLittleEndianAsDouble = static_cast<double>(flipBytes(*targetOption));
-+        }
-+#else
-+        targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+#endif
-+
-+        if (std::isnan(targetOptionLittleEndianAsDouble)) {
-             for (; index < searchLength; ++index) {
--                if (std::isnan(static_cast<double>(array[index])))
-+                double arrayElementLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+                switch (ViewClass::TypedArrayStorageType) {
-+                case TypeFloat32:
-+                case TypeFloat64:
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+                default:
-+                    // typed array views are commonly expected to be little endian views of the underlying data
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(flipBytes(array[index]));
-+                }
-+#else
-+                arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+#endif
-+                if (std::isnan(arrayElementLittleEndianAsDouble))
-                     return JSValue::encode(jsBoolean(true));
-             }
-             return JSValue::encode(jsBoolean(false));
diff --git a/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
new file mode 100644
index 0000000000000..652c639ce38bf
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
@@ -0,0 +1,63 @@
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+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 <WebCore/GLContext.h>
+ #include <WebCore/IntRect.h>
+ #include <WebCore/PlatformDisplay.h>
++#include <WebCore/PlatformDisplaySurfaceless.h>
+ #include <epoxy/egl.h>
+ #include <wtf/glib/GUniquePtr.h>
+ 
+ #if USE(GBM)
+ #include <WebCore/DMABufFormat.h>
++#include <WebCore/PlatformDisplayGBM.h>
+ #include <gbm.h>
+ 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<WebCore::PlatformDisplay> 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<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
++        return true;
++    return false;
++}
++
+ OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
+ {
+     static OptionSet<DMABufRendererBufferMode> mode;
+@@ -70,6 +95,9 @@ OptionSet<DMABufRendererBufferMode> 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
new file mode 100644
index 0000000000000..1b5ec0da142c0
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
@@ -0,0 +1,16 @@
+From: Alberto Garcia <berto@igalia.com>
+Subject: Fix FTBFS in i386
+Bug: https://bugs.webkit.org/show_bug.cgi?id=268739
+Index: webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.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);
+ 
+     struct StackPointerScope {
+         StackPointerScope(CLoopStack& stack)
diff --git a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch b/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
deleted file mode 100644
index 3f599ea3c5698..0000000000000
--- a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/Source/JavaScriptCore/offlineasm/riscv64.rb b/Source/JavaScriptCore/offlineasm/riscv64.rb
-index 81f356d04ae1..4abb1761509d 100644
---- a/Source/JavaScriptCore/offlineasm/riscv64.rb
-+++ b/Source/JavaScriptCore/offlineasm/riscv64.rb
-@@ -1523,7 +1523,8 @@ def riscv64GenerateWASMPlaceholders(list)
-         if node.is_a? Instruction
-             case node.opcode
-             when "loadlinkacqb", "loadlinkacqh", "loadlinkacqi", "loadlinkacqq",
--                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq"
-+                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq",
-+                 "loadv", "storev"
-                 newList << Instruction.new(node.codeOrigin, "rv_ebreak", [], "WebAssembly placeholder for opcode #{node.opcode}")
-             else
-                 newList << node
-diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index e30a3d8ce077..937fdd447f92 100644
---- a/Source/WTF/wtf/PlatformEnable.h
-+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -616,7 +616,7 @@
- #undef ENABLE_WEBASSEMBLY
- #define ENABLE_WEBASSEMBLY 1
- #undef ENABLE_WEBASSEMBLY_B3JIT
--#define ENABLE_WEBASSEMBLY_B3JIT 0
-+#define ENABLE_WEBASSEMBLY_B3JIT 1
- #undef ENABLE_WEBASSEMBLY_BBQJIT
- #define ENABLE_WEBASSEMBLY_BBQJIT 0
- #endif
-
diff --git a/srcpkgs/webkit2gtk/patches/initial-exec.patch b/srcpkgs/webkit2gtk/patches/initial-exec.patch
deleted file mode 100644
index 579084bd60650..0000000000000
--- a/srcpkgs/webkit2gtk/patches/initial-exec.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Source: https://bugs.webkit.org/show_bug.cgi?id=254286
-
-Usage initial-exec TLS is incompatible with dlopen() on musl.
-
-See also: https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39
- .../platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp   | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
---- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-+++ a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-@@ -108,7 +108,11 @@ RefPtr<PixelBuffer> GraphicsContextGLANGLE::readCompositedResults()
- 
- bool GraphicsContextGLANGLE::makeContextCurrent()
- {
--    static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #ifdef __GLIBC__
-+        static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #else
-+        static thread_local GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #endif
- 
-     if (s_currentContext == this)
-         return true;
--- 
diff --git a/srcpkgs/webkit2gtk/patches/le-check.patch b/srcpkgs/webkit2gtk/patches/le-check.patch
deleted file mode 100644
index c5a873befd4bf..0000000000000
--- a/srcpkgs/webkit2gtk/patches/le-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ef8f9a0b61509401e64c717c7cc6f025f1b49300 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Mon, 4 Jan 2021 19:12:25 +0100
-Subject: [PATCH] portable little endian check
-
----
- Source/ThirdParty/xdgmime/src/xdgmimemagic.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git Source/ThirdParty/xdgmime/src/xdgmimemagic.c Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-index 3a62b9d..9bd4e1d 100644
---- a/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-+++ b/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-@@ -485,8 +485,7 @@ _xdg_mime_magic_parse_magic_line (FILE              *magic_file,
- 	      _xdg_mime_magic_matchlet_free (matchlet);
- 	      return XDG_MIME_MAGIC_ERROR;
- 	    }
--	  /* FIXME: need to get this defined in a <config.h> style file */
--#if LITTLE_ENDIAN
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- 	  for (i = 0; i < matchlet->value_length; i = i + matchlet->word_size)
- 	    {
- 	      if (matchlet->word_size == 2)
--- 
-2.30.0
-
diff --git a/srcpkgs/webkit2gtk/patches/prefer-pthread.patch b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
new file mode 100644
index 0000000000000..cb144f6dbb57f
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
@@ -0,0 +1,28 @@
+From: Alberto Garcia <berto@igalia.com>
+Description: Enable THREADS_PREFER_PTHREAD_FLAG
+ This fixes a FTBFS in riscv64
+Bug: https://bugs.webkit.org/show_bug.cgi?id=182622
+Bug-Debian: https://bugs.debian.org/895969
+Origin: https://trac.webkit.org/changeset/231843
+Index: webkitgtk/Source/cmake/OptionsGTK.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsGTK.cmake
++++ webkitgtk/Source/cmake/OptionsGTK.cmake
+@@ -13,6 +13,8 @@ endif ()
+ 
+ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
+ 
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++
+ find_package(Cairo 1.16.0 REQUIRED)
+ find_package(Fontconfig 2.13.0 REQUIRED)
+ find_package(Freetype 2.9.0 REQUIRED)
+Index: webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsJSCOnly.cmake
++++ webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+@@ -1,3 +1,4 @@
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+ 
+ if (MSVC)
diff --git a/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch b/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch
new file mode 100644
index 0000000000000..e45a3aa38d799
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch
@@ -0,0 +1,19 @@
+From: Alberto Garcia <berto@igalia.com>
+Subject: Reduce memory usage
+Bug-Debian: https://bugs.debian.org/949621
+Forwarded: no
+Index: webkitgtk/Source/cmake/OptionsCommon.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsCommon.cmake
++++ webkitgtk/Source/cmake/OptionsCommon.cmake
+@@ -194,6 +194,10 @@ option(GCC_OFFLINEASM_SOURCE_MAP
+ 
+ option(USE_APPLE_ICU "Use Apple's internal ICU" ${APPLE})
+ 
++# Pass --reduce-memory-overheads to the bfd linker in order to save memory
++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
++set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
++
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
+ #    to native threads for the parallelization of the SVG filters.
diff --git a/srcpkgs/webkit2gtk/patches/reproducible.patch b/srcpkgs/webkit2gtk/patches/reproducible.patch
deleted file mode 100644
index 2f3a555cbcfd4..0000000000000
--- a/srcpkgs/webkit2gtk/patches/reproducible.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-commit 7366988f033d29f2b2e2e68fedb8827ba09a2cc1
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Wed Jan 5 17:50:07 2022 +0100
-
-    reproducible build
-
-diff --git a/Source/WebCore/bindings/scripts/CodeGenerator.pm b/Source/WebCore/bindings/scripts/CodeGenerator.pm
-index a604bfd3..c267b402 100644
---- a/Source/WebCore/bindings/scripts/CodeGenerator.pm
-+++ b/Source/WebCore/bindings/scripts/CodeGenerator.pm
-@@ -324,7 +324,7 @@ sub MergeExtendedAttributesFromSupplemental
- {
-     my ($object, $supplementalExtendedAttributes, $property, $context) = @_;
- 
--    foreach my $extendedAttributeName (keys %{$supplementalExtendedAttributes}) {
-+    foreach my $extendedAttributeName (sort keys %{$supplementalExtendedAttributes}) {
-         my $isAllowed = 0;
-         for my $contextAllowed (@{$idlAttributes->{$extendedAttributeName}->{"contextsAllowed"}}) {
-             if ($contextAllowed eq $context) {
-diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
-index be5a5d51..becb2b2f 100644
---- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
-+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
-@@ -3217,7 +3217,7 @@ sub GenerateHeader
-         } else {
-             push(@headerContent, "    static constexpr unsigned StructureFlags = Base::StructureFlags");
-         }
--        foreach my $structureFlag (sort (keys %structureFlags)) {
-+        foreach my $structureFlag (sort (sort keys %structureFlags)) {
-             push(@headerContent, " | " . $structureFlag);
-         }
-         push(@headerContent, ";\n");
-@@ -7433,7 +7433,7 @@ sub WriteData
- 
-     my @includes = ();
-     my %implIncludeConditions = ();
--    foreach my $include (keys %implIncludes) {
-+    foreach my $include (sort keys %implIncludes) {
-         next if $headerIncludes{$include};
-         next if $headerTrailingIncludes{$include};
- 
-@@ -7473,7 +7473,7 @@ sub WriteData
-     $contents = join "", @headerContentHeader;
- 
-     @includes = ();
--    foreach my $include (keys %headerIncludes) {
-+    foreach my $include (sort keys %headerIncludes) {
-         $include = "\"$include\"" unless $include =~ /^["<]/; # "
-         $include = SubstituteHeader($include);
-         push @includes, $include;
-@@ -7487,7 +7487,7 @@ sub WriteData
-     $contents .= join "", @headerContent;
- 
-     @includes = ();
--    foreach my $include (keys %headerTrailingIncludes) {
-+    foreach my $include (sort keys %headerTrailingIncludes) {
-         $include = "\"$include\"" unless $include =~ /^["<]/; # "
-         push @includes, $include;
-     }
-@@ -7560,7 +7560,7 @@ sub GeneratePrototypeDeclaration
-     if (%structureFlags) {
-         push(@$outputArray, "public:\n");
-         push(@$outputArray, "    static constexpr unsigned StructureFlags = Base::StructureFlags");
--        foreach my $structureFlag (sort (keys %structureFlags)) {
-+        foreach my $structureFlag (sort (sort keys %structureFlags)) {
-             push(@$outputArray, " | " . $structureFlag);
-         }
-         push(@$outputArray, ";\n");
-diff --git a/Source/cmake/tools/scripts/version-stamp.pl b/Source/cmake/tools/scripts/version-stamp.pl
-index 888a4502..57ab9b16 100644
---- a/Source/cmake/tools/scripts/version-stamp.pl
-+++ b/Source/cmake/tools/scripts/version-stamp.pl
-@@ -75,7 +75,7 @@ my $VERSION_FILE = File::Spec->catfile(File::Spec->canonpath($intdir), 'include'
- 
- open(VERSION_INFO, '<', $VERSION_FILE) or die "Unable to open $VERSION_FILE: $!\n";
- while (my $line = <VERSION_INFO>) {
--    foreach my $componentKey (keys %components) {
-+    foreach my $componentKey (sort keys %components) {
-         if ($line !~ m/$componentKey/) {
-             next;
-         }
diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template
index 9f67996e209e5..0689df3273e0d 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,10 +1,10 @@
 # Template file for 'webkit2gtk'
 pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.5
+revision=1
 build_style=cmake
 build_helper="gir"
-configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
+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_MINIBROWSER=$(vopt_if minibrowser ON OFF)
@@ -29,14 +29,15 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
  woff2-devel freetype-devel libopenjpeg2-devel libavif-devel
  qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel
  libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel)
- $(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
+ $(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')
+ libjxl-devel"
 depends="gst-plugins-good1"
 short_desc="GTK+3 port of the WebKit browser engine"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-or-later, BSD-2-Clause"
 homepage="https://webkitgtk.org/"
 distfiles="https://webkitgtk.org/releases/webkitgtk-${version}.tar.xz"
-checksum=a4607ea1bf89669e89b1cb2c63faaec513f93de09b6ae60cc71d6a8aab7ab393
+checksum=b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749
 make_check=no # TODO
 
 replaces="webkit2gtk-common>0"
@@ -69,6 +70,8 @@ if [ "$build_option_bubblewrap" ]; then
 	hostmakedepends+=" bubblewrap xdg-dbus-proxy"
 	makedepends+=" libseccomp-devel"
 	depends+=" bubblewrap xdg-dbus-proxy"
+	configure_args+=" -DBWRAP_EXECUTABLE=/usr/bin/bwrap
+	 -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy"
 fi
 
 if [ "$build_option_lto" -a -z "$build_option_clang" ]; then
@@ -147,7 +150,7 @@ pre_configure() {
 }
 
 post_configure() {
-	mkdir -p webkit2gtk-40 webkit2gtk-50
+	mkdir -p webkit2gtk-40 webkit2gtk-60
 	(
 		cd webkit2gtk-40
 		configure_args="${configure_args} -DUSE_SOUP2=ON -DENABLE_WEBDRIVER=OFF" \
@@ -155,7 +158,7 @@ post_configure() {
 	)
 
 	(
-		cd webkit2gtk-50
+		cd webkit2gtk-60
 		configure_args="${configure_args} -DUSE_GTK4=ON -DENABLE_WEBDRIVER=OFF" \
 		do_configure
 	)
@@ -163,12 +166,12 @@ post_configure() {
 
 post_build() {
 	(cd webkit2gtk-40 && NINJA_STATUS="[2/3][%f/%t] " do_build)
-	(cd webkit2gtk-50 && NINJA_STATUS="[3/3][%f/%t] " do_build)
+	(cd webkit2gtk-60 && NINJA_STATUS="[3/3][%f/%t] " do_build)
 }
 
 post_install() {
 	(cd webkit2gtk-40 && do_install)
-	(cd webkit2gtk-50 && do_install)
+	(cd webkit2gtk-60 && do_install)
 
 	vlicense Source/WebCore/LICENSE-APPLE
 	vlicense Source/WebCore/LICENSE-LGPL-2.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
@ 2024-02-19 22:43 ` oreo639
  2024-02-19 22:43 ` oreo639
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-19 22:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#discussion_r1495062354

Comment:
Use `-DUSE_JPEGXL=OFF` for now. (jpegxl requires all dependents to be rebuilt for every minor release atm and webkit2gtk is a large dependent)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
  2024-02-19 22:43 ` [PR REVIEW] " oreo639
@ 2024-02-19 22:43 ` oreo639
  2024-02-19 22:44 ` oreo639
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-19 22:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#discussion_r1495065589

Comment:
Add `_depends` like in https://github.com/void-linux/void-packages/pull/47600/files

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
  2024-02-19 22:43 ` [PR REVIEW] " oreo639
  2024-02-19 22:43 ` oreo639
@ 2024-02-19 22:44 ` oreo639
  2024-02-19 22:47 ` oreo639
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-19 22:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#discussion_r1495062354

Comment:
Use `-DUSE_JPEGXL=OFF` for now. (jpegxl requires all dependents to be rebuilt for every minor release atm and webkit2gtk is a large dependent, maybe in the future)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (2 preceding siblings ...)
  2024-02-19 22:44 ` oreo639
@ 2024-02-19 22:47 ` oreo639
  2024-02-19 23:15 ` [PR PATCH] [Updated] " chrysos349
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-19 22:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#discussion_r1495062354

Comment:
Use `-DUSE_JPEGXL=OFF` for now. (jpegxl requires all dependents to be rebuilt for every minor release atm and webkit2gtk is a very large dependent, maybe in the future)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (3 preceding siblings ...)
  2024-02-19 22:47 ` oreo639
@ 2024-02-19 23:15 ` chrysos349
  2024-02-19 23:26 ` chrysos349
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-19 23:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages webkit2gtk
https://github.com/void-linux/void-packages/pull/48839

webkit2gtk: update to 2.42.5
[ci skip]

**NOTES**
- `2.42.5` (and `2.42.4` before `.5` was released) was tested as a part of `gnome-45.*`
- Required for `gnome-45.*` (#48762)
- (Cross)-built for all archs that are checked in ci

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - aarch64 x
  - armv7l x
  - armv6l-musl x
  - x86_64-musl
  - i686


A patch file from https://github.com/void-linux/void-packages/pull/48839.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-48839.patch --]
[-- Type: text/x-diff, Size: 39073 bytes --]

From 4599cde944615525948de611f53a0a4fb4e1b88e Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Tue, 20 Feb 2024 00:49:10 +0300
Subject: [PATCH] webkit2gtk: update to 2.42.5

---
 .../patches/be-imagebufferbackend.patch       | 241 ------------------
 .../webkit2gtk/patches/be-typedarray.patch    | 206 ---------------
 .../patches/disable-dmabuf-nvidia.patch       |  63 +++++
 .../webkit2gtk/patches/fix-ftbfs-i386.patch   |  16 ++
 .../patches/fix-riscv64-build.patch           |  28 --
 srcpkgs/webkit2gtk/patches/initial-exec.patch |  23 --
 srcpkgs/webkit2gtk/patches/le-check.patch     |  26 --
 .../webkit2gtk/patches/prefer-pthread.patch   |  28 ++
 .../patches/reduce-memory-overheads.patch     |  19 ++
 srcpkgs/webkit2gtk/patches/reproducible.patch |  25 +-
 srcpkgs/webkit2gtk/template                   |  27 +-
 11 files changed, 148 insertions(+), 554 deletions(-)
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/initial-exec.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/le-check.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/prefer-pthread.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch

diff --git a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch b/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
deleted file mode 100644
index fd90cdb99ba3d0..00000000000000
--- a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-Original source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-diff --git a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-index 9acf304d..618b7b26 100644
---- a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-+++ b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-@@ -140,9 +140,17 @@ static void convertImagePixelsAccelerated(const ConstPixelBufferConversionView&
- enum class PixelFormatConversion { None, Permute };
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha) {
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = 0;
-         return;
-@@ -151,23 +158,81 @@ static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* source
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8)
-+        {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else
-+        {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[3] * 255) / alpha;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[3] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[2] * 255) / alpha;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-@@ -180,17 +245,58 @@ static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[3] * alpha + 254) / 255;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[3] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[2] * alpha + 254) / 255;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-@@ -203,23 +309,49 @@ static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        UNUSED_PARAM(sourcePixelFormat);
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
-+#if CPU(BIG_ENDIAN)
-+template<void (*convertFunctor)(PixelFormat, const uint8_t*, PixelFormat, uint8_t*)>
-+#else
- template<void (*convertFunctor)(const uint8_t*, uint8_t*)>
-+#endif
- static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView& source, const PixelBufferConversionView& destination, const IntSize& destinationSize)
- {
-     const uint8_t* sourceRows = source.rows;
-@@ -228,7 +360,11 @@ static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView
-     size_t bytesPerRow = destinationSize.width() * 4;
-     for (int y = 0; y < destinationSize.height(); ++y) {
-         for (size_t x = 0; x < bytesPerRow; x += 4)
-+#if CPU(BIG_ENDIAN)
-+            convertFunctor(source.format.pixelFormat, &sourceRows[x], destination.format.pixelFormat, &destinationRows[x]);
-+#else
-             convertFunctor(&sourceRows[x], &destinationRows[x]);
-+#endif
-         sourceRows += source.bytesPerRow;
-         destinationRows += destination.bytesPerRow;
-     }
-diff --git a/Source/WebCore/platform/graphics/PixelFormat.h b/Source/WebCore/platform/graphics/PixelFormat.h
-index 1ca711b8..4a7168f8 100644
---- a/Source/WebCore/platform/graphics/PixelFormat.h
-+++ b/Source/WebCore/platform/graphics/PixelFormat.h
-@@ -33,6 +33,9 @@ namespace WebCore {
- enum class PixelFormat : uint8_t {
-     RGBA8,
-     BGRA8,
-+#if CPU(BIG_ENDIAN)
-+    ARGB8 = BGRA8, // BGRA will actually be ARGB on BIG_ENDIAN
-+#endif
-     RGB10,
-     RGB10A8,
- };
diff --git a/srcpkgs/webkit2gtk/patches/be-typedarray.patch b/srcpkgs/webkit2gtk/patches/be-typedarray.patch
deleted file mode 100644
index cbb706564fe9ce..00000000000000
--- a/srcpkgs/webkit2gtk/patches/be-typedarray.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-Source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-https://tenfourfox.tenderapp.com/discussions/problems/7505-problems-uploading-to-facebook
-
-Updated by @q66.
-
-diff --git a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-index e76dada0..4de2e3ea 100644
---- a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-+++ b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-@@ -198,3 +198,9 @@
- #else
- #define OFFLINE_ASM_HAVE_FAST_TLS 0
- #endif
-+
-+#if CPU(BIG_ENDIAN)
-+#define OFFLINE_ASM_BIG_ENDIAN 1
-+#else
-+#define OFFLINE_ASM_BIG_ENDIAN 0
-+#endif
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-index 22716f81..4f9374ce 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-@@ -1732,7 +1732,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
- 
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     loadi ArrayStorage::m_vector + TagOffset[t3, t1, 8], t2
-     loadi ArrayStorage::m_vector + PayloadOffset[t3, t1, 8], t1
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-index c453351d..e61529e5 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-@@ -1867,7 +1867,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
-     
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     get(m_dst, t0)
-     loadq ArrayStorage::m_vector[t3, t1, 8], t2
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-index 86f48a02..1541b3a8 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-@@ -29,6 +29,7 @@
- #include "ThrowScope.h"
- #include "ToNativeFromValue.h"
- #include <wtf/CheckedArithmetic.h>
-+#include <wtf/FlipBytes.h>
- 
- namespace JSC {
- 
-@@ -147,7 +148,18 @@ public:
-     
-     JSValue getIndexQuickly(size_t i) const
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return Adaptor::toJSValue(nullptr, flipBytes(getIndexQuicklyAsNativeValue(i)));
-+        }
-+#else
-         return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+#endif
-     }
-     
-     void setIndexQuicklyToNativeValue(size_t i, typename Adaptor::Type value)
-@@ -159,7 +171,20 @@ public:
-     void setIndexQuickly(size_t i, JSValue value)
-     {
-         ASSERT(!value.isObject());
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(toNativeFromValue<Adaptor>(value)));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+#endif
-     }
-     
-     bool setIndex(JSGlobalObject* globalObject, size_t i, JSValue jsValue)
-@@ -173,18 +198,55 @@ public:
-         if (isDetached() || i >= m_length)
-             return false;
- 
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, value);
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(value));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, value);
-+#endif
-         return true;
-     }
- 
-     static ElementType toAdaptorNativeFromValue(JSGlobalObject* globalObject, JSValue jsValue)
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return flipBytes(toNativeFromValue<Adaptor>(globalObject, jsValue));
-+        }
-+#else
-         return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+#endif
-     }
- 
-     static std::optional<ElementType> toAdaptorNativeFromValueWithoutCoercion(JSValue jsValue)
-     {
--        return toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+        auto opt = toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            if (!opt)
-+                break;
-+            return std::optional<ElementType>{flipBytes(*opt)};
-+        }
-+#endif
-+        return opt;
-     }
- 
-     void sort()
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-index df0435f6..3017563c 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-@@ -385,9 +385,36 @@ ALWAYS_INLINE EncodedJSValue genericType
- 
-     size_t searchLength = std::min<size_t>(length, updatedLength);
-     if constexpr (ViewClass::Adaptor::isFloat) {
--        if (std::isnan(static_cast<double>(*targetOption))) {
-+        double targetOptionLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+        switch (ViewClass::TypedArrayStorageType) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            targetOptionLittleEndianAsDouble = static_cast<double>(flipBytes(*targetOption));
-+        }
-+#else
-+        targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+#endif
-+
-+        if (std::isnan(targetOptionLittleEndianAsDouble)) {
-             for (; index < searchLength; ++index) {
--                if (std::isnan(static_cast<double>(array[index])))
-+                double arrayElementLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+                switch (ViewClass::TypedArrayStorageType) {
-+                case TypeFloat32:
-+                case TypeFloat64:
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+                default:
-+                    // typed array views are commonly expected to be little endian views of the underlying data
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(flipBytes(array[index]));
-+                }
-+#else
-+                arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+#endif
-+                if (std::isnan(arrayElementLittleEndianAsDouble))
-                     return JSValue::encode(jsBoolean(true));
-             }
-             return JSValue::encode(jsBoolean(false));
diff --git a/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
new file mode 100644
index 00000000000000..652c639ce38bfa
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
@@ -0,0 +1,63 @@
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+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 <WebCore/GLContext.h>
+ #include <WebCore/IntRect.h>
+ #include <WebCore/PlatformDisplay.h>
++#include <WebCore/PlatformDisplaySurfaceless.h>
+ #include <epoxy/egl.h>
+ #include <wtf/glib/GUniquePtr.h>
+ 
+ #if USE(GBM)
+ #include <WebCore/DMABufFormat.h>
++#include <WebCore/PlatformDisplayGBM.h>
+ #include <gbm.h>
+ 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<WebCore::PlatformDisplay> 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<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
++        return true;
++    return false;
++}
++
+ OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
+ {
+     static OptionSet<DMABufRendererBufferMode> mode;
+@@ -70,6 +95,9 @@ OptionSet<DMABufRendererBufferMode> 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
new file mode 100644
index 00000000000000..1b5ec0da142c09
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
@@ -0,0 +1,16 @@
+From: Alberto Garcia <berto@igalia.com>
+Subject: Fix FTBFS in i386
+Bug: https://bugs.webkit.org/show_bug.cgi?id=268739
+Index: webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.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);
+ 
+     struct StackPointerScope {
+         StackPointerScope(CLoopStack& stack)
diff --git a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch b/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
deleted file mode 100644
index 3f599ea3c5698f..00000000000000
--- a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/Source/JavaScriptCore/offlineasm/riscv64.rb b/Source/JavaScriptCore/offlineasm/riscv64.rb
-index 81f356d04ae1..4abb1761509d 100644
---- a/Source/JavaScriptCore/offlineasm/riscv64.rb
-+++ b/Source/JavaScriptCore/offlineasm/riscv64.rb
-@@ -1523,7 +1523,8 @@ def riscv64GenerateWASMPlaceholders(list)
-         if node.is_a? Instruction
-             case node.opcode
-             when "loadlinkacqb", "loadlinkacqh", "loadlinkacqi", "loadlinkacqq",
--                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq"
-+                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq",
-+                 "loadv", "storev"
-                 newList << Instruction.new(node.codeOrigin, "rv_ebreak", [], "WebAssembly placeholder for opcode #{node.opcode}")
-             else
-                 newList << node
-diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index e30a3d8ce077..937fdd447f92 100644
---- a/Source/WTF/wtf/PlatformEnable.h
-+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -616,7 +616,7 @@
- #undef ENABLE_WEBASSEMBLY
- #define ENABLE_WEBASSEMBLY 1
- #undef ENABLE_WEBASSEMBLY_B3JIT
--#define ENABLE_WEBASSEMBLY_B3JIT 0
-+#define ENABLE_WEBASSEMBLY_B3JIT 1
- #undef ENABLE_WEBASSEMBLY_BBQJIT
- #define ENABLE_WEBASSEMBLY_BBQJIT 0
- #endif
-
diff --git a/srcpkgs/webkit2gtk/patches/initial-exec.patch b/srcpkgs/webkit2gtk/patches/initial-exec.patch
deleted file mode 100644
index 579084bd606502..00000000000000
--- a/srcpkgs/webkit2gtk/patches/initial-exec.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Source: https://bugs.webkit.org/show_bug.cgi?id=254286
-
-Usage initial-exec TLS is incompatible with dlopen() on musl.
-
-See also: https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39
- .../platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp   | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
---- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-+++ a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-@@ -108,7 +108,11 @@ RefPtr<PixelBuffer> GraphicsContextGLANGLE::readCompositedResults()
- 
- bool GraphicsContextGLANGLE::makeContextCurrent()
- {
--    static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #ifdef __GLIBC__
-+        static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #else
-+        static thread_local GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #endif
- 
-     if (s_currentContext == this)
-         return true;
--- 
diff --git a/srcpkgs/webkit2gtk/patches/le-check.patch b/srcpkgs/webkit2gtk/patches/le-check.patch
deleted file mode 100644
index c5a873befd4bfa..00000000000000
--- a/srcpkgs/webkit2gtk/patches/le-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ef8f9a0b61509401e64c717c7cc6f025f1b49300 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Mon, 4 Jan 2021 19:12:25 +0100
-Subject: [PATCH] portable little endian check
-
----
- Source/ThirdParty/xdgmime/src/xdgmimemagic.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git Source/ThirdParty/xdgmime/src/xdgmimemagic.c Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-index 3a62b9d..9bd4e1d 100644
---- a/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-+++ b/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-@@ -485,8 +485,7 @@ _xdg_mime_magic_parse_magic_line (FILE              *magic_file,
- 	      _xdg_mime_magic_matchlet_free (matchlet);
- 	      return XDG_MIME_MAGIC_ERROR;
- 	    }
--	  /* FIXME: need to get this defined in a <config.h> style file */
--#if LITTLE_ENDIAN
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- 	  for (i = 0; i < matchlet->value_length; i = i + matchlet->word_size)
- 	    {
- 	      if (matchlet->word_size == 2)
--- 
-2.30.0
-
diff --git a/srcpkgs/webkit2gtk/patches/prefer-pthread.patch b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
new file mode 100644
index 00000000000000..cb144f6dbb57f5
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
@@ -0,0 +1,28 @@
+From: Alberto Garcia <berto@igalia.com>
+Description: Enable THREADS_PREFER_PTHREAD_FLAG
+ This fixes a FTBFS in riscv64
+Bug: https://bugs.webkit.org/show_bug.cgi?id=182622
+Bug-Debian: https://bugs.debian.org/895969
+Origin: https://trac.webkit.org/changeset/231843
+Index: webkitgtk/Source/cmake/OptionsGTK.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsGTK.cmake
++++ webkitgtk/Source/cmake/OptionsGTK.cmake
+@@ -13,6 +13,8 @@ endif ()
+ 
+ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
+ 
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++
+ find_package(Cairo 1.16.0 REQUIRED)
+ find_package(Fontconfig 2.13.0 REQUIRED)
+ find_package(Freetype 2.9.0 REQUIRED)
+Index: webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsJSCOnly.cmake
++++ webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+@@ -1,3 +1,4 @@
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+ 
+ if (MSVC)
diff --git a/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch b/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch
new file mode 100644
index 00000000000000..e45a3aa38d7992
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/reduce-memory-overheads.patch
@@ -0,0 +1,19 @@
+From: Alberto Garcia <berto@igalia.com>
+Subject: Reduce memory usage
+Bug-Debian: https://bugs.debian.org/949621
+Forwarded: no
+Index: webkitgtk/Source/cmake/OptionsCommon.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsCommon.cmake
++++ webkitgtk/Source/cmake/OptionsCommon.cmake
+@@ -194,6 +194,10 @@ option(GCC_OFFLINEASM_SOURCE_MAP
+ 
+ option(USE_APPLE_ICU "Use Apple's internal ICU" ${APPLE})
+ 
++# Pass --reduce-memory-overheads to the bfd linker in order to save memory
++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
++set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
++
+ # Enable the usage of OpenMP.
+ #  - At this moment, OpenMP is only used as an alternative implementation
+ #    to native threads for the parallelization of the SVG filters.
diff --git a/srcpkgs/webkit2gtk/patches/reproducible.patch b/srcpkgs/webkit2gtk/patches/reproducible.patch
index 2f3a555cbcfd4b..442b7d2a6aef47 100644
--- a/srcpkgs/webkit2gtk/patches/reproducible.patch
+++ b/srcpkgs/webkit2gtk/patches/reproducible.patch
@@ -5,7 +5,7 @@ Date:   Wed Jan 5 17:50:07 2022 +0100
     reproducible build
 
 diff --git a/Source/WebCore/bindings/scripts/CodeGenerator.pm b/Source/WebCore/bindings/scripts/CodeGenerator.pm
-index a604bfd3..c267b402 100644
+index 1e95784b..eb642a52 100644
 --- a/Source/WebCore/bindings/scripts/CodeGenerator.pm
 +++ b/Source/WebCore/bindings/scripts/CodeGenerator.pm
 @@ -324,7 +324,7 @@ sub MergeExtendedAttributesFromSupplemental
@@ -18,7 +18,7 @@ index a604bfd3..c267b402 100644
          for my $contextAllowed (@{$idlAttributes->{$extendedAttributeName}->{"contextsAllowed"}}) {
              if ($contextAllowed eq $context) {
 diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
-index be5a5d51..becb2b2f 100644
+index 275fce91..8c1534be 100644
 --- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
 +++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
 @@ -3217,7 +3217,7 @@ sub GenerateHeader
@@ -30,7 +30,7 @@ index be5a5d51..becb2b2f 100644
              push(@headerContent, " | " . $structureFlag);
          }
          push(@headerContent, ";\n");
-@@ -7433,7 +7433,7 @@ sub WriteData
+@@ -7515,7 +7515,7 @@ sub WriteData
  
      my @includes = ();
      my %implIncludeConditions = ();
@@ -39,7 +39,7 @@ index be5a5d51..becb2b2f 100644
          next if $headerIncludes{$include};
          next if $headerTrailingIncludes{$include};
  
-@@ -7473,7 +7473,7 @@ sub WriteData
+@@ -7555,7 +7555,7 @@ sub WriteData
      $contents = join "", @headerContentHeader;
  
      @includes = ();
@@ -48,7 +48,7 @@ index be5a5d51..becb2b2f 100644
          $include = "\"$include\"" unless $include =~ /^["<]/; # "
          $include = SubstituteHeader($include);
          push @includes, $include;
-@@ -7487,7 +7487,7 @@ sub WriteData
+@@ -7569,7 +7569,7 @@ sub WriteData
      $contents .= join "", @headerContent;
  
      @includes = ();
@@ -57,7 +57,7 @@ index be5a5d51..becb2b2f 100644
          $include = "\"$include\"" unless $include =~ /^["<]/; # "
          push @includes, $include;
      }
-@@ -7560,7 +7560,7 @@ sub GeneratePrototypeDeclaration
+@@ -7642,7 +7642,7 @@ sub GeneratePrototypeDeclaration
      if (%structureFlags) {
          push(@$outputArray, "public:\n");
          push(@$outputArray, "    static constexpr unsigned StructureFlags = Base::StructureFlags");
@@ -66,16 +66,3 @@ index be5a5d51..becb2b2f 100644
              push(@$outputArray, " | " . $structureFlag);
          }
          push(@$outputArray, ";\n");
-diff --git a/Source/cmake/tools/scripts/version-stamp.pl b/Source/cmake/tools/scripts/version-stamp.pl
-index 888a4502..57ab9b16 100644
---- a/Source/cmake/tools/scripts/version-stamp.pl
-+++ b/Source/cmake/tools/scripts/version-stamp.pl
-@@ -75,7 +75,7 @@ my $VERSION_FILE = File::Spec->catfile(File::Spec->canonpath($intdir), 'include'
- 
- open(VERSION_INFO, '<', $VERSION_FILE) or die "Unable to open $VERSION_FILE: $!\n";
- while (my $line = <VERSION_INFO>) {
--    foreach my $componentKey (keys %components) {
-+    foreach my $componentKey (sort keys %components) {
-         if ($line !~ m/$componentKey/) {
-             next;
-         }
diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template
index 9f67996e209e51..5fc8c66d7a2782 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,10 +1,10 @@
 # Template file for 'webkit2gtk'
 pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.5
+revision=1
 build_style=cmake
 build_helper="gir"
-configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
+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_MINIBROWSER=$(vopt_if minibrowser ON OFF)
@@ -15,7 +15,8 @@ configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
  -DENABLE_WAYLAND_TARGET=$(vopt_if wayland ON OFF)
  -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)"
+ -DENABLE_BUBBLEWRAP_SANDBOX=$(vopt_if bubblewrap ON OFF)
+ -DUSE_JPEGXL=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
@@ -36,7 +37,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-or-later, BSD-2-Clause"
 homepage="https://webkitgtk.org/"
 distfiles="https://webkitgtk.org/releases/webkitgtk-${version}.tar.xz"
-checksum=a4607ea1bf89669e89b1cb2c63faaec513f93de09b6ae60cc71d6a8aab7ab393
+checksum=b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749
 make_check=no # TODO
 
 replaces="webkit2gtk-common>0"
@@ -69,6 +70,8 @@ if [ "$build_option_bubblewrap" ]; then
 	hostmakedepends+=" bubblewrap xdg-dbus-proxy"
 	makedepends+=" libseccomp-devel"
 	depends+=" bubblewrap xdg-dbus-proxy"
+	configure_args+=" -DBWRAP_EXECUTABLE=/usr/bin/bwrap
+	 -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy"
 fi
 
 if [ "$build_option_lto" -a -z "$build_option_clang" ]; then
@@ -122,6 +125,8 @@ if [ "$build_option_sampling_profiler" -a -z "$build_option_jit" ]; then
 	broken="sampling_profiler requires JIT"
 fi
 
+_depends="${depends}"
+
 pre_configure() {
 	if [ "$build_option_clang" ]; then
 		export CC=clang
@@ -147,7 +152,7 @@ pre_configure() {
 }
 
 post_configure() {
-	mkdir -p webkit2gtk-40 webkit2gtk-50
+	mkdir -p webkit2gtk-40 webkit2gtk-60
 	(
 		cd webkit2gtk-40
 		configure_args="${configure_args} -DUSE_SOUP2=ON -DENABLE_WEBDRIVER=OFF" \
@@ -155,7 +160,7 @@ post_configure() {
 	)
 
 	(
-		cd webkit2gtk-50
+		cd webkit2gtk-60
 		configure_args="${configure_args} -DUSE_GTK4=ON -DENABLE_WEBDRIVER=OFF" \
 		do_configure
 	)
@@ -163,12 +168,12 @@ post_configure() {
 
 post_build() {
 	(cd webkit2gtk-40 && NINJA_STATUS="[2/3][%f/%t] " do_build)
-	(cd webkit2gtk-50 && NINJA_STATUS="[3/3][%f/%t] " do_build)
+	(cd webkit2gtk-60 && NINJA_STATUS="[3/3][%f/%t] " do_build)
 }
 
 post_install() {
 	(cd webkit2gtk-40 && do_install)
-	(cd webkit2gtk-50 && do_install)
+	(cd webkit2gtk-60 && do_install)
 
 	vlicense Source/WebCore/LICENSE-APPLE
 	vlicense Source/WebCore/LICENSE-LGPL-2.1
@@ -192,7 +197,7 @@ webkit2gtk-devel_package() {
 }
 
 libwebkit2gtk41_package() {
-	depends="${depends}"
+	depends="${_depends}"
 	short_desc="GTK+3 port of the WebKit browser engine (soup3)"
 	pkg_install() {
 		vmove usr/bin/WebKitWebDriver
@@ -228,7 +233,7 @@ libwebkit2gtk41-devel_package() {
 }
 
 libwebkitgtk60_package() {
-	depends="${depends}"
+	depends="${_depends}"
 	short_desc="GTK4 port of the WebKit browser engine"
 	pkg_install() {
 		vmove usr/libexec/webkitgtk-6.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (4 preceding siblings ...)
  2024-02-19 23:15 ` [PR PATCH] [Updated] " chrysos349
@ 2024-02-19 23:26 ` chrysos349
  2024-02-20  2:50 ` oreo639
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-19 23:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953270268

Comment:
@oreo639

I changed the template according to your recommendations. Thanks!

> Also, don't remove the reproducible patch.

I removed the patch, because the old one was rejected. I got a new one from chimera cports.

Could you explain why the reproducibility is important? No other distro (except for void and chimera) requires this patch.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (5 preceding siblings ...)
  2024-02-19 23:26 ` chrysos349
@ 2024-02-20  2:50 ` oreo639
  2024-02-20  2:50 ` oreo639
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-20  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953401620

Comment:
> Could you explain why the reproducibility is important? No other distro (except for void and chimera) requires this patch.

Helps with debugging. (and also ccache)

Also, regarding the `--reduce-memory-overheads`, were you getting OOMs when compiling to i686?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (6 preceding siblings ...)
  2024-02-20  2:50 ` oreo639
@ 2024-02-20  2:50 ` oreo639
  2024-02-20  5:45 ` chrysos349
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-20  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953401620

Comment:
> Could you explain why the reproducibility is important? No other distro (except for void and chimera) requires this patch.

Helps with debugging. (and also ccache)

Also, regarding the `--reduce-memory-overheads` patch, were you getting OOMs when compiling to i686?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (7 preceding siblings ...)
  2024-02-20  2:50 ` oreo639
@ 2024-02-20  5:45 ` chrysos349
  2024-02-20  6:08 ` oreo639
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-20  5:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953525225

Comment:
> (and also ccache)

So that's the reason I didn't see any speedup, despite the ccache being turned on.

> Also, regarding the `--reduce-memory-overheads` patch, were you getting OOMs when compiling to i686?

No, I didn't. It's not llvm, lol.

I thought it wouldn't hurt, and others might need it.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (8 preceding siblings ...)
  2024-02-20  5:45 ` chrysos349
@ 2024-02-20  6:08 ` oreo639
  2024-02-20  6:10 ` oreo639
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-20  6:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953546522

Comment:
> I thought it wouldn't hurt, and others might need it.

Imo, it can be added to LDFLAGS if it is needed.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (9 preceding siblings ...)
  2024-02-20  6:08 ` oreo639
@ 2024-02-20  6:10 ` oreo639
  2024-02-20  6:55 ` [PR PATCH] [Updated] " chrysos349
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-20  6:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953546522

Comment:
> I thought it wouldn't hurt, and others might need it.

Imo, it can be added to LDFLAGS if it is needed rather than needing a patch.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (10 preceding siblings ...)
  2024-02-20  6:10 ` oreo639
@ 2024-02-20  6:55 ` chrysos349
  2024-02-20  6:55 ` chrysos349
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-20  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages webkit2gtk
https://github.com/void-linux/void-packages/pull/48839

webkit2gtk: update to 2.42.5
[ci skip]

**NOTES**
- `2.42.5` (and `2.42.4` before `.5` was released) was tested as a part of `gnome-45.*`
- Required for `gnome-45.*` (#48762)
- (Cross)-built for all archs that are checked in ci

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - aarch64 x
  - armv7l x
  - armv6l-musl x
  - x86_64-musl
  - i686


A patch file from https://github.com/void-linux/void-packages/pull/48839.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-48839.patch --]
[-- Type: text/x-diff, Size: 37731 bytes --]

From 4a685e96f588ce076284e492fc6d43ffdbf1d2ee Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Tue, 20 Feb 2024 00:49:10 +0300
Subject: [PATCH] webkit2gtk: update to 2.42.5

---
 .../patches/be-imagebufferbackend.patch       | 241 ------------------
 .../webkit2gtk/patches/be-typedarray.patch    | 206 ---------------
 .../patches/disable-dmabuf-nvidia.patch       |  63 +++++
 .../webkit2gtk/patches/fix-ftbfs-i386.patch   |  16 ++
 .../patches/fix-riscv64-build.patch           |  28 --
 srcpkgs/webkit2gtk/patches/initial-exec.patch |  23 --
 srcpkgs/webkit2gtk/patches/le-check.patch     |  26 --
 .../webkit2gtk/patches/prefer-pthread.patch   |  28 ++
 srcpkgs/webkit2gtk/patches/reproducible.patch |  25 +-
 srcpkgs/webkit2gtk/template                   |  27 +-
 10 files changed, 129 insertions(+), 554 deletions(-)
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/initial-exec.patch
 delete mode 100644 srcpkgs/webkit2gtk/patches/le-check.patch
 create mode 100644 srcpkgs/webkit2gtk/patches/prefer-pthread.patch

diff --git a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch b/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
deleted file mode 100644
index fd90cdb99ba3d..0000000000000
--- a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-Original source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-diff --git a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-index 9acf304d..618b7b26 100644
---- a/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-+++ b/Source/WebCore/platform/graphics/PixelBufferConversion.cpp
-@@ -140,9 +140,17 @@ static void convertImagePixelsAccelerated(const ConstPixelBufferConversionView&
- enum class PixelFormatConversion { None, Permute };
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha) {
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = 0;
-         return;
-@@ -151,23 +158,81 @@ static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* source
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8)
-+        {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else
-+        {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelPremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[3] * 255) / alpha;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[1] = (sourcePixel[2] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[3] * 255) / alpha;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * 255) / alpha;
-+            destinationPixel[2] = (sourcePixel[1] * 255) / alpha;
-+            destinationPixel[3] = (sourcePixel[2] * 255) / alpha;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[1] = (sourcePixel[1] * 255) / alpha;
-@@ -180,17 +245,58 @@ static void convertSinglePixelPremultipliedToUnpremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * 255) / alpha;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToPremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-+#if CPU(BIG_ENDIAN)
-+    uint8_t alpha = sourcePixel[sourcePixelFormat == PixelFormat::ARGB8 ? 0 : 3];
-+#else
-     uint8_t alpha = sourcePixel[3];
-+#endif
-     if (!alpha || alpha == 255) {
-+#if CPU(BIG_ENDIAN)
-+        convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel);
-+#else
-         convertSinglePixelPremultipliedToPremultiplied<pixelFormatConversion>(sourcePixel, destinationPixel);
-+#endif
-         return;
-     }
- 
-+#if CPU(BIG_ENDIAN)
-+    UNUSED_PARAM(destinationPixelFormat);
-+    if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[3] * alpha + 254) / 255;
-+        } else {
-+            destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        }
-+    } else {
-+        if (sourcePixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[1] = (sourcePixel[2] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[3] * alpha + 254) / 255;
-+            destinationPixel[3] = alpha;
-+        } else {
-+            destinationPixel[0] = alpha;
-+            destinationPixel[1] = (sourcePixel[0] * alpha + 254) / 255;
-+            destinationPixel[2] = (sourcePixel[1] * alpha + 254) / 255;
-+            destinationPixel[3] = (sourcePixel[2] * alpha + 254) / 255;
-+        }
-+    }
-+#else
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None) {
-         destinationPixel[0] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[1] = (sourcePixel[1] * alpha + 254) / 255;
-@@ -203,23 +309,49 @@ static void convertSinglePixelUnpremultipliedToPremultiplied(const uint8_t* sour
-         destinationPixel[2] = (sourcePixel[0] * alpha + 254) / 255;
-         destinationPixel[3] = alpha;
-     }
-+#endif
- }
- 
- template<PixelFormatConversion pixelFormatConversion>
-+#if CPU(BIG_ENDIAN)
-+static void convertSinglePixelUnpremultipliedToUnpremultiplied(PixelFormat sourcePixelFormat, const uint8_t* sourcePixel, PixelFormat destinationPixelFormat, uint8_t* destinationPixel)
-+#else
- static void convertSinglePixelUnpremultipliedToUnpremultiplied(const uint8_t* sourcePixel, uint8_t* destinationPixel)
-+#endif
- {
-     if constexpr (pixelFormatConversion == PixelFormatConversion::None)
-         reinterpret_cast<uint32_t*>(destinationPixel)[0] = reinterpret_cast<const uint32_t*>(sourcePixel)[0];
-     else {
-+#if CPU(BIG_ENDIAN)
-+        UNUSED_PARAM(sourcePixelFormat);
-+        // Swap pixel channels ARGB <-> RGBA.
-+        if (destinationPixelFormat == PixelFormat::ARGB8) {
-+            destinationPixel[0] = sourcePixel[3];
-+            destinationPixel[1] = sourcePixel[0];
-+            destinationPixel[2] = sourcePixel[1];
-+            destinationPixel[3] = sourcePixel[2];
-+        }
-+        else {
-+            destinationPixel[0] = sourcePixel[1];
-+            destinationPixel[1] = sourcePixel[2];
-+            destinationPixel[2] = sourcePixel[3];
-+            destinationPixel[3] = sourcePixel[0];
-+        }
-+#else
-         // Swap pixel channels BGRA <-> RGBA.
-         destinationPixel[0] = sourcePixel[2];
-         destinationPixel[1] = sourcePixel[1];
-         destinationPixel[2] = sourcePixel[0];
-         destinationPixel[3] = sourcePixel[3];
-+#endif
-     }
- }
- 
-+#if CPU(BIG_ENDIAN)
-+template<void (*convertFunctor)(PixelFormat, const uint8_t*, PixelFormat, uint8_t*)>
-+#else
- template<void (*convertFunctor)(const uint8_t*, uint8_t*)>
-+#endif
- static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView& source, const PixelBufferConversionView& destination, const IntSize& destinationSize)
- {
-     const uint8_t* sourceRows = source.rows;
-@@ -228,7 +360,11 @@ static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView
-     size_t bytesPerRow = destinationSize.width() * 4;
-     for (int y = 0; y < destinationSize.height(); ++y) {
-         for (size_t x = 0; x < bytesPerRow; x += 4)
-+#if CPU(BIG_ENDIAN)
-+            convertFunctor(source.format.pixelFormat, &sourceRows[x], destination.format.pixelFormat, &destinationRows[x]);
-+#else
-             convertFunctor(&sourceRows[x], &destinationRows[x]);
-+#endif
-         sourceRows += source.bytesPerRow;
-         destinationRows += destination.bytesPerRow;
-     }
-diff --git a/Source/WebCore/platform/graphics/PixelFormat.h b/Source/WebCore/platform/graphics/PixelFormat.h
-index 1ca711b8..4a7168f8 100644
---- a/Source/WebCore/platform/graphics/PixelFormat.h
-+++ b/Source/WebCore/platform/graphics/PixelFormat.h
-@@ -33,6 +33,9 @@ namespace WebCore {
- enum class PixelFormat : uint8_t {
-     RGBA8,
-     BGRA8,
-+#if CPU(BIG_ENDIAN)
-+    ARGB8 = BGRA8, // BGRA will actually be ARGB on BIG_ENDIAN
-+#endif
-     RGB10,
-     RGB10A8,
- };
diff --git a/srcpkgs/webkit2gtk/patches/be-typedarray.patch b/srcpkgs/webkit2gtk/patches/be-typedarray.patch
deleted file mode 100644
index cbb706564fe9c..0000000000000
--- a/srcpkgs/webkit2gtk/patches/be-typedarray.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-Source: Jacek Piszczek <jacek.piszczek@runbox.com>
-
-https://tenfourfox.tenderapp.com/discussions/problems/7505-problems-uploading-to-facebook
-
-Updated by @q66.
-
-diff --git a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-index e76dada0..4de2e3ea 100644
---- a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-+++ b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h
-@@ -198,3 +198,9 @@
- #else
- #define OFFLINE_ASM_HAVE_FAST_TLS 0
- #endif
-+
-+#if CPU(BIG_ENDIAN)
-+#define OFFLINE_ASM_BIG_ENDIAN 1
-+#else
-+#define OFFLINE_ASM_BIG_ENDIAN 0
-+#endif
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-index 22716f81..4f9374ce 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
-@@ -1732,7 +1732,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
- 
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     loadi ArrayStorage::m_vector + TagOffset[t3, t1, 8], t2
-     loadi ArrayStorage::m_vector + PayloadOffset[t3, t1, 8], t1
-diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-index c453351d..e61529e5 100644
---- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
-@@ -1867,7 +1867,11 @@ llintOpWithMetadata(op_get_by_val, OpGetByVal, macro (size, get, dispatch, metad
-     
- .opGetByValNotDouble:
-     subi ArrayStorageShape, t2
--    bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    if BIG_ENDIAN
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValSlow
-+    else
-+        bia t2, SlowPutArrayStorageShape - ArrayStorageShape, .opGetByValNotIndexedStorage
-+    end
-     biaeq t1, -sizeof IndexingHeader + IndexingHeader::u.lengths.vectorLength[t3], .opGetByValSlow
-     get(m_dst, t0)
-     loadq ArrayStorage::m_vector[t3, t1, 8], t2
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-index 86f48a02..1541b3a8 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
-@@ -29,6 +29,7 @@
- #include "ThrowScope.h"
- #include "ToNativeFromValue.h"
- #include <wtf/CheckedArithmetic.h>
-+#include <wtf/FlipBytes.h>
- 
- namespace JSC {
- 
-@@ -147,7 +148,18 @@ public:
-     
-     JSValue getIndexQuickly(size_t i) const
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return Adaptor::toJSValue(nullptr, flipBytes(getIndexQuicklyAsNativeValue(i)));
-+        }
-+#else
-         return Adaptor::toJSValue(nullptr, getIndexQuicklyAsNativeValue(i));
-+#endif
-     }
-     
-     void setIndexQuicklyToNativeValue(size_t i, typename Adaptor::Type value)
-@@ -159,7 +171,20 @@ public:
-     void setIndexQuickly(size_t i, JSValue value)
-     {
-         ASSERT(!value.isObject());
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(toNativeFromValue<Adaptor>(value)));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value));
-+#endif
-     }
-     
-     bool setIndex(JSGlobalObject* globalObject, size_t i, JSValue jsValue)
-@@ -173,18 +198,55 @@ public:
-         if (isDetached() || i >= m_length)
-             return false;
- 
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            setIndexQuicklyToNativeValue(i, value);
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            setIndexQuicklyToNativeValue(i, flipBytes(value));
-+            break;
-+        }
-+#else
-         setIndexQuicklyToNativeValue(i, value);
-+#endif
-         return true;
-     }
- 
-     static ElementType toAdaptorNativeFromValue(JSGlobalObject* globalObject, JSValue jsValue)
-     {
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            return flipBytes(toNativeFromValue<Adaptor>(globalObject, jsValue));
-+        }
-+#else
-         return toNativeFromValue<Adaptor>(globalObject, jsValue);
-+#endif
-     }
- 
-     static std::optional<ElementType> toAdaptorNativeFromValueWithoutCoercion(JSValue jsValue)
-     {
--        return toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+        auto opt = toNativeFromValueWithoutCoercion<Adaptor>(jsValue);
-+#if CPU(BIG_ENDIAN)
-+        switch (Adaptor::typeValue) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            break;
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            if (!opt)
-+                break;
-+            return std::optional<ElementType>{flipBytes(*opt)};
-+        }
-+#endif
-+        return opt;
-     }
- 
-     void sort()
-diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-index df0435f6..3017563c 100644
---- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
-@@ -385,9 +385,36 @@ ALWAYS_INLINE EncodedJSValue genericType
- 
-     size_t searchLength = std::min<size_t>(length, updatedLength);
-     if constexpr (ViewClass::Adaptor::isFloat) {
--        if (std::isnan(static_cast<double>(*targetOption))) {
-+        double targetOptionLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+        switch (ViewClass::TypedArrayStorageType) {
-+        case TypeFloat32:
-+        case TypeFloat64:
-+            targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+        default:
-+            // typed array views are commonly expected to be little endian views of the underlying data
-+            targetOptionLittleEndianAsDouble = static_cast<double>(flipBytes(*targetOption));
-+        }
-+#else
-+        targetOptionLittleEndianAsDouble = static_cast<double>(*targetOption);
-+#endif
-+
-+        if (std::isnan(targetOptionLittleEndianAsDouble)) {
-             for (; index < searchLength; ++index) {
--                if (std::isnan(static_cast<double>(array[index])))
-+                double arrayElementLittleEndianAsDouble;
-+#if CPU(BIG_ENDIAN)
-+                switch (ViewClass::TypedArrayStorageType) {
-+                case TypeFloat32:
-+                case TypeFloat64:
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+                default:
-+                    // typed array views are commonly expected to be little endian views of the underlying data
-+                    arrayElementLittleEndianAsDouble = static_cast<double>(flipBytes(array[index]));
-+                }
-+#else
-+                arrayElementLittleEndianAsDouble = static_cast<double>(array[index]);
-+#endif
-+                if (std::isnan(arrayElementLittleEndianAsDouble))
-                     return JSValue::encode(jsBoolean(true));
-             }
-             return JSValue::encode(jsBoolean(false));
diff --git a/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
new file mode 100644
index 0000000000000..652c639ce38bf
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/disable-dmabuf-nvidia.patch
@@ -0,0 +1,63 @@
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+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 <WebCore/GLContext.h>
+ #include <WebCore/IntRect.h>
+ #include <WebCore/PlatformDisplay.h>
++#include <WebCore/PlatformDisplaySurfaceless.h>
+ #include <epoxy/egl.h>
+ #include <wtf/glib/GUniquePtr.h>
+ 
+ #if USE(GBM)
+ #include <WebCore/DMABufFormat.h>
++#include <WebCore/PlatformDisplayGBM.h>
+ #include <gbm.h>
+ 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<WebCore::PlatformDisplay> 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<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
++        return true;
++    return false;
++}
++
+ OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
+ {
+     static OptionSet<DMABufRendererBufferMode> mode;
+@@ -70,6 +95,9 @@ OptionSet<DMABufRendererBufferMode> 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
new file mode 100644
index 0000000000000..1b5ec0da142c0
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/fix-ftbfs-i386.patch
@@ -0,0 +1,16 @@
+From: Alberto Garcia <berto@igalia.com>
+Subject: Fix FTBFS in i386
+Bug: https://bugs.webkit.org/show_bug.cgi?id=268739
+Index: webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.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);
+ 
+     struct StackPointerScope {
+         StackPointerScope(CLoopStack& stack)
diff --git a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch b/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
deleted file mode 100644
index 3f599ea3c5698..0000000000000
--- a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/Source/JavaScriptCore/offlineasm/riscv64.rb b/Source/JavaScriptCore/offlineasm/riscv64.rb
-index 81f356d04ae1..4abb1761509d 100644
---- a/Source/JavaScriptCore/offlineasm/riscv64.rb
-+++ b/Source/JavaScriptCore/offlineasm/riscv64.rb
-@@ -1523,7 +1523,8 @@ def riscv64GenerateWASMPlaceholders(list)
-         if node.is_a? Instruction
-             case node.opcode
-             when "loadlinkacqb", "loadlinkacqh", "loadlinkacqi", "loadlinkacqq",
--                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq"
-+                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq",
-+                 "loadv", "storev"
-                 newList << Instruction.new(node.codeOrigin, "rv_ebreak", [], "WebAssembly placeholder for opcode #{node.opcode}")
-             else
-                 newList << node
-diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h
-index e30a3d8ce077..937fdd447f92 100644
---- a/Source/WTF/wtf/PlatformEnable.h
-+++ b/Source/WTF/wtf/PlatformEnable.h
-@@ -616,7 +616,7 @@
- #undef ENABLE_WEBASSEMBLY
- #define ENABLE_WEBASSEMBLY 1
- #undef ENABLE_WEBASSEMBLY_B3JIT
--#define ENABLE_WEBASSEMBLY_B3JIT 0
-+#define ENABLE_WEBASSEMBLY_B3JIT 1
- #undef ENABLE_WEBASSEMBLY_BBQJIT
- #define ENABLE_WEBASSEMBLY_BBQJIT 0
- #endif
-
diff --git a/srcpkgs/webkit2gtk/patches/initial-exec.patch b/srcpkgs/webkit2gtk/patches/initial-exec.patch
deleted file mode 100644
index 579084bd60650..0000000000000
--- a/srcpkgs/webkit2gtk/patches/initial-exec.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Source: https://bugs.webkit.org/show_bug.cgi?id=254286
-
-Usage initial-exec TLS is incompatible with dlopen() on musl.
-
-See also: https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39
- .../platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp   | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
---- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-+++ a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp	
-@@ -108,7 +108,11 @@ RefPtr<PixelBuffer> GraphicsContextGLANGLE::readCompositedResults()
- 
- bool GraphicsContextGLANGLE::makeContextCurrent()
- {
--    static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #ifdef __GLIBC__
-+        static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #else
-+        static thread_local GraphicsContextGLANGLE* s_currentContext { nullptr };
-+    #endif
- 
-     if (s_currentContext == this)
-         return true;
--- 
diff --git a/srcpkgs/webkit2gtk/patches/le-check.patch b/srcpkgs/webkit2gtk/patches/le-check.patch
deleted file mode 100644
index c5a873befd4bf..0000000000000
--- a/srcpkgs/webkit2gtk/patches/le-check.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ef8f9a0b61509401e64c717c7cc6f025f1b49300 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Mon, 4 Jan 2021 19:12:25 +0100
-Subject: [PATCH] portable little endian check
-
----
- Source/ThirdParty/xdgmime/src/xdgmimemagic.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git Source/ThirdParty/xdgmime/src/xdgmimemagic.c Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-index 3a62b9d..9bd4e1d 100644
---- a/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-+++ b/Source/ThirdParty/xdgmime/src/xdgmimemagic.c
-@@ -485,8 +485,7 @@ _xdg_mime_magic_parse_magic_line (FILE              *magic_file,
- 	      _xdg_mime_magic_matchlet_free (matchlet);
- 	      return XDG_MIME_MAGIC_ERROR;
- 	    }
--	  /* FIXME: need to get this defined in a <config.h> style file */
--#if LITTLE_ENDIAN
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- 	  for (i = 0; i < matchlet->value_length; i = i + matchlet->word_size)
- 	    {
- 	      if (matchlet->word_size == 2)
--- 
-2.30.0
-
diff --git a/srcpkgs/webkit2gtk/patches/prefer-pthread.patch b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
new file mode 100644
index 0000000000000..cb144f6dbb57f
--- /dev/null
+++ b/srcpkgs/webkit2gtk/patches/prefer-pthread.patch
@@ -0,0 +1,28 @@
+From: Alberto Garcia <berto@igalia.com>
+Description: Enable THREADS_PREFER_PTHREAD_FLAG
+ This fixes a FTBFS in riscv64
+Bug: https://bugs.webkit.org/show_bug.cgi?id=182622
+Bug-Debian: https://bugs.debian.org/895969
+Origin: https://trac.webkit.org/changeset/231843
+Index: webkitgtk/Source/cmake/OptionsGTK.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsGTK.cmake
++++ webkitgtk/Source/cmake/OptionsGTK.cmake
+@@ -13,6 +13,8 @@ endif ()
+ 
+ set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string")
+ 
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++
+ find_package(Cairo 1.16.0 REQUIRED)
+ find_package(Fontconfig 2.13.0 REQUIRED)
+ find_package(Freetype 2.9.0 REQUIRED)
+Index: webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/OptionsJSCOnly.cmake
++++ webkitgtk/Source/cmake/OptionsJSCOnly.cmake
+@@ -1,3 +1,4 @@
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+ 
+ if (MSVC)
diff --git a/srcpkgs/webkit2gtk/patches/reproducible.patch b/srcpkgs/webkit2gtk/patches/reproducible.patch
index 2f3a555cbcfd4..442b7d2a6aef4 100644
--- a/srcpkgs/webkit2gtk/patches/reproducible.patch
+++ b/srcpkgs/webkit2gtk/patches/reproducible.patch
@@ -5,7 +5,7 @@ Date:   Wed Jan 5 17:50:07 2022 +0100
     reproducible build
 
 diff --git a/Source/WebCore/bindings/scripts/CodeGenerator.pm b/Source/WebCore/bindings/scripts/CodeGenerator.pm
-index a604bfd3..c267b402 100644
+index 1e95784b..eb642a52 100644
 --- a/Source/WebCore/bindings/scripts/CodeGenerator.pm
 +++ b/Source/WebCore/bindings/scripts/CodeGenerator.pm
 @@ -324,7 +324,7 @@ sub MergeExtendedAttributesFromSupplemental
@@ -18,7 +18,7 @@ index a604bfd3..c267b402 100644
          for my $contextAllowed (@{$idlAttributes->{$extendedAttributeName}->{"contextsAllowed"}}) {
              if ($contextAllowed eq $context) {
 diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
-index be5a5d51..becb2b2f 100644
+index 275fce91..8c1534be 100644
 --- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
 +++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
 @@ -3217,7 +3217,7 @@ sub GenerateHeader
@@ -30,7 +30,7 @@ index be5a5d51..becb2b2f 100644
              push(@headerContent, " | " . $structureFlag);
          }
          push(@headerContent, ";\n");
-@@ -7433,7 +7433,7 @@ sub WriteData
+@@ -7515,7 +7515,7 @@ sub WriteData
  
      my @includes = ();
      my %implIncludeConditions = ();
@@ -39,7 +39,7 @@ index be5a5d51..becb2b2f 100644
          next if $headerIncludes{$include};
          next if $headerTrailingIncludes{$include};
  
-@@ -7473,7 +7473,7 @@ sub WriteData
+@@ -7555,7 +7555,7 @@ sub WriteData
      $contents = join "", @headerContentHeader;
  
      @includes = ();
@@ -48,7 +48,7 @@ index be5a5d51..becb2b2f 100644
          $include = "\"$include\"" unless $include =~ /^["<]/; # "
          $include = SubstituteHeader($include);
          push @includes, $include;
-@@ -7487,7 +7487,7 @@ sub WriteData
+@@ -7569,7 +7569,7 @@ sub WriteData
      $contents .= join "", @headerContent;
  
      @includes = ();
@@ -57,7 +57,7 @@ index be5a5d51..becb2b2f 100644
          $include = "\"$include\"" unless $include =~ /^["<]/; # "
          push @includes, $include;
      }
-@@ -7560,7 +7560,7 @@ sub GeneratePrototypeDeclaration
+@@ -7642,7 +7642,7 @@ sub GeneratePrototypeDeclaration
      if (%structureFlags) {
          push(@$outputArray, "public:\n");
          push(@$outputArray, "    static constexpr unsigned StructureFlags = Base::StructureFlags");
@@ -66,16 +66,3 @@ index be5a5d51..becb2b2f 100644
              push(@$outputArray, " | " . $structureFlag);
          }
          push(@$outputArray, ";\n");
-diff --git a/Source/cmake/tools/scripts/version-stamp.pl b/Source/cmake/tools/scripts/version-stamp.pl
-index 888a4502..57ab9b16 100644
---- a/Source/cmake/tools/scripts/version-stamp.pl
-+++ b/Source/cmake/tools/scripts/version-stamp.pl
-@@ -75,7 +75,7 @@ my $VERSION_FILE = File::Spec->catfile(File::Spec->canonpath($intdir), 'include'
- 
- open(VERSION_INFO, '<', $VERSION_FILE) or die "Unable to open $VERSION_FILE: $!\n";
- while (my $line = <VERSION_INFO>) {
--    foreach my $componentKey (keys %components) {
-+    foreach my $componentKey (sort keys %components) {
-         if ($line !~ m/$componentKey/) {
-             next;
-         }
diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template
index 9f67996e209e5..5fc8c66d7a278 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,10 +1,10 @@
 # Template file for 'webkit2gtk'
 pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.5
+revision=1
 build_style=cmake
 build_helper="gir"
-configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
+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_MINIBROWSER=$(vopt_if minibrowser ON OFF)
@@ -15,7 +15,8 @@ configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
  -DENABLE_WAYLAND_TARGET=$(vopt_if wayland ON OFF)
  -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)"
+ -DENABLE_BUBBLEWRAP_SANDBOX=$(vopt_if bubblewrap ON OFF)
+ -DUSE_JPEGXL=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
@@ -36,7 +37,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-or-later, BSD-2-Clause"
 homepage="https://webkitgtk.org/"
 distfiles="https://webkitgtk.org/releases/webkitgtk-${version}.tar.xz"
-checksum=a4607ea1bf89669e89b1cb2c63faaec513f93de09b6ae60cc71d6a8aab7ab393
+checksum=b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749
 make_check=no # TODO
 
 replaces="webkit2gtk-common>0"
@@ -69,6 +70,8 @@ if [ "$build_option_bubblewrap" ]; then
 	hostmakedepends+=" bubblewrap xdg-dbus-proxy"
 	makedepends+=" libseccomp-devel"
 	depends+=" bubblewrap xdg-dbus-proxy"
+	configure_args+=" -DBWRAP_EXECUTABLE=/usr/bin/bwrap
+	 -DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy"
 fi
 
 if [ "$build_option_lto" -a -z "$build_option_clang" ]; then
@@ -122,6 +125,8 @@ if [ "$build_option_sampling_profiler" -a -z "$build_option_jit" ]; then
 	broken="sampling_profiler requires JIT"
 fi
 
+_depends="${depends}"
+
 pre_configure() {
 	if [ "$build_option_clang" ]; then
 		export CC=clang
@@ -147,7 +152,7 @@ pre_configure() {
 }
 
 post_configure() {
-	mkdir -p webkit2gtk-40 webkit2gtk-50
+	mkdir -p webkit2gtk-40 webkit2gtk-60
 	(
 		cd webkit2gtk-40
 		configure_args="${configure_args} -DUSE_SOUP2=ON -DENABLE_WEBDRIVER=OFF" \
@@ -155,7 +160,7 @@ post_configure() {
 	)
 
 	(
-		cd webkit2gtk-50
+		cd webkit2gtk-60
 		configure_args="${configure_args} -DUSE_GTK4=ON -DENABLE_WEBDRIVER=OFF" \
 		do_configure
 	)
@@ -163,12 +168,12 @@ post_configure() {
 
 post_build() {
 	(cd webkit2gtk-40 && NINJA_STATUS="[2/3][%f/%t] " do_build)
-	(cd webkit2gtk-50 && NINJA_STATUS="[3/3][%f/%t] " do_build)
+	(cd webkit2gtk-60 && NINJA_STATUS="[3/3][%f/%t] " do_build)
 }
 
 post_install() {
 	(cd webkit2gtk-40 && do_install)
-	(cd webkit2gtk-50 && do_install)
+	(cd webkit2gtk-60 && do_install)
 
 	vlicense Source/WebCore/LICENSE-APPLE
 	vlicense Source/WebCore/LICENSE-LGPL-2.1
@@ -192,7 +197,7 @@ webkit2gtk-devel_package() {
 }
 
 libwebkit2gtk41_package() {
-	depends="${depends}"
+	depends="${_depends}"
 	short_desc="GTK+3 port of the WebKit browser engine (soup3)"
 	pkg_install() {
 		vmove usr/bin/WebKitWebDriver
@@ -228,7 +233,7 @@ libwebkit2gtk41-devel_package() {
 }
 
 libwebkitgtk60_package() {
-	depends="${depends}"
+	depends="${_depends}"
 	short_desc="GTK4 port of the WebKit browser engine"
 	pkg_install() {
 		vmove usr/libexec/webkitgtk-6.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (11 preceding siblings ...)
  2024-02-20  6:55 ` [PR PATCH] [Updated] " chrysos349
@ 2024-02-20  6:55 ` chrysos349
  2024-02-21  3:45 ` oreo639
  2024-02-22 19:37 ` [PR PATCH] [Merged]: " oreo639
  14 siblings, 0 replies; 16+ messages in thread
From: chrysos349 @ 2024-02-20  6:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953589351

Comment:
Might as well remove the patch. I didn't have any problems without it.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (12 preceding siblings ...)
  2024-02-20  6:55 ` chrysos349
@ 2024-02-21  3:45 ` oreo639
  2024-02-22 19:37 ` [PR PATCH] [Merged]: " oreo639
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-21  3:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48839#issuecomment-1953546522

Comment:
> I thought it wouldn't hurt, and others might need it.

Imo, it can be added to LDFLAGS if it is needed rather than needing a patch. (we already add `--no-keep-memory` for 32-bit)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Merged]: webkit2gtk: update to 2.42.5
  2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
                   ` (13 preceding siblings ...)
  2024-02-21  3:45 ` oreo639
@ 2024-02-22 19:37 ` oreo639
  14 siblings, 0 replies; 16+ messages in thread
From: oreo639 @ 2024-02-22 19:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

There's a merged pull request on the void-packages repository

webkit2gtk: update to 2.42.5
https://github.com/void-linux/void-packages/pull/48839

Description:
[ci skip]

**NOTES**
- `2.42.5` (and `2.42.4` before `.5` was released) was tested as a part of `gnome-45.*`
- Required for `gnome-45.*` (#48762)
- (Cross)-built for all archs that are checked in ci

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - aarch64 x
  - armv7l x
  - armv6l-musl x
  - x86_64-musl
  - i686


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-02-22 19:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 21:58 [PR PATCH] webkit2gtk: update to 2.42.5 chrysos349
2024-02-19 22:43 ` [PR REVIEW] " oreo639
2024-02-19 22:43 ` oreo639
2024-02-19 22:44 ` oreo639
2024-02-19 22:47 ` oreo639
2024-02-19 23:15 ` [PR PATCH] [Updated] " chrysos349
2024-02-19 23:26 ` chrysos349
2024-02-20  2:50 ` oreo639
2024-02-20  2:50 ` oreo639
2024-02-20  5:45 ` chrysos349
2024-02-20  6:08 ` oreo639
2024-02-20  6:10 ` oreo639
2024-02-20  6:55 ` [PR PATCH] [Updated] " chrysos349
2024-02-20  6:55 ` chrysos349
2024-02-21  3:45 ` oreo639
2024-02-22 19:37 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).