gentoo/dev-python/pyside/files/pyside-6.10.1-pass-ninja-opts.patch
Alfred Wingate 23e0f39f78
dev-python/pyside: pass NINJA args directly
Makes the build nicer as --load-average can be passed, similarly free
jobserver support as you can opt for not passing --jobs.

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44882
Closes: https://github.com/gentoo/gentoo/pull/44882
Signed-off-by: Sam James <sam@gentoo.org>
2025-12-04 01:44:46 +00:00

21 lines
840 B
Diff

Allows passing --load-average and not passing --jobs which would stop the jobserver from working.
This is a Gentoo'ism so its not upstreamable in this form.
diff --git a/build_scripts/main.py b/build_scripts/main.py
index cdaa439ff..3e088961e 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -854,8 +854,8 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin):
log.info(f"-- Compiling module {extension}...")
cmd_make = [str(self.make_path)]
- if OPTION["JOBS"]:
- cmd_make.append(OPTION["JOBS"])
+ if self.make_generator == "Ninja":
+ cmd_make.extend(os.getenv("NINJAOPTS").split(' '))
if OPTION["LOG_LEVEL"] == LogLevel.VERBOSE and self.make_generator == "Ninja":
cmd_make.append("-v")
if run_process(cmd_make) != 0: