* [PR PATCH] webkit2gtk: update to 2.42.2.
@ 2023-12-05 16:22 mhmdanas
2023-12-05 16:40 ` [PR PATCH] [Updated] " mhmdanas
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: mhmdanas @ 2023-12-05 16:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]
There is a new pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages webkit2gtk-2.42.2
https://github.com/void-linux/void-packages/pull/47600
webkit2gtk: update to 2.42.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** (tested epiphany, vimb, and geary)
Draft pending further building testing (only built on native x86_64-glibc at the moment).
A couple changes were also included from https://github.com/void-linux/void-packages/pull/46531.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/47600.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-2.42.2-47600.patch --]
[-- Type: text/x-diff, Size: 30888 bytes --]
From 25094628201dca8f4a7f23275f0837512bda333f Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 5 Dec 2023 16:19:20 +0000
Subject: [PATCH] webkit2gtk: update to 2.42.2.
---
.../patches/be-imagebufferbackend.patch | 241 ------------------
.../webkit2gtk/patches/be-typedarray.patch | 206 ---------------
.../patches/fix-riscv64-build.patch | 28 --
srcpkgs/webkit2gtk/patches/initial-exec.patch | 23 --
srcpkgs/webkit2gtk/patches/reproducible.patch | 81 ------
srcpkgs/webkit2gtk/template | 21 +-
6 files changed, 12 insertions(+), 588 deletions(-)
delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.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/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/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/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..cd371666d91d3 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,7 +1,7 @@
# Template file for 'webkit2gtk'
pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.2
+revision=1
build_style=cmake
build_helper="gir"
configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
@@ -28,15 +28,15 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
woff2-devel freetype-devel libopenjpeg2-devel libavif-devel
qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel
- libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel)
+ libgcrypt-devel libnuspell-devel libpsl-devel libjxl-devel $(vopt_if x11 libXt-devel)
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
-depends="gst-plugins-good1"
+depends="gst-plugins-good1 gst-plugins-bad1"
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=5720aa3e8627f1b9f63252187d4df0f8233ae71d697b1796ebfbe5ca750bd118
make_check=no # TODO
replaces="webkit2gtk-common>0"
@@ -52,8 +52,8 @@ desc_option_minibrowser="Build the minibrowser"
desc_option_clang="Use Clang to build"
desc_option_lto="Enable ThinLTO (needs Clang)"
-export CFLAGS="-DNDEBUG"
-export CXXFLAGS="$CFLAGS"
+CFLAGS="-DNDEBUG"
+CXXFLAGS="$CFLAGS"
# WebKitCCache.cmake set this variable
# include_file_mtime was not enabled to avoid a race,
@@ -69,6 +69,7 @@ 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 +123,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
@@ -192,7 +195,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 +231,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] 7+ messages in thread
* Re: [PR PATCH] [Updated] webkit2gtk: update to 2.42.2.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
@ 2023-12-05 16:40 ` mhmdanas
2023-12-11 15:11 ` mhmdanas
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mhmdanas @ 2023-12-05 16:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
There is an updated pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages webkit2gtk-2.42.2
https://github.com/void-linux/void-packages/pull/47600
webkit2gtk: update to 2.42.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** (tested epiphany, vimb, and geary)
Draft pending further building testing (only built on native x86_64-glibc at the moment).
A couple changes were also included from https://github.com/void-linux/void-packages/pull/46531.
[ci skip]
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/47600.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-2.42.2-47600.patch --]
[-- Type: text/x-diff, Size: 30888 bytes --]
From d81a83b8047f00bc7adc760b86b0be8eaa61a274 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 5 Dec 2023 16:19:20 +0000
Subject: [PATCH] webkit2gtk: update to 2.42.2.
---
.../patches/be-imagebufferbackend.patch | 241 ------------------
.../webkit2gtk/patches/be-typedarray.patch | 206 ---------------
.../patches/fix-riscv64-build.patch | 28 --
srcpkgs/webkit2gtk/patches/initial-exec.patch | 23 --
srcpkgs/webkit2gtk/patches/reproducible.patch | 81 ------
srcpkgs/webkit2gtk/template | 21 +-
6 files changed, 12 insertions(+), 588 deletions(-)
delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.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/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/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/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..cd371666d91d3 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,7 +1,7 @@
# Template file for 'webkit2gtk'
pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.2
+revision=1
build_style=cmake
build_helper="gir"
configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
@@ -28,15 +28,15 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
woff2-devel freetype-devel libopenjpeg2-devel libavif-devel
qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel
- libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel)
+ libgcrypt-devel libnuspell-devel libpsl-devel libjxl-devel $(vopt_if x11 libXt-devel)
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
-depends="gst-plugins-good1"
+depends="gst-plugins-good1 gst-plugins-bad1"
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=5720aa3e8627f1b9f63252187d4df0f8233ae71d697b1796ebfbe5ca750bd118
make_check=no # TODO
replaces="webkit2gtk-common>0"
@@ -52,8 +52,8 @@ desc_option_minibrowser="Build the minibrowser"
desc_option_clang="Use Clang to build"
desc_option_lto="Enable ThinLTO (needs Clang)"
-export CFLAGS="-DNDEBUG"
-export CXXFLAGS="$CFLAGS"
+CFLAGS="-DNDEBUG"
+CXXFLAGS="$CFLAGS"
# WebKitCCache.cmake set this variable
# include_file_mtime was not enabled to avoid a race,
@@ -69,6 +69,7 @@ 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 +123,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
@@ -192,7 +195,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 +231,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] 7+ messages in thread
* Re: [PR PATCH] [Updated] webkit2gtk: update to 2.42.2.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
2023-12-05 16:40 ` [PR PATCH] [Updated] " mhmdanas
@ 2023-12-11 15:11 ` mhmdanas
2023-12-11 20:58 ` webkit2gtk: update to 2.42.3 Calandracas606
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mhmdanas @ 2023-12-11 15:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]
There is an updated pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages webkit2gtk-2.42.2
https://github.com/void-linux/void-packages/pull/47600
webkit2gtk: update to 2.42.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** (tested epiphany, vimb, and geary)
Draft pending further building testing (only built on native x86_64-glibc at the moment).
A couple changes were also included from https://github.com/void-linux/void-packages/pull/46531.
[ci skip]
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/47600.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-webkit2gtk-2.42.2-47600.patch --]
[-- Type: text/x-diff, Size: 30888 bytes --]
From beba9412cb0243b18bf364293b2ad209293893c0 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 5 Dec 2023 16:19:20 +0000
Subject: [PATCH] webkit2gtk: update to 2.42.3.
---
.../patches/be-imagebufferbackend.patch | 241 ------------------
.../webkit2gtk/patches/be-typedarray.patch | 206 ---------------
.../patches/fix-riscv64-build.patch | 28 --
srcpkgs/webkit2gtk/patches/initial-exec.patch | 23 --
srcpkgs/webkit2gtk/patches/reproducible.patch | 81 ------
srcpkgs/webkit2gtk/template | 21 +-
6 files changed, 12 insertions(+), 588 deletions(-)
delete mode 100644 srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch
delete mode 100644 srcpkgs/webkit2gtk/patches/be-typedarray.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/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/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/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..8c5c31760f679 100644
--- a/srcpkgs/webkit2gtk/template
+++ b/srcpkgs/webkit2gtk/template
@@ -1,7 +1,7 @@
# Template file for 'webkit2gtk'
pkgname=webkit2gtk
-version=2.40.0
-revision=4
+version=2.42.3
+revision=1
build_style=cmake
build_helper="gir"
configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
@@ -28,15 +28,15 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
woff2-devel freetype-devel libopenjpeg2-devel libavif-devel
qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel
- libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel)
+ libgcrypt-devel libnuspell-devel libpsl-devel libjxl-devel $(vopt_if x11 libXt-devel)
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
-depends="gst-plugins-good1"
+depends="gst-plugins-good1 gst-plugins-bad1"
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=0a1a4630045628b3a6fe95da72dc47852cff20d66be1ac6fd0d669c88c13d8e2
make_check=no # TODO
replaces="webkit2gtk-common>0"
@@ -52,8 +52,8 @@ desc_option_minibrowser="Build the minibrowser"
desc_option_clang="Use Clang to build"
desc_option_lto="Enable ThinLTO (needs Clang)"
-export CFLAGS="-DNDEBUG"
-export CXXFLAGS="$CFLAGS"
+CFLAGS="-DNDEBUG"
+CXXFLAGS="$CFLAGS"
# WebKitCCache.cmake set this variable
# include_file_mtime was not enabled to avoid a race,
@@ -69,6 +69,7 @@ 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 +123,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
@@ -192,7 +195,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 +231,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] 7+ messages in thread
* Re: webkit2gtk: update to 2.42.3.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
2023-12-05 16:40 ` [PR PATCH] [Updated] " mhmdanas
2023-12-11 15:11 ` mhmdanas
@ 2023-12-11 20:58 ` Calandracas606
2024-02-04 18:23 ` balejk
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Calandracas606 @ 2023-12-11 20:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
New comment by Calandracas606 on void-packages repository
https://github.com/void-linux/void-packages/pull/47600#issuecomment-1850877013
Comment:
Successfully built for:
- aarch64-musl
- aarch64-glibc
- armv6l-glibc
- armv7l-glibc
- i686
- x86_64-musl
Builds for armv6l-musl and armv7l-musl were not possible due to the qt dependencies failing to build
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: webkit2gtk: update to 2.42.3.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
` (2 preceding siblings ...)
2023-12-11 20:58 ` webkit2gtk: update to 2.42.3 Calandracas606
@ 2024-02-04 18:23 ` balejk
2024-02-05 12:11 ` [PR PATCH] [Closed]: " mhmdanas
2024-02-05 12:11 ` mhmdanas
5 siblings, 0 replies; 7+ messages in thread
From: balejk @ 2024-02-04 18:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
New comment by balejk on void-packages repository
https://github.com/void-linux/void-packages/pull/47600#issuecomment-1925872689
Comment:
[2.43.4 is available](https://webkitgtk.org/2024/02/02/webkitgtk2.43.4-released.html)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Closed]: webkit2gtk: update to 2.42.3.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
` (3 preceding siblings ...)
2024-02-04 18:23 ` balejk
@ 2024-02-05 12:11 ` mhmdanas
2024-02-05 12:11 ` mhmdanas
5 siblings, 0 replies; 7+ messages in thread
From: mhmdanas @ 2024-02-05 12:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
There's a closed pull request on the void-packages repository
webkit2gtk: update to 2.42.3.
https://github.com/void-linux/void-packages/pull/47600
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** (tested epiphany, vimb, and geary)
A couple changes were also included from https://github.com/void-linux/void-packages/pull/46531.
[ci skip]
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: webkit2gtk: update to 2.42.3.
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
` (4 preceding siblings ...)
2024-02-05 12:11 ` [PR PATCH] [Closed]: " mhmdanas
@ 2024-02-05 12:11 ` mhmdanas
5 siblings, 0 replies; 7+ messages in thread
From: mhmdanas @ 2024-02-05 12:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
New comment by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/pull/47600#issuecomment-1926853346
Comment:
I don't use Void anymore, if anybody wants to create a new PR based on this one please feel free to.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-02-05 12:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 16:22 [PR PATCH] webkit2gtk: update to 2.42.2 mhmdanas
2023-12-05 16:40 ` [PR PATCH] [Updated] " mhmdanas
2023-12-11 15:11 ` mhmdanas
2023-12-11 20:58 ` webkit2gtk: update to 2.42.3 Calandracas606
2024-02-04 18:23 ` balejk
2024-02-05 12:11 ` [PR PATCH] [Closed]: " mhmdanas
2024-02-05 12:11 ` mhmdanas
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).