From 0ad3afa1916d33d7e60e4385582cf8e73d1e6719 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 28 Dec 2025 22:10:40 +0100 Subject: [PATCH] package/qt5/qt5webkit: fix build with ICU >= 76 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the bump of ICU from ICU 73 to ICU 77 in commit dcee99507c6767230fd1faeeefe95f5662eb03a3, the build of qt5webkit fails with: /home/thomas/buildroot/br/output-all/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/unicode/char16ptr.h:271:38: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type 271 | template>> | ^~~~~~~~~~~ We taken two patches from Arch Linux, one which is a partial upstream backport, and another which was submitted upstream, to address this build issue. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- ...latform.h-fix-build-with-newer-versi.patch | 40 +++++++++++++++++++ ...eader-only-APIs-introduced-in-ICU-76.patch | 28 +++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 package/qt5/qt5webkit/0010-Source-WTF-wtf-Platform.h-fix-build-with-newer-versi.patch create mode 100644 package/qt5/qt5webkit/0011-Disable-ICU-C-header-only-APIs-introduced-in-ICU-76.patch diff --git a/package/qt5/qt5webkit/0010-Source-WTF-wtf-Platform.h-fix-build-with-newer-versi.patch b/package/qt5/qt5webkit/0010-Source-WTF-wtf-Platform.h-fix-build-with-newer-versi.patch new file mode 100644 index 0000000000..4656289870 --- /dev/null +++ b/package/qt5/qt5webkit/0010-Source-WTF-wtf-Platform.h-fix-build-with-newer-versi.patch @@ -0,0 +1,40 @@ +From 30a9270a3fe9157a532e52458ee47b0f3fcc2f97 Mon Sep 17 00:00:00 2001 +From: Konstantin Tokarev +Date: Mon, 27 May 2024 23:23:11 +0300 +Subject: [PATCH] Source/WTF/wtf/Platform.h: fix build with newer + versions of ICU + +Partial backport of r260554 (79fe19caf) + +In particular, we need -DU_SHOW_CPLUSPLUS_API=0 to avoid compilation +errors in C++ parts of ICU headers which we are not using anyway. + +Change-Id: Ib45c74e3caad148fbd778d0c07330127f7dab5ec +Taken from: https://github.com/archlinux/aur/blob/qt5-webkit/qt5-webkit-icu75.patch +Upstream: part of https://github.com/qtwebkit/qtwebkit/commit/79fe19caf +Signed-off-by: Thomas Petazzoni +--- + Source/WTF/wtf/Platform.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 5717f3ea1664..dfed4a13dd2b 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -1125,6 +1125,13 @@ + #define ENABLE_PLATFORM_FONT_LOOKUP 1 + #endif + ++/* FIXME: This does not belong in Platform.h and should instead be included in another mechanism (compiler option, prefix header, config.h, etc) */ ++/* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */ ++#define U_SHOW_CPLUSPLUS_API 0 ++#ifdef __cplusplus ++#define UCHAR_TYPE char16_t ++#endif ++ + #if COMPILER(MSVC) + #undef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS +-- +2.52.0 + diff --git a/package/qt5/qt5webkit/0011-Disable-ICU-C-header-only-APIs-introduced-in-ICU-76.patch b/package/qt5/qt5webkit/0011-Disable-ICU-C-header-only-APIs-introduced-in-ICU-76.patch new file mode 100644 index 0000000000..17dfc7e7e0 --- /dev/null +++ b/package/qt5/qt5webkit/0011-Disable-ICU-C-header-only-APIs-introduced-in-ICU-76.patch @@ -0,0 +1,28 @@ +From bf253b37ebf3fd99fa3cc46bd737a88defa8914e Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +Date: Thu, 9 Jan 2025 14:18:31 +0300 +Subject: [PATCH] Disable ICU C++ header-only APIs, introduced in ICU 76 + +They require C++17 which we do not have, but we do not need them anyway. + +Upstream: https://github.com/qtwebkit/qtwebkit/pull/1107 +Signed-off-by: Thomas Petazzoni +--- + Source/WTF/wtf/Platform.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index dfed4a13dd2b..6ba6c3972aee 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -1128,6 +1128,7 @@ + /* FIXME: This does not belong in Platform.h and should instead be included in another mechanism (compiler option, prefix header, config.h, etc) */ + /* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */ + #define U_SHOW_CPLUSPLUS_API 0 ++#define U_SHOW_CPLUSPLUS_HEADER_API 0 + #ifdef __cplusplus + #define UCHAR_TYPE char16_t + #endif +-- +2.52.0 +