update ffmpeg to avoid building for non-web environments

This commit is contained in:
Danny McClanahan
2022-05-05 20:50:50 -04:00
parent 1b793c0b72
commit ed26276e45

View File

@@ -74,6 +74,8 @@ class Ffmpeg(AutotoolsPackage):
variant('postproc', default=True, description='Build libpostproc')
variant('stripping', default=True, description='Build stripped binaries')
variant('asm', default=True, description='Build handwritten assembly')
variant('web-only', when='%emscripten', default=True,
description='Build for the web only, and disable building command-line programs')
depends_on('alsa-lib', when='+alsa')
depends_on('libiconv')
@@ -141,7 +143,7 @@ def enable_or_disable_meta(self, variant, options):
patch('recognize-emcc.patch', when='%emscripten')
@when('%emscripten')
@when('~web-only%emscripten')
def install(self, spec, prefix):
super(Ffmpeg, self).install(spec, prefix)
copy('ffprobe_g.wasm', prefix.bin)
@@ -164,6 +166,11 @@ def configure_args(self):
# when building programs it fails saying the output doesn't have
# a recognized binary format.
])
if '+web-only' in self.spec:
config_args.extend([
'--disable-programs',
'--extra-cflags=-sENVIRONMENT=web',
])
# '+X' meta variant #