From db15020d516c2d2ea36c10261a22a7da9c4a60ed Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 17 Jan 2026 21:05:17 +0100 Subject: Allow building without MPEG2 transcoding, and so without FFmpeg. --- cscript | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cscript') diff --git a/cscript b/cscript index 1d75abdf..e8b425af 100644 --- a/cscript +++ b/cscript @@ -34,6 +34,10 @@ import os import shutil + +option_defaults = { "mpeg2": True } + + def build_with_cpp17(target): return ( target.platform.startswith('osx') or @@ -54,7 +58,8 @@ def dependencies(target, options, for_package): if target.platform != 'linux' or target.distro != 'arch' or not for_package: # Use distro-provided FFmpeg and openjpeg on Arch (except when packaging), otherwise our own - deps.append(('ffmpeg', '693b3a8274ce407d0741d320849dc9433c748262', ffmpeg_options)) + if options['mpeg2']: + deps.append(('ffmpeg', '693b3a8274ce407d0741d320849dc9433c748262', ffmpeg_options)) deps.append(('openjpeg', 'ad8edaacd54a862940d0a77c41ecda5858b54d6e')) return deps @@ -68,6 +73,8 @@ def build(target, options, for_package, version): target.command('sudo pacman --noconfirm -U libdcp*.zst') else: cmd = './waf configure --disable-examples --disable-dumpimage --disable-benchmarks --prefix=%s' % target.directory + if not options['mpeg2']: + cmd += ' --disable-mpeg2-transcode' if target.platform == 'linux': cmd += ' --static' if target.distro != 'ubuntu' or not target.version in ('16.04', '22.04'): -- cgit v1.2.3