[packages/qt5-qtwebkit] build with -std=c++17 (required by icu 76)
atler
atler at pld-linux.org
Sat Jan 18 20:04:15 CET 2025
commit 34fe21f54e0fca7105c83c4b8a0f421b1a3ec1dd
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Jan 18 19:46:26 2025 +0100
build with -std=c++17 (required by icu 76)
c++17.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
qt5-qtwebkit.spec | 22 ++++++++++++----------
2 files changed, 56 insertions(+), 10 deletions(-)
---
diff --git a/qt5-qtwebkit.spec b/qt5-qtwebkit.spec
index 632ec82..64165ce 100644
--- a/qt5-qtwebkit.spec
+++ b/qt5-qtwebkit.spec
@@ -47,6 +47,7 @@ Patch3: %{name}-gstreamer.patch
Patch4: gcc13.patch
Patch5: python3.patch
Patch6: python3.9.patch
+Patch7: c++17.patch
# from FC
Patch102: qtwebkit-5.212.0_cmake_cmp0071.patch
Patch108: x32.patch
@@ -193,15 +194,16 @@ Dokumentacja do bibliotek Qt5 WebKit w formacie QCH.
%prep
%setup -q -n qtwebkit-%{version}-%{snap}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch102 -p1
-%patch108 -p1
+%patch -P 0 -p1
+%patch -P 1 -p1
+%patch -P 2 -p1
+%patch -P 3 -p1
+%patch -P 4 -p1
+%patch -P 5 -p1
+%patch -P 6 -p1
+%patch -P 7 -p1
+%patch -P 102 -p1
+%patch -P 108 -p1
%build
mkdir -p build
@@ -231,7 +233,7 @@ cmake \
%ifarch x32
-DENABLE_JIT=OFF \
%endif
- ..
+ ..
%{__make}
diff --git a/c++17.patch b/c++17.patch
new file mode 100644
index 0000000..396b7b5
--- /dev/null
+++ b/c++17.patch
@@ -0,0 +1,44 @@
+--- qtwebkit-5.212.0-alpha4/Source/cmake/OptionsCommon.cmake.orig 2025-01-18 16:47:37.062008124 +0100
++++ qtwebkit-5.212.0-alpha4/Source/cmake/OptionsCommon.cmake 2025-01-18 18:27:44.526259025 +0100
+@@ -31,7 +31,7 @@
+ if (COMPILER_IS_GCC_OR_CLANG)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+ endif ()
+
+ if (COMPILER_IS_CLANG AND CMAKE_GENERATOR STREQUAL "Ninja")
+--- qtwebkit-5.212.0-alpha4/Source/WTF/wtf/StdLibExtras.h.orig 2020-03-04 18:16:37.000000000 +0100
++++ qtwebkit-5.212.0-alpha4/Source/WTF/wtf/StdLibExtras.h 2025-01-18 12:20:42.206600856 +0100
+@@ -292,7 +292,7 @@
+ // This adds various C++14 features for versions of the STL that may not yet have them.
+ namespace std {
+ // MSVC 2013 supports std::make_unique already.
+-#if !defined(_MSC_VER) || _MSC_VER < 1800
++#if __cplusplus < 201402L
+ template<class T> struct _Unique_if {
+ typedef unique_ptr<T> _Single_object;
+ };
+@@ -323,7 +323,7 @@
+ #endif
+
+ // MSVC 2015 supports these functions.
+-#if !COMPILER(MSVC) || _MSC_VER < 1900
++#if __cplusplus < 201402L
+ // Compile-time integer sequences
+ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3658.html
+ // (Note that we only implement index_sequence, and not the more generic integer_sequence).
+--- qtwebkit-5.212.0-alpha4/Source/WebCore/page/csp/ContentSecurityPolicy.cpp.orig 2025-01-18 18:23:46.724912441 +0100
++++ qtwebkit-5.212.0-alpha4/Source/WebCore/page/csp/ContentSecurityPolicy.cpp 2025-01-18 18:24:49.828602836 +0100
+@@ -232,8 +232,9 @@
+ auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
+ cryptoDigest->addBytes(contentCString.data(), contentCString.length());
+ Vector<uint8_t> digest = cryptoDigest->computeHash();
++ auto policyHash = std::make_pair(algorithm, digest);
+ for (auto& policy : policies) {
+- if ((policy.get()->*allowed)(std::make_pair(algorithm, digest)))
++ if ((policy.get()->*allowed)(policyHash))
+ return true;
+ }
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtwebkit.git/commitdiff/34fe21f54e0fca7105c83c4b8a0f421b1a3ec1dd
More information about the pld-cvs-commit
mailing list