diff --git a/0001-Fix-build-with-system-ICU-69.patch b/0001-Fix-build-with-system-ICU-69.patch new file mode 100644 index 0000000..8197fce --- /dev/null +++ b/0001-Fix-build-with-system-ICU-69.patch @@ -0,0 +1,78 @@ +From e67c7b49247c8b9646790c718b85d8ba75b68945 Mon Sep 17 00:00:00 2001 +From: Jimi Huotari +Date: Thu, 22 Apr 2021 14:25:17 +0300 +Subject: [PATCH] Fix build with system ICU 69 + +- https://bugs.gentoo.org/781236 +- https://chromium-review.googlesource.com/c/v8/v8/+/2477751 + +Change-Id: I8ea93bfe0acb87da9233fced73ff5ae7c5f4cb3e +Reviewed-by: Allan Sandfeld Jensen +--- + src/3rdparty/chromium/v8/src/objects/js-list-format.cc | 35 ++++++++++++++++++++++- + 1 file changed, 34 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/chromium/v8/src/objects/js-list-format.cc b/src/3rdparty/chromium/v8/src/objects/js-list-format.cc +index b17d38c43ff..7f06114b177 100644 +--- a/src/3rdparty/chromium/v8/src/objects/js-list-format.cc ++++ b/src/3rdparty/chromium/v8/src/objects/js-list-format.cc +@@ -28,6 +28,35 @@ + namespace v8 { + namespace internal { + ++#if U_ICU_VERSION_MAJOR_NUM >= 67 ++namespace { ++ ++UListFormatterWidth GetIcuWidth(JSListFormat::Style style) { ++ switch (style) { ++ case JSListFormat::Style::LONG: ++ return ULISTFMT_WIDTH_WIDE; ++ case JSListFormat::Style::SHORT: ++ return ULISTFMT_WIDTH_SHORT; ++ case JSListFormat::Style::NARROW: ++ return ULISTFMT_WIDTH_NARROW; ++ } ++ UNREACHABLE(); ++} ++ ++UListFormatterType GetIcuType(JSListFormat::Type type) { ++ switch (type) { ++ case JSListFormat::Type::CONJUNCTION: ++ return ULISTFMT_TYPE_AND; ++ case JSListFormat::Type::DISJUNCTION: ++ return ULISTFMT_TYPE_OR; ++ case JSListFormat::Type::UNIT: ++ return ULISTFMT_TYPE_UNITS; ++ } ++ UNREACHABLE(); ++} ++ ++} // namespace ++#else + namespace { + const char* kStandard = "standard"; + const char* kOr = "or"; +@@ -74,7 +103,7 @@ const char* GetIcuStyleString(JSListFormat::Style style, + } + + } // namespace +- ++#endif + MaybeHandle JSListFormat::New(Isolate* isolate, Handle map, + Handle locales, + Handle input_options) { +@@ -143,7 +172,11 @@ MaybeHandle JSListFormat::New(Isolate* isolate, Handle map, + icu::Locale icu_locale = r.icu_locale; + UErrorCode status = U_ZERO_ERROR; + icu::ListFormatter* formatter = icu::ListFormatter::createInstance( ++#if U_ICU_VERSION_MAJOR_NUM >= 67 ++ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status); ++#else + icu_locale, GetIcuStyleString(style_enum, type_enum), status); ++#endif + if (U_FAILURE(status) || formatter == nullptr) { + delete formatter; + THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError), +-- +2.20.1 + diff --git a/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes index 808168d..b0b751b 100644 --- a/libqt5-qtwebengine.changes +++ b/libqt5-qtwebengine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 6 11:45:34 UTC 2021 - Fabian Vogt + +- Add patch to fix build with ICU 69: + * 0001-Fix-build-with-system-ICU-69.patch + ------------------------------------------------------------------- Wed Apr 14 18:26:57 UTC 2021 - Christophe Giboudeaux diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec index 4ec1388..a3ee90d 100644 --- a/libqt5-qtwebengine.spec +++ b/libqt5-qtwebengine.spec @@ -56,6 +56,7 @@ Patch5: 0001-Fix-normalization-of-app-locales.patch Patch6: chromium-glibc-2.33.patch # PATCH-FIX-UPSTREAM Patch7: 0001-Fix-build-with-GCC-11.patch +Patch8: 0001-Fix-build-with-system-ICU-69.patch # http://www.chromium.org/blink not ported to PowerPC ExcludeArch: ppc ppc64 ppc64le s390 s390x # Try to fix i586 MemoryErrors with rpmlint