mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
www/qt5-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. Obtained from: Gentoo
This commit is contained in:
parent
9bb351b004
commit
8f6a7eb22b
1 changed files with 27 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
--- src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py.orig 2025-03-06 09:26:10 UTC
|
||||
+++ src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
|
||||
@@ -29,24 +29,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:
|
Loading…
Add table
Reference in a new issue