libicu: revbump revdeps (8)

* qt5-qtwebkit: revbump to rebuild
This commit is contained in:
Chongyun Lee 2024-04-22 03:39:32 +08:00
parent e10b28f1e5
commit 531dcb95bc
5 changed files with 114 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Qt 5 WebKit Library"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION="5.212.0-alpha4"
TERMUX_PKG_REVISION=15
TERMUX_PKG_REVISION=16
TERMUX_PKG_SRCURL="https://github.com/qtwebkit/qtwebkit/releases/download/qtwebkit-${TERMUX_PKG_VERSION}/qtwebkit-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=9ca126da9273664dd23a3ccd0c9bebceb7bb534bddd743db31caf6a5a6d4a9e6
TERMUX_PKG_DEPENDS="libc++, libhyphen, libicu, libjpeg-turbo, libpng, libsqlite, libwebp, libx11, libxml2, libxslt, qt5-qtbase, qt5-qtdeclarative, qt5-qtlocation, qt5-qtmultimedia, qt5-qtsensors, zlib"

View File

@ -0,0 +1,15 @@
Since ICU 75, ICU C++ headers need at least C++17 to compile as it
uses `std::enable_if_t` (introduced in C++14) and `std::is_same_v`
(introduced in C++17).
--- a/Source/cmake/OptionsCommon.cmake
+++ b/Source/cmake/OptionsCommon.cmake
@@ -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")

View File

@ -0,0 +1,28 @@
--- a/Source/WebCore/xml/XSLTProcessor.h
+++ b/Source/WebCore/xml/XSLTProcessor.h
@@ -64,7 +64,11 @@
void reset();
+#if LIBXML_VERSION >= 21200
+ static void parseErrorFunc(void* userData, const xmlError*);
+#else
static void parseErrorFunc(void* userData, xmlError*);
+#endif
static void genericErrorFunc(void* userData, const char* msg, ...);
// Only for libXSLT callbacks
--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
+++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -78,7 +78,11 @@
// It would be nice to do something with this error message.
}
+#if LIBXML_VERSION >= 21200
+void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error)
+#else
void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
+#endif
{
PageConsoleClient* console = static_cast<PageConsoleClient*>(userData);
if (!console)

View File

@ -0,0 +1,50 @@
Remove `std::random_shuffle` usage (removed in C++17)
https://github.com/WebKit/WebKit/commit/0fbd42d50de66ad019249e8727dd3bd24dedf7cb
--- a/Source/JavaScriptCore/jit/BinarySwitch.cpp
+++ b/Source/JavaScriptCore/jit/BinarySwitch.cpp
@@ -137,6 +137,27 @@ bool BinarySwitch::advance(MacroAssembler& jit)
}
}
+class RandomNumberGenerator {
+public:
+ using result_type = uint32_t;
+
+ RandomNumberGenerator(WeakRandom& weakRandom)
+ : m_weakRandom(weakRandom)
+ {
+ }
+
+ uint32_t operator()()
+ {
+ return m_weakRandom.getUint32();
+ }
+
+ static constexpr uint32_t min() { return std::numeric_limits<uint32_t>::min(); }
+ static constexpr uint32_t max() { return std::numeric_limits<uint32_t>::max(); }
+
+private:
+ WeakRandom& m_weakRandom;
+};
+
void BinarySwitch::build(unsigned start, bool hardStart, unsigned end)
{
if (BinarySwitchInternal::verbose)
@@ -195,13 +216,9 @@ void BinarySwitch::build(unsigned start, bool hardStart, unsigned end)
for (unsigned i = 0; i < size; ++i)
localCaseIndices.append(start + i);
- std::random_shuffle(
+ std::shuffle(
localCaseIndices.begin(), localCaseIndices.end(),
- [this] (unsigned n) {
- // We use modulo to get a random number in the range we want fully knowing that
- // this introduces a tiny amount of bias, but we're fine with such tiny bias.
- return m_weakRandom.getUint32() % n;
- });
+ RandomNumberGenerator(m_weakRandom));
for (unsigned i = 0; i < size - 1; ++i) {
append(BranchCode(NotEqualToPush, localCaseIndices[i]));

View File

@ -0,0 +1,20 @@
They are conflict with libcxx headers.
--- a/Source/WTF/wtf/StdLibExtras.h
+++ b/Source/WTF/wtf/StdLibExtras.h
@@ -291,6 +291,7 @@
// This adds various C++14 features for versions of the STL that may not yet have them.
namespace std {
+#if __cplusplus < 201300
// MSVC 2013 supports std::make_unique already.
#if !defined(_MSC_VER) || _MSC_VER < 1800
template<class T> struct _Unique_if {
@@ -371,6 +372,7 @@
}
}
#endif
+#endif
template<WTF::CheckMoveParameterTag, typename T>
ALWAYS_INLINE constexpr typename remove_reference<T>::type&& move(T&& value)