From d81a83b8047f00bc7adc760b86b0be8eaa61a274 Mon Sep 17 00:00:00 2001 From: Mohammed Anas 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 fd90cdb99ba3d0..00000000000000 --- a/srcpkgs/webkit2gtk/patches/be-imagebufferbackend.patch +++ /dev/null @@ -1,241 +0,0 @@ -Original source: Jacek Piszczek - -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 -+#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(destinationPixel)[0] = 0; - return; -@@ -151,23 +158,81 @@ static void convertSinglePixelPremultipliedToPremultiplied(const uint8_t* source - if constexpr (pixelFormatConversion == PixelFormatConversion::None) - reinterpret_cast(destinationPixel)[0] = reinterpret_cast(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 -+#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(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel); -+#else - convertSinglePixelPremultipliedToPremultiplied(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 -+#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(sourcePixelFormat, sourcePixel, destinationPixelFormat, destinationPixel); -+#else - convertSinglePixelPremultipliedToPremultiplied(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 -+#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(destinationPixel)[0] = reinterpret_cast(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 -+#else - template -+#endif - static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView& source, const PixelBufferConversionView& destination, const IntSize& destinationSize) - { - const uint8_t* sourceRows = source.rows; -@@ -228,7 +360,11 @@ static void convertImagePixelsUnaccelerated(const ConstPixelBufferConversionView - size_t bytesPerRow = destinationSize.width() * 4; - for (int y = 0; y < destinationSize.height(); ++y) { - for (size_t x = 0; x < bytesPerRow; x += 4) -+#if CPU(BIG_ENDIAN) -+ convertFunctor(source.format.pixelFormat, &sourceRows[x], destination.format.pixelFormat, &destinationRows[x]); -+#else - convertFunctor(&sourceRows[x], &destinationRows[x]); -+#endif - sourceRows += source.bytesPerRow; - destinationRows += destination.bytesPerRow; - } -diff --git a/Source/WebCore/platform/graphics/PixelFormat.h b/Source/WebCore/platform/graphics/PixelFormat.h -index 1ca711b8..4a7168f8 100644 ---- a/Source/WebCore/platform/graphics/PixelFormat.h -+++ b/Source/WebCore/platform/graphics/PixelFormat.h -@@ -33,6 +33,9 @@ namespace WebCore { - enum class PixelFormat : uint8_t { - RGBA8, - BGRA8, -+#if CPU(BIG_ENDIAN) -+ ARGB8 = BGRA8, // BGRA will actually be ARGB on BIG_ENDIAN -+#endif - RGB10, - RGB10A8, - }; diff --git a/srcpkgs/webkit2gtk/patches/be-typedarray.patch b/srcpkgs/webkit2gtk/patches/be-typedarray.patch deleted file mode 100644 index cbb706564fe9ce..00000000000000 --- a/srcpkgs/webkit2gtk/patches/be-typedarray.patch +++ /dev/null @@ -1,206 +0,0 @@ -Source: Jacek Piszczek - -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 -+#include - - 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(value)); -+ break; -+ default: -+ // typed array views are commonly expected to be little endian views of the underlying data -+ setIndexQuicklyToNativeValue(i, flipBytes(toNativeFromValue(value))); -+ break; -+ } -+#else - setIndexQuicklyToNativeValue(i, toNativeFromValue(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(globalObject, jsValue); -+ default: -+ // typed array views are commonly expected to be little endian views of the underlying data -+ return flipBytes(toNativeFromValue(globalObject, jsValue)); -+ } -+#else - return toNativeFromValue(globalObject, jsValue); -+#endif - } - - static std::optional toAdaptorNativeFromValueWithoutCoercion(JSValue jsValue) - { -- return toNativeFromValueWithoutCoercion(jsValue); -+ auto opt = toNativeFromValueWithoutCoercion(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{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(length, updatedLength); - if constexpr (ViewClass::Adaptor::isFloat) { -- if (std::isnan(static_cast(*targetOption))) { -+ double targetOptionLittleEndianAsDouble; -+#if CPU(BIG_ENDIAN) -+ switch (ViewClass::TypedArrayStorageType) { -+ case TypeFloat32: -+ case TypeFloat64: -+ targetOptionLittleEndianAsDouble = static_cast(*targetOption); -+ default: -+ // typed array views are commonly expected to be little endian views of the underlying data -+ targetOptionLittleEndianAsDouble = static_cast(flipBytes(*targetOption)); -+ } -+#else -+ targetOptionLittleEndianAsDouble = static_cast(*targetOption); -+#endif -+ -+ if (std::isnan(targetOptionLittleEndianAsDouble)) { - for (; index < searchLength; ++index) { -- if (std::isnan(static_cast(array[index]))) -+ double arrayElementLittleEndianAsDouble; -+#if CPU(BIG_ENDIAN) -+ switch (ViewClass::TypedArrayStorageType) { -+ case TypeFloat32: -+ case TypeFloat64: -+ arrayElementLittleEndianAsDouble = static_cast(array[index]); -+ default: -+ // typed array views are commonly expected to be little endian views of the underlying data -+ arrayElementLittleEndianAsDouble = static_cast(flipBytes(array[index])); -+ } -+#else -+ arrayElementLittleEndianAsDouble = static_cast(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 3f599ea3c5698f..00000000000000 --- a/srcpkgs/webkit2gtk/patches/fix-riscv64-build.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/Source/JavaScriptCore/offlineasm/riscv64.rb b/Source/JavaScriptCore/offlineasm/riscv64.rb -index 81f356d04ae1..4abb1761509d 100644 ---- a/Source/JavaScriptCore/offlineasm/riscv64.rb -+++ b/Source/JavaScriptCore/offlineasm/riscv64.rb -@@ -1523,7 +1523,8 @@ def riscv64GenerateWASMPlaceholders(list) - if node.is_a? Instruction - case node.opcode - when "loadlinkacqb", "loadlinkacqh", "loadlinkacqi", "loadlinkacqq", -- "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq" -+ "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq", -+ "loadv", "storev" - newList << Instruction.new(node.codeOrigin, "rv_ebreak", [], "WebAssembly placeholder for opcode #{node.opcode}") - else - newList << node -diff --git a/Source/WTF/wtf/PlatformEnable.h b/Source/WTF/wtf/PlatformEnable.h -index e30a3d8ce077..937fdd447f92 100644 ---- a/Source/WTF/wtf/PlatformEnable.h -+++ b/Source/WTF/wtf/PlatformEnable.h -@@ -616,7 +616,7 @@ - #undef ENABLE_WEBASSEMBLY - #define ENABLE_WEBASSEMBLY 1 - #undef ENABLE_WEBASSEMBLY_B3JIT --#define ENABLE_WEBASSEMBLY_B3JIT 0 -+#define ENABLE_WEBASSEMBLY_B3JIT 1 - #undef ENABLE_WEBASSEMBLY_BBQJIT - #define ENABLE_WEBASSEMBLY_BBQJIT 0 - #endif - diff --git a/srcpkgs/webkit2gtk/patches/initial-exec.patch b/srcpkgs/webkit2gtk/patches/initial-exec.patch deleted file mode 100644 index 579084bd606502..00000000000000 --- a/srcpkgs/webkit2gtk/patches/initial-exec.patch +++ /dev/null @@ -1,23 +0,0 @@ -Source: https://bugs.webkit.org/show_bug.cgi?id=254286 - -Usage initial-exec TLS is incompatible with dlopen() on musl. - -See also: https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39 - .../platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) ---- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp -+++ a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp -@@ -108,7 +108,11 @@ RefPtr 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 2f3a555cbcfd4b..00000000000000 --- a/srcpkgs/webkit2gtk/patches/reproducible.patch +++ /dev/null @@ -1,81 +0,0 @@ -commit 7366988f033d29f2b2e2e68fedb8827ba09a2cc1 -Author: Daniel Kolesa -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 = ) { -- foreach my $componentKey (keys %components) { -+ foreach my $componentKey (sort keys %components) { - if ($line !~ m/$componentKey/) { - next; - } diff --git a/srcpkgs/webkit2gtk/template b/srcpkgs/webkit2gtk/template index 9f67996e209e51..cd371666d91d31 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 " 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