From aba39d3111ecc75028d203cf0ea3c29d8c06eafa2bf5f3c73b33e638fe255fdb Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Thu, 23 May 2024 14:08:46 +0000 Subject: [PATCH] Accepting request 1176462 from home:krop:qtwebengine-lts Fixes for icu 75 OBS-URL: https://build.opensuse.org/request/show/1176462 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwebengine?expand=0&rev=65 --- ...tructor-in-place-of-self-delegation-.patch | 35 ++++++ libqt5-qtwebengine.changes | 8 ++ libqt5-qtwebengine.spec | 20 +++- qt5-webengine-icu-75.patch | 102 ++++++++++++++++++ 4 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 0001-Use-default-constructor-in-place-of-self-delegation-.patch create mode 100644 qt5-webengine-icu-75.patch diff --git a/0001-Use-default-constructor-in-place-of-self-delegation-.patch b/0001-Use-default-constructor-in-place-of-self-delegation-.patch new file mode 100644 index 0000000..f476f1f --- /dev/null +++ b/0001-Use-default-constructor-in-place-of-self-delegation-.patch @@ -0,0 +1,35 @@ +From 1b74bce8ba1322d1853c7fd4467504a4a0d32d7b Mon Sep 17 00:00:00 2001 +From: Adam Klein +Date: Mon, 29 Nov 2021 15:11:39 -0800 +Subject: [PATCH] Use default constructor in place of self-delegation for + Symbol() + +This avoids a compile error when building with GCC in C++17 mode. + +Bug: v8:12449 +Change-Id: I14817895d31019fb71fc71b061f2ecf576dbc711 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307102 +Commit-Queue: Adam Klein +Reviewed-by: Leszek Swirski +Reviewed-by: Tobias Tebbi +Cr-Commit-Position: refs/heads/main@{#78171} +--- + src/3rdparty/chromium/v8/src/torque/earley-parser.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/3rdparty/chromium/v8/src/torque/earley-parser.h b/src/3rdparty/chromium/v8/src/torque/earley-parser.h +index e0dca24..0429fd2 100644 +--- a/src/3rdparty/chromium/v8/src/torque/earley-parser.h ++++ b/src/3rdparty/chromium/v8/src/torque/earley-parser.h +@@ -248,7 +248,7 @@ class Rule final { + // used in the parser. + class Symbol { + public: +- Symbol() : Symbol({}) {} ++ Symbol() = default; + Symbol(std::initializer_list rules) { *this = rules; } + + V8_EXPORT_PRIVATE Symbol& operator=(std::initializer_list rules); +-- +2.45.1 + diff --git a/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes index ab397be..2a93218 100644 --- a/libqt5-qtwebengine.changes +++ b/libqt5-qtwebengine.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu May 23 00:21:22 UTC 2024 - Christophe Marin + +- Add compatibility patches for ICU 75: + * qt5-webengine-icu-75.patch + * 0001-Use-default-constructor-in-place-of-self-delegation-.patch +- Consequently build with a newer compiler on Leap 15 + ------------------------------------------------------------------- Wed May 22 08:20:33 UTC 2024 - christophe@krop.fr diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec index 4cc9808..482ede0 100644 --- a/libqt5-qtwebengine.spec +++ b/libqt5-qtwebengine.spec @@ -58,6 +58,9 @@ Patch4: qtwebengine-pipewire-0.3.patch Patch5: sandbox_futex_time64.patch # PATCH-FIX-UPSTREAM -- Add missing dependencies for compatibility with Ninja 1.12 Patch6: Add-missing-dependencies.patch +# PATCH-FIX-UPSTREAM -- ICU 75 compatibility +Patch7: qt5-webengine-icu-75.patch +Patch8: 0001-Use-default-constructor-in-place-of-self-delegation-.patch ### Patch 50-99 are applied conditionally # PATCH-FIX-OPENSUSE -- allow building qtwebengine with ffmpeg5 Patch50: qtwebengine-ffmpeg5.patch @@ -70,6 +73,10 @@ BuildRequires: bison BuildRequires: fdupes BuildRequires: flac-devel BuildRequires: flex +%if 0%{?suse_version} < 1550 +BuildRequires: gcc13-PIE +BuildRequires: gcc13-c++ +%endif BuildRequires: git-core BuildRequires: gperf BuildRequires: krb5 @@ -293,6 +300,8 @@ Examples for the libqt5-qtpdf module. %patch -P4 -p1 %patch -P5 -p1 %patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 # FFmpeg 5 %if %{with system_ffmpeg} @@ -310,9 +319,13 @@ mkdir .git sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -%build rm -r src/3rdparty/chromium/third_party/openh264/src +%build +%if 0%{?suse_version} < 1550 +export CC=gcc-13 CXX=g++-13 +%endif + %ifnarch x86_64 RPM_OPT_FLAGS="$RPM_OPT_FLAGS " export RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-g / } @@ -329,6 +342,11 @@ export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wno-return-type" gn_args+="use_system_libxml=true use_system_libxslt=true" \ %if "%{pyver}" == "python311" config.input.python_override=python3.11 \ +%endif +%if 0%{?suse_version} < 1550 + QMAKE_CC=gcc-13 \ + QMAKE_CXX=g++-13 \ + QMAKE_LINK=g++-13 \ %endif qtwebengine.pro -- \ -webengine-alsa \ diff --git a/qt5-webengine-icu-75.patch b/qt5-webengine-icu-75.patch new file mode 100644 index 0000000..66c74f5 --- /dev/null +++ b/qt5-webengine-icu-75.patch @@ -0,0 +1,102 @@ +Fix build with ICU 75. +Origin: Arch linux: https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/blob/main/qt5-webengine-icu-75.patch?ref_type=heads + +diff --git a/src/3rdparty/chromium/build/config/compiler/BUILD.gn b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +index b511a58c5a8..abd78a74ead 100644 +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -566,7 +566,7 @@ config("compiler") { + # Override Chromium's default for projects that wish to stay on C++11. + cflags_cc += [ "-std=${standard_prefix}++11" ] + } else { +- cflags_cc += [ "-std=${standard_prefix}++14" ] ++ cflags_cc += [ "-std=${standard_prefix}++17" ] + } + } else if (!is_win && !is_nacl) { + if (target_os == "android") { +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +index f03ba1e4ab4..b1495f7ae74 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() { + // + // __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all + // platforms, as Chrome's requirement is C++14 as of 2020. +-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__) ++#if 0 + static constexpr size_t kAlignment = + std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__); + #else +diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +index 76e627d27a3..942435f44a0 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +index d6c31b06887..d8852dfd186 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_PPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +index 3b9971abae1..d4458038527 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "absl/types/optional.h" + #include "api/array_view.h" +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +index 345e45ce127..e686e5d691a 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +@@ -12,6 +12,7 @@ + #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_ + + #include ++#include + + #include "absl/types/optional.h" + +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +index 8fcc799b795..bc69ddcf18c 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +@@ -15,6 +15,7 @@ + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h" + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h" + #include "third_party/blink/renderer/platform/text/text_boundaries.h" ++#include "absl/base/attributes.h" + + namespace blink { + +diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +index df506f0fae6..1de105fed4a 100644 +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 0 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE