commit: f5e828591c4596293f8a3157aa074b930e68b69f
Author: Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 13 21:44:55 2025 +0000
Commit: Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sun Apr 13 21:49:16 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5e82859
www-client/chromium: fix build with gperf >=3.2
This patch appears doesn't appear to impact when built
with older versions of gperf, so we'll apply unconditionally.
Bump the minimum gperf version for M136.
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>
www-client/chromium/chromium-135.0.7049.84.ebuild | 1 +
www-client/chromium/chromium-136.0.7103.25.ebuild | 3 ++-
www-client/chromium/files/chromium-135-gperf.patch | 28 ++++++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/www-client/chromium/chromium-135.0.7049.84.ebuild
b/www-client/chromium/chromium-135.0.7049.84.ebuild
index 1b3e06319754..b16a7f21dde7 100644
--- a/www-client/chromium/chromium-135.0.7049.84.ebuild
+++ b/www-client/chromium/chromium-135.0.7049.84.ebuild
@@ -416,6 +416,7 @@ src_prepare() {
"${FILESDIR}/chromium-135-oauth2-client-switches.patch"
"${FILESDIR}/chromium-135-map_droppable-glibc.patch"
"${FILESDIR}/chromium-135-webrtc-pipewire.patch"
+ "${FILESDIR}/chromium-135-gperf.patch"
)
if use bundled-toolchain; then
diff --git a/www-client/chromium/chromium-136.0.7103.25.ebuild
b/www-client/chromium/chromium-136.0.7103.25.ebuild
index 3c57eeea312e..98ef2db3ce99 100644
--- a/www-client/chromium/chromium-136.0.7103.25.ebuild
+++ b/www-client/chromium/chromium-136.0.7103.25.ebuild
@@ -211,7 +211,7 @@ BDEPEND="
>=dev-build/gn-${GN_MIN_VER}
app-alternatives/ninja
dev-lang/perl
- >=dev-util/gperf-3.0.3
+ >=dev-util/gperf-3.2
dev-vcs/git
>=net-libs/nodejs-${NODE_VER}:0/${NODE_VER%%.*}[inspector]
>=sys-devel/bison-2.4.3
@@ -416,6 +416,7 @@ src_prepare() {
"${FILESDIR}/chromium-135-oauth2-client-switches.patch"
"${FILESDIR}/chromium-135-map_droppable-glibc.patch"
"${FILESDIR}/chromium-136-drop-nodejs-ver-check.patch"
+ "${FILESDIR}/chromium-135-gperf.patch"
)
if use bundled-toolchain; then
diff --git a/www-client/chromium/files/chromium-135-gperf.patch
b/www-client/chromium/files/chromium-135-gperf.patch
new file mode 100644
index 000000000000..85e4706f3fde
--- /dev/null
+++ b/www-client/chromium/files/chromium-135-gperf.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/953436#c5
+--- a/third_party/blink/renderer/build/scripts/gperf.py
++++ b/third_party/blink/renderer/build/scripts/gperf.py
+@@ -28,24 +28,6 @@
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
+ gperf_output = gperf.communicate(gperf_input)[0]
+- # Massage gperf output to be more palatable for modern compilers.
+- # TODO(thakis): Upstream these to gperf so we don't need massaging.
+- # `register` is deprecated in C++11 and removed in C++17, so remove
+- # it from gperf's output.
+- # https://savannah.gnu.org/bugs/index.php?53028
+- gperf_output = re.sub(r'\bregister ', '', gperf_output)
+- # -Wimplicit-fallthrough needs an explicit fallthrough statement,
+- # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
+- # https://savannah.gnu.org/bugs/index.php?53029
+- gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
+- ' [[fallthrough]];')
+- # -Wpointer-to-int-cast warns about casting pointers to smaller ints
+- # Replace {(int)(long)&(foo), bar} with
+- # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
+- gperf_output = re.sub(
+- r'\(int\)\(long\)(.*?),',
+- r'static_cast<int>(reinterpret_cast<uintptr_t>(\1)),',
+- gperf_output)
+ script = 'third_party/blink/renderer/build/scripts/gperf.py'
+ return '// Generated by %s\n' % script + gperf_output
+ except OSError: