git: 9bb351b004d6 - main - www/qt6-webengine: Fix build with gperf >= 3.2

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Mon, 14 Apr 2025 18:37:57 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9bb351b004d643c5f853e757777f08dc31a2137a

commit 9bb351b004d643c5f853e757777f08dc31a2137a
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-04-14 18:24:11 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-04-14 18:37:39 +0000

    www/qt6-webengine: Fix build with gperf >= 3.2
    
    Blink was making no longer needed substitutions to the generated code
    adding extra [[fallthrough]] attributes which caused build errors.
    
    Thanks to dinoex for working through this with me.
    
    PR:             286084
    Obtained from:  Gentoo
---
 ...rd__party_blink_renderer_build_scripts_gperf.py | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_gperf.py b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_gperf.py
new file mode 100644
index 000000000000..d42d489f943d
--- /dev/null
+++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_build_scripts_gperf.py
@@ -0,0 +1,27 @@
+--- src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py.orig	2025-03-29 00:50:57 UTC
++++ src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
+@@ -28,24 +28,6 @@ def generate_gperf(gperf_path, gperf_input, gperf_args
+             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: