gentoo-ebuilds/media-video/handbrake/files/handbrake-1.9.2-allow-overriding-tools-via-env.patch
Alfred Wingate 5768e02999
media-video/handbrake: add 1.9.2
* Set tools explicitly for ffmpeg. bug #946831
* Take this as a chance to remove potential footguns with complicated seds.

Closes: https://bugs.gentoo.org/946831
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41950
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-06 19:39:53 +01:00

24 lines
760 B
Diff

From 32f63e103413661268452b482f61f0d22b2f359d Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Wed, 25 Dec 2024 20:21:51 +0200
Subject: [PATCH] Allow prepending tool option via env
* GCC untouched due to incompatible assumptions.
Signed-off-by: Alfred Wingate <parona@protonmail.com>
--- a/make/configure.py
+++ b/make/configure.py
@@ -1025,6 +1025,10 @@ class ToolProbe( Action ):
self.option = option
self.names = []
self.kwargs = kwargs
+ if var.endswith('.exe'):
+ env = os.environ.get( var.removesuffix('.exe') )
+ if env is not None:
+ self.names.append( env )
for name in names:
try:
name = str(name)
--
2.47.1