Date: Thu, 12 Feb 2026 20:51:26 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: f9807ebb6bda - main - www/qt5-webengine: fix build with clang 21 Message-ID: <698e3d4e.47aa8.6d22a8d@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9807ebb6bda547e662d094b879e68d9ff96b06b commit f9807ebb6bda547e662d094b879e68d9ff96b06b Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-02-10 19:56:28 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-02-12 20:50:36 +0000 www/qt5-webengine: fix build with clang 21 With libc++ 21 www/qt5-webengine fails to build, with errors similar to: In file included from gen/third_party/blink/renderer/platform/platform_jumbo_54.cc:7: ./../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc:63:5: error: static assertion expression is not an integral constant expression [...] ../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/base/metrics/histogram_macros_internal.h:45:12: note: integer value 8 is outside the valid range of values [0, 7] for the enumeration type 'RequestedImageMimeType' 45 | return static_cast<Enum>( | ^ https://chromium.googlesource.com/chromium/src/+/bb340f66aaf44206fa5106509fb4e8c0719ee831 fixes these, but has to be slightly adjusted to make it apply to the specific chromium version included in qt5-webengine. PR: 293093 Approved by: jhale (maintainer) MFH: 2026Q1 --- ...3rdparty_chromium_base_metrics_histogram__macros.h | 19 +++++++++++++++++++ ...hromium_base_metrics_histogram__macros__internal.h | 13 +++++++++++++ ...omponents_download_public_common_download__stats.h | 11 +++++++++++ ...onents_sessions_core_session__service__commands.cc | 13 +++++++++++++ ...ntent_browser_code__cache_generated__code__cache.h | 12 ++++++++++++ ...rc_3rdparty_chromium_net_cookies_cookie__monster.h | 11 +++++++++++ ...derer_core_imagebitmap_image__bitmap__factories.cc | 11 +++++++++++ ...r_platform_image-encoders_image__encoder__utils.cc | 11 +++++++++++ 8 files changed, 101 insertions(+) diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros.h new file mode 100644 index 000000000000..abd70a4199fe --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros.h @@ -0,0 +1,19 @@ +--- src/3rdparty/chromium/base/metrics/histogram_macros.h.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/base/metrics/histogram_macros.h +@@ -54,13 +54,14 @@ + // + // The second variant requires three arguments: the first two are the same as + // before, and the third argument is the enum boundary: this must be strictly +-// greater than any other enumerator that will be sampled. ++// greater than any other enumerator that will be sampled. This only works for ++// enums with a fixed underlying type. + // + // Sample usage: + // // These values are logged to UMA. Entries should not be renumbered and + // // numeric values should never be reused. Please keep in sync with "MyEnum" + // // in src/tools/metrics/histograms/enums.xml. +-// enum class MyEnum { ++// enum class MyEnum : uint8_t { + // FIRST_VALUE = 0, + // SECOND_VALUE = 1, + // ... diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros__internal.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros__internal.h new file mode 100644 index 000000000000..27e8ff927175 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_base_metrics_histogram__macros__internal.h @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/base/metrics/histogram_macros_internal.h.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/base/metrics/histogram_macros_internal.h +@@ -42,6 +42,10 @@ struct EnumSizeTraits< + Enum, + std::enable_if_t<std::is_enum<decltype(Enum::kMaxValue)>::value>> { + static constexpr Enum Count() { ++ // If you're getting ++ // note: integer value X is outside the valid range of values [0, X] for ++ // this enumeration type ++ // Then you need to give your enum a fixed underlying type. + return static_cast<Enum>( + static_cast<std::underlying_type_t<Enum>>(Enum::kMaxValue) + 1); + } diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_public_common_download__stats.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_public_common_download__stats.h new file mode 100644 index 000000000000..0fcaaf92b404 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_download_public_common_download__stats.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/components/download/public/common/download_stats.h.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/components/download/public/common/download_stats.h +@@ -145,7 +145,7 @@ enum DownloadCountTypes { + + // Enum for in-progress download DB, used in histogram + // "Download.InProgressDB.Counts". +-enum InProgressDBCountTypes { ++enum InProgressDBCountTypes : uint8_t { + // Count of initialization attempts. + kInitializationCount = 0, + diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_sessions_core_session__service__commands.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_sessions_core_session__service__commands.cc new file mode 100644 index 000000000000..8dd7c1873e1a --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_components_sessions_core_session__service__commands.cc @@ -0,0 +1,13 @@ +--- src/3rdparty/chromium/components/sessions/core/session_service_commands.cc.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/components/sessions/core/session_service_commands.cc +@@ -164,8 +164,8 @@ static_assert(ui::SHOW_STATE_END == + // Assert to ensure PersistedWindowShowState is updated if ui::WindowShowState + // is changed. + static_assert(ui::SHOW_STATE_END == +- (static_cast<ui::WindowShowState>(PERSISTED_SHOW_STATE_END) - +- 2), ++ static_cast<ui::WindowShowState>(PERSISTED_SHOW_STATE_END - ++ 2), + "SHOW_STATE_END must equal PERSISTED_SHOW_STATE_END minus the " + "deprecated entries"); + // Returns the show state to store to disk based |state|. diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_code__cache_generated__code__cache.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_code__cache_generated__code__cache.h new file mode 100644 index 000000000000..97aa06394a5c --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_content_browser_code__cache_generated__code__cache.h @@ -0,0 +1,12 @@ +--- src/3rdparty/chromium/content/browser/code_cache/generated_code_cache.h.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/content/browser/code_cache/generated_code_cache.h +@@ -53,7 +53,8 @@ class CONTENT_EXPORT GeneratedCodeCache { + enum CodeCacheType { kJavaScript, kWebAssembly }; + + // Used for collecting statistics about cache behaviour. +- enum CacheEntryStatus { ++ // Since it's uploaded to UMA, its values must never change. ++ enum CacheEntryStatus : uint8_t { + kHit, + kMiss, + kClear, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cookies_cookie__monster.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cookies_cookie__monster.h new file mode 100644 index 000000000000..45fac39ca5cd --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_net_cookies_cookie__monster.h @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/net/cookies/cookie_monster.h.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/net/cookies/cookie_monster.h +@@ -314,7 +314,7 @@ class NET_EXPORT CookieMonster : public CookieStore { + // of scheme. This enum should not be used when cookies are *cleared*, + // because its purpose is to understand if Chrome can deprecate the + // ability of HTTP urls to set/overwrite Secure cookies. +- enum CookieSource { ++ enum CookieSource : uint8_t { + COOKIE_SOURCE_SECURE_COOKIE_CRYPTOGRAPHIC_SCHEME = 0, + COOKIE_SOURCE_SECURE_COOKIE_NONCRYPTOGRAPHIC_SCHEME, + COOKIE_SOURCE_NONSECURE_COOKIE_CRYPTOGRAPHIC_SCHEME, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_imagebitmap_image__bitmap__factories.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_imagebitmap_image__bitmap__factories.cc new file mode 100644 index 000000000000..01b845987b66 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_core_imagebitmap_image__bitmap__factories.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc +@@ -63,7 +63,7 @@ namespace { + + namespace { + // This enum is used in a UMA histogram. +-enum CreateImageBitmapSource { ++enum CreateImageBitmapSource : uint8_t { + kCreateImageBitmapSourceBlob = 0, + kCreateImageBitmapSourceImageBitmap = 1, + kCreateImageBitmapSourceImageData = 2, diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-encoders_image__encoder__utils.cc b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-encoders_image__encoder__utils.cc new file mode 100644 index 000000000000..07a236aced04 --- /dev/null +++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-encoders_image__encoder__utils.cc @@ -0,0 +1,11 @@ +--- src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc.orig 2025-04-23 16:00:55 UTC ++++ src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc +@@ -16,7 +16,7 @@ namespace { + + namespace { + // This enum is used in a UMA histogram; the values should not be changed. +-enum RequestedImageMimeType { ++enum RequestedImageMimeType : uint8_t { + kRequestedImageMimeTypePng = 0, + kRequestedImageMimeTypeJpeg = 1, + kRequestedImageMimeTypeWebp = 2,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698e3d4e.47aa8.6d22a8d>
