From 30de5c87936b85920e92279e948a7d71973abf41 Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@yoctoproject.org>
Date: Tue, 15 Apr 2025 12:13:23 +0000
Subject: [PATCH] webkitgtk: upgrade 2.48.0 -> 2.48.1

---
 ...able-to-control-macro-__PAS_ALWAYS_I.patch |  8 +-
 ...04-main-7ffc29624258-.-https-bugs.we.patch | 75 ------------------
 ...or-no-matching-function-for-call-to-.patch | 77 -------------------
 ...spection.cmake-prefix-variables-obta.patch |  2 +-
 ...-on-RISCV-https-bugs.webkit.org-show.patch |  4 +-
 .../webkit/webkitgtk/no-musttail-arm.patch    |  4 +-
 .../webkit/webkitgtk/reproducibility.patch    |  2 +-
 .../webkit/webkitgtk/sys_futex.patch          | 11 ++-
 .../webkit/webkitgtk/t6-not-declared.patch    |  6 +-
 ...ebkitgtk_2.48.0.bb => webkitgtk_2.48.1.bb} |  4 +-
 10 files changed, 24 insertions(+), 169 deletions(-)
 delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch
 delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch
 rename meta/recipes-sato/webkit/{webkitgtk_2.48.0.bb => webkitgtk_2.48.1.bb} (96%)

diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch
index 8376ee8472..df3c438671 100644
--- a/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch
@@ -1,4 +1,4 @@
-From bbf661310448d430350eb2ad8c5869ace648dcf8 Mon Sep 17 00:00:00 2001
+From 41d91680f062fc975baf9c319f1a207ec445e800 Mon Sep 17 00:00:00 2001
 From: Kai Kang <kai.kang@windriver.com>
 Date: Fri, 11 Aug 2023 14:20:48 +0800
 Subject: [PATCH] Add a variable to control macro
@@ -44,7 +44,7 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
  2 files changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
-index 5d5fb38c..a554f700 100644
+index 245e2eef..64955fad 100644
 --- a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
 +++ b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
 @@ -44,7 +44,7 @@ __PAS_BEGIN_EXTERN_C;
@@ -57,10 +57,10 @@ index 5d5fb38c..a554f700 100644
  #else
  #define __PAS_ALWAYS_INLINE_BUT_NOT_INLINE
 diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
-index f5ec0a55..dfd741e7 100644
+index de1cb6c4..b6ff0b78 100644
 --- a/Source/cmake/WebKitCompilerFlags.cmake
 +++ b/Source/cmake/WebKitCompilerFlags.cmake
-@@ -492,3 +492,10 @@ endif ()
+@@ -503,3 +503,10 @@ endif ()
  
  # FIXME: Enable pre-compiled headers for all ports <https://webkit.org/b/139438>
  set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch
deleted file mode 100644
index 5cbb1035b2..0000000000
--- a/meta/recipes-sato/webkit/webkitgtk/0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 83093455d02d73a327cea502d974aac82b59ad17 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <aperez@igalia.com>
-Date: Tue, 18 Mar 2025 07:39:01 -0700
-Subject: [PATCH] Cherry-pick 292304@main (7ffc29624258).
- https://bugs.webkit.org/show_bug.cgi?id=289953
-
-    [GTK][WPE] Use _LIBCPP_HARDENING_MODE with newer libc++ versions
-    https://bugs.webkit.org/show_bug.cgi?id=289953
-
-    Reviewed by Alicia Boya Garcia.
-
-    * Source/cmake/OptionsCommon.cmake: Add a new check for the libc++
-      version, if it is 19 or newer, use the new _LIBCPP_HARDENING_MODE
-      macro, otherwise for older versions keep _LIBCPP_ENABLE_ASSERTIONS.
-
-    Canonical link: https://commits.webkit.org/292304@main
-
-Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/2c105443d41e5ce3de3a4cac2ed8a07ebd134459]
-
-Canonical link: https://commits.webkit.org/290945.71@webkitglib/2.48
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Source/cmake/OptionsCommon.cmake | 24 +++++++++++++++++++-----
- 1 file changed, 19 insertions(+), 5 deletions(-)
-
-diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake
-index f6cf5ee..3178674 100644
---- a/Source/cmake/OptionsCommon.cmake
-+++ b/Source/cmake/OptionsCommon.cmake
-@@ -229,8 +229,22 @@ set(CXX_STDLIB_TEST_SOURCE "
- ")
- check_cxx_source_compiles("${CXX_STDLIB_TEST_SOURCE}" CXX_STDLIB_IS_LIBCPP)
- if (CXX_STDLIB_IS_LIBCPP)
--    set(CXX_STDLIB_VARIANT "LIBCPP")
--    set(CXX_STDLIB_ASSERTIONS_MACRO _LIBCPP_ENABLE_ASSERTIONS)
-+    set(CXX_STDLIB_TEST_SOURCE "
-+        #include <utility>
-+        #if _LIBCPP_VERSION >= 190000
-+        int main() { }
-+        #else
-+        #error libc++ is older than 19.x
-+        #endif
-+    ")
-+    check_cxx_source_compiles("${CXX_STDLIB_TEST_SOURCE}" CXX_STDLIB_IS_LIBCPP_19_OR_NEWER)
-+    if (CXX_STDLIB_IS_LIBCPP_19_OR_NEWER)
-+        set(CXX_STDLIB_VARIANT "LIBCPP 19+")
-+        set(CXX_STDLIB_ASSERTIONS_MACRO _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE)
-+    else ()
-+        set(CXX_STDLIB_VARIANT "LIBCPP <19")
-+        set(CXX_STDLIB_ASSERTIONS_MACRO _LIBCPP_ENABLE_ASSERTIONS=1)
-+    endif ()
- else ()
-     set(CXX_STDLIB_TEST_SOURCE "
-     #include <utility>
-@@ -239,7 +253,7 @@ else ()
-     check_cxx_source_compiles("${CXX_STDLIB_TEST_SOURCE}" CXX_STDLIB_IS_GLIBCXX)
-     if (CXX_STDLIB_IS_GLIBCXX)
-         set(CXX_STDLIB_VARIANT "GLIBCXX")
--        set(CXX_STDLIB_ASSERTIONS_MACRO _GLIBCXX_ASSERTIONS)
-+        set(CXX_STDLIB_ASSERTIONS_MACRO _GLIBCXX_ASSERTIONS=1)
-     endif ()
- endif ()
- message(STATUS "C++ standard library in use: ${CXX_STDLIB_VARIANT}")
-@@ -255,8 +269,8 @@ option(USE_CXX_STDLIB_ASSERTIONS
- 
- if (USE_CXX_STDLIB_ASSERTIONS)
-     if (CXX_STDLIB_ASSERTIONS_MACRO)
--        message(STATUS "  Assertions enabled, ${CXX_STDLIB_ASSERTIONS_MACRO}=1")
--        add_compile_definitions("${CXX_STDLIB_ASSERTIONS_MACRO}=1")
-+        message(STATUS "  Assertions enabled, ${CXX_STDLIB_ASSERTIONS_MACRO}")
-+        add_compile_definitions("${CXX_STDLIB_ASSERTIONS_MACRO}")
-     else ()
-         message(STATUS "  Assertions disabled, CXX_STDLIB_ASSERTIONS_MACRO undefined")
-     endif ()
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch b/meta/recipes-sato/webkit/webkitgtk/0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch
deleted file mode 100644
index 5b83d9e7eb..0000000000
--- a/meta/recipes-sato/webkit/webkitgtk/0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 7d159a631ae55c10a0b7a92cf031200a11629736 Mon Sep 17 00:00:00 2001
-From: Fujii Hironori <Hironori.Fujii@sony.com>
-Date: Tue, 18 Mar 2025 10:25:47 +0900
-Subject: [PATCH] EnumTraits.h: error: no matching function for call to
- 'enumName' with Clang 20 https://bugs.webkit.org/show_bug.cgi?id=289669
-
-Reviewed by NOBODY (OOPS!).
-
-Clang 20 couldn't compile EnumTraits.h.
-
-> wtf/EnumTraits.h:212:33: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'V'
-
-An invalid enum value can't be specifed to the template parameter `V`.
-
-> template<auto V> constexpr std::span<const char> enumName()
-
-The upstream Magic Enum C++ has a template variable `is_enum_constexpr_static_cast_valid<E, V>` to check a enum value is valid.
-<https://github.com/Neargye/magic_enum/blob/a413fcc9c46a020a746907136a384c227f3cd095/include/magic_enum/magic_enum.hpp#L624-L634>
-
-Imported the template variable.
-
-* Source/WTF/wtf/EnumTraits.h:
-(WTF::enumName):
-(WTF::makeEnumNames):
-
-Upstream-Status: Submitted [https://github.com/WebKit/WebKit/pull/42597]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Source/WTF/wtf/EnumTraits.h | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/Source/WTF/wtf/EnumTraits.h b/Source/WTF/wtf/EnumTraits.h
-index 0d33e39a..95e6318b 100644
---- a/Source/WTF/wtf/EnumTraits.h
-+++ b/Source/WTF/wtf/EnumTraits.h
-@@ -152,6 +152,16 @@ constexpr bool isZeroBasedContiguousEnum()
- #pragma clang diagnostic ignored "-Wenum-constexpr-conversion"
- #endif
- 
-+#if COMPILER(CLANG) && __clang_major__ >= 16
-+template <typename E, auto V, typename = void>
-+inline constexpr bool isEnumConstexprStaticCastValid = false;
-+template <typename E, auto V>
-+inline constexpr bool isEnumConstexprStaticCastValid<E, V, std::void_t<std::integral_constant<E, static_cast<E>(V)>>> = true;
-+#else
-+template <typename, auto>
-+inline constexpr bool isEnumConstexprStaticCastValid = true;
-+#endif
-+
- template<typename E>
- constexpr std::span<const char> enumTypeNameImpl()
- {
-@@ -215,6 +225,15 @@ constexpr std::span<const char> enumName()
-     return result;
- }
- 
-+template<typename E, auto V>
-+constexpr std::span<const char> enumName()
-+{
-+    if constexpr (isEnumConstexprStaticCastValid<E, V>)
-+        return enumName<static_cast<E>(V)>();
-+    else
-+        return { };
-+}
-+
- template<typename E>
- constexpr std::underlying_type_t<E> enumNamesMin()
- {
-@@ -264,7 +283,7 @@ constexpr auto makeEnumNames(std::index_sequence<Is...>)
- {
-     constexpr auto min = enumNamesMin<E>();
-     return std::array<std::span<const char>, sizeof...(Is)> {
--        enumName<static_cast<E>(static_cast<std::underlying_type_t<E>>(Is) + min)>()...
-+        enumName<E, static_cast<std::underlying_type_t<E>>(Is) + min>()...
-     };
- }
- 
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
index b11a18ba22..edf2fe28ec 100644
--- a/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
@@ -1,4 +1,4 @@
-From e0dfc113b016227da8a654d625e8f568b56761d0 Mon Sep 17 00:00:00 2001
+From 840e10e2be2ef82cc244e79ac29b8a5c6c4fe4f4 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 27 Oct 2015 16:02:19 +0200
 Subject: [PATCH] FindGObjectIntrospection.cmake: prefix variables obtained
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch
index 40a7133052..771844bb99 100644
--- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch
@@ -1,4 +1,4 @@
-From 984538dcce7b184269efc1e1b0fb78e1cb932b5d Mon Sep 17 00:00:00 2001
+From d4303256a06e1c51ddefa2cea914ab733c752aad Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 21 Mar 2025 01:21:22 -0700
 Subject: [PATCH] Fix build errors on RISCV
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  1 file changed, 1 insertion(+)
 
 diff --git a/Source/WebCore/contentextensions/ContentExtensionActions.h b/Source/WebCore/contentextensions/ContentExtensionActions.h
-index 0b75d2e1df78..61cb33c94ce8 100644
+index 0b75d2e1..61cb33c9 100644
 --- a/Source/WebCore/contentextensions/ContentExtensionActions.h
 +++ b/Source/WebCore/contentextensions/ContentExtensionActions.h
 @@ -28,6 +28,7 @@
diff --git a/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch b/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch
index 367e6b8342..fdb1990e7b 100644
--- a/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/no-musttail-arm.patch
@@ -1,4 +1,4 @@
-From 4602261fa44d6bbb4c3698c79e08a6a40a6edc5a Mon Sep 17 00:00:00 2001
+From d26bf398734a1eaf2e7dddc317b6c020212023c6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 12 Jan 2024 09:21:39 -0800
 Subject: [PATCH] clang/arm: Do not use MUST_TAIL_CALL
@@ -20,7 +20,7 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h
-index 16e416d..68dd9a0 100644
+index 16e416d6..68dd9a00 100644
 --- a/Source/WTF/wtf/Compiler.h
 +++ b/Source/WTF/wtf/Compiler.h
 @@ -293,7 +293,7 @@
diff --git a/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
index 436ad2f02c..08ae0a4485 100644
--- a/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/reproducibility.patch
@@ -1,4 +1,4 @@
-From 65e9a68c9d05f4902c2fc34303b7f8233ffa98d5 Mon Sep 17 00:00:00 2001
+From 7f313cd46938efd2a1f60f1cc335ba97e1a2c1e9 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Mon, 3 Jan 2022 14:18:34 +0000
 Subject: [PATCH] webkitgtk: Add reproducibility fix
diff --git a/meta/recipes-sato/webkit/webkitgtk/sys_futex.patch b/meta/recipes-sato/webkit/webkitgtk/sys_futex.patch
index 19d18dea88..2dfa6147b5 100644
--- a/meta/recipes-sato/webkit/webkitgtk/sys_futex.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/sys_futex.patch
@@ -1,7 +1,16 @@
-Fix build on newer 32bit architectures with only 64bit time_t
+From 28a557983df6e94018eff6b97c6a1c77cf54c624 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Dec 2024 20:24:22 -0800
+Subject: [PATCH] Fix build on newer 32bit architectures with only 64bit time_t
 
 Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/angle/angle/+/6108397]
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Source/ThirdParty/ANGLE/src/common/SimpleMutex.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Source/ThirdParty/ANGLE/src/common/SimpleMutex.cpp b/Source/ThirdParty/ANGLE/src/common/SimpleMutex.cpp
+index 4ed0af51..11feda6c 100644
 --- a/Source/ThirdParty/ANGLE/src/common/SimpleMutex.cpp
 +++ b/Source/ThirdParty/ANGLE/src/common/SimpleMutex.cpp
 @@ -17,6 +17,9 @@
diff --git a/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch b/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch
index 82d20758c2..2db3a5b8e5 100644
--- a/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch
+++ b/meta/recipes-sato/webkit/webkitgtk/t6-not-declared.patch
@@ -1,4 +1,4 @@
-From 29431aec88764072a032aa4411e26e566a3a6c0b Mon Sep 17 00:00:00 2001
+From 7b9d92bef3487c956bb847263bc38abdbf78ac3c Mon Sep 17 00:00:00 2001
 From: Michael Catanzaro <mcatanzaro@redhat.com>
 Date: Mon, 5 Feb 2024 11:00:49 -0600
 Subject: [PATCH] =?UTF-8?q?LowLevelInterpreter.cpp:339:21:=20error:=20?=
@@ -21,10 +21,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  1 file changed, 2 deletions(-)
 
 diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
-index 76c46889..500be433 100644
+index 2f739d6b..6b49d28c 100644
 --- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
 +++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
-@@ -334,8 +334,6 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm,
+@@ -336,8 +336,6 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm,
      UNUSED_VARIABLE(t2);
      UNUSED_VARIABLE(t3);
      UNUSED_VARIABLE(t5);
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.0.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
similarity index 96%
rename from meta/recipes-sato/webkit/webkitgtk_2.48.0.bb
rename to meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
index 6eb80da1de..41fe8209ce 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.48.0.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
@@ -16,11 +16,9 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://no-musttail-arm.patch \
            file://t6-not-declared.patch \
            file://sys_futex.patch \
-           file://0001-EnumTraits.h-error-no-matching-function-for-call-to-.patch \
-           file://0001-Cherry-pick-292304-main-7ffc29624258-.-https-bugs.we.patch \
            file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \
            "
-SRC_URI[sha256sum] = "94904a55cf12d44a4e36ceadafff02d46da73d76be9b4769f34cbfdf0eebf88e"
+SRC_URI[sha256sum] = "98efdf21c4cdca0fe0b73ab5a8cb52093b5aa52d9b1b016a93f71dbfa1eb258f"
 
 inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen
 
-- 
2.47.1

