ports/www/chromium/files/patch-tools_protoc__wrapper_protoc__wrapper.py
Robert Nagy 6acad34cb2 www/chromium: update to 125.0.6422.76 and implement selectable audio backend support
with these changes, chromium now automatically selects which
audio backend to use in the following order:

pulse (if running) -> sndio -> alsa -> fake

an additional command line option has been also implemented so
that the user can force which backend to use:

--audio-backend={auto,sndio,pulse,alsa}

Security:	https://vuxml.freebsd.org/freebsd/8247af0d-183b-11ef-9f97-a8a1599412c6.html
PR:		246449
2024-05-22 15:26:15 +02:00

24 lines
976 B
Python

--- tools/protoc_wrapper/protoc_wrapper.py.orig 2024-05-21 18:07:39 UTC
+++ tools/protoc_wrapper/protoc_wrapper.py
@@ -183,15 +183,19 @@ def main(argv):
if not options.exclude_imports:
protoc_cmd += ["--include_imports"]
+ nenv = os.environ.copy()
+ nenv["PATH"] = "${WRKOBJDIR}/bin:" + nenv["PATH"]
+ nenv["LD_LIBRARY_PATH"] = "${WRKSRC}/out/Release"
+
dependency_file_data = None
if options.descriptor_set_out and options.descriptor_set_dependency_file:
protoc_cmd += ['--dependency_out', options.descriptor_set_dependency_file]
- ret = subprocess.call(protoc_cmd)
+ ret = subprocess.call(protoc_cmd, env=nenv)
with open(options.descriptor_set_dependency_file, 'rb') as f:
dependency_file_data = f.read().decode('utf-8')
- ret = subprocess.call(protoc_cmd)
+ ret = subprocess.call(protoc_cmd, env=nenv)
if ret != 0:
if ret <= -100:
# Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to