From ba677a2e6e511cd1a683d1712f9e511984a79beb Mon Sep 17 00:00:00 2001 From: Stuart Cameron Date: Tue, 30 Jun 2026 22:11:44 +1000 Subject: [PATCH] deps(macos): handle CAS's vapoursynth get-include meson probe (upstream drift) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VapourSynth-CAS upstream switched its meson.build VS-include probe from `import vapoursynth` to `run_command('vapoursynth', 'get-include', ...)`, which invokes the `vapoursynth` console script not present on the clean runner. The build_plugin patcher only fired on "import vapoursynth", so CAS now fails to configure on arm64 (its sole source; x64 also downloads a prebuilt so it slipped through) → packaging completeness guard fails. Broaden the patcher trigger to also match `run_command('vapoursynth'`; the existing `.stdout().strip()` regex already rewrites it to the from-source VS include dir. Verified against the current CAS meson.build. Co-Authored-By: Claude Opus 4.8 (1M context) --- Scripts/download-deps-macos.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Scripts/download-deps-macos.sh b/Scripts/download-deps-macos.sh index 2645212..a2929f5 100755 --- a/Scripts/download-deps-macos.sh +++ b/Scripts/download-deps-macos.sh @@ -658,13 +658,18 @@ build_plugin() { cd "$name" - # Some plugins' meson.build locates the VapourSynth headers by running - # `import vapoursynth as vs; print(vs.get_include())` in the host python - # (e.g. mvtools, bm3d, eedi3m). On a clean build machine the host python has - # no `vapoursynth` module (the runtime VS module is built against our - # embedded python, not the host's), so that probe fails. Replace it with the - # from-source VS include dir - same trick already used for vivtc below. - if [ -n "$VS_INC_DIR" ] && [ -f meson.build ] && grep -q "import vapoursynth" meson.build; then + # Some plugins' meson.build locates the VapourSynth headers via a run_command + # the clean build machine can't satisfy, in one of two forms: + # (a) `import vapoursynth as vs; print(vs.get_include())` in the host python + # (e.g. mvtools, bm3d, eedi3m) - the host python has no `vapoursynth` + # module (the runtime VS module is built against our embedded python). + # (b) `run_command('vapoursynth', 'get-include', ...)` - invokes the + # `vapoursynth` console script, which isn't on PATH here (e.g. CAS, which + # upstream switched to this form). Both end in `.stdout().strip()`. + # Replace either probe with the from-source VS include dir (same trick used + # for vivtc below). Match the program form too, not just "import vapoursynth". + if [ -n "$VS_INC_DIR" ] && [ -f meson.build ] \ + && grep -qE "import vapoursynth|run_command\('vapoursynth'" meson.build; then VS_INC_DIR="$VS_INC_DIR" python3 - meson.build <<'PYEOF' import os, re, sys path = sys.argv[1]