ffmpeg package: add libx264 variant; fix license variants. (#28808)
Prior to this patch, setting +gpl did not pass --enable-gpl and did not allow GPL-only codecs to be enabled.
This commit is contained in:
parent
fc7b7cfeab
commit
b840557d64
@ -65,6 +65,7 @@ class Ffmpeg(AutotoolsPackage):
|
|||||||
variant('openssl', default=False, description='needed for https support')
|
variant('openssl', default=False, description='needed for https support')
|
||||||
variant('sdl2', default=False, description='sdl2 support')
|
variant('sdl2', default=False, description='sdl2 support')
|
||||||
variant('shared', default=True, description='build shared libraries')
|
variant('shared', default=True, description='build shared libraries')
|
||||||
|
variant('libx264', default=False, description='H.264 encoding')
|
||||||
|
|
||||||
depends_on('alsa-lib', when='platform=linux')
|
depends_on('alsa-lib', when='platform=linux')
|
||||||
depends_on('libiconv')
|
depends_on('libiconv')
|
||||||
@ -92,6 +93,7 @@ class Ffmpeg(AutotoolsPackage):
|
|||||||
depends_on('snappy', when='+libsnappy')
|
depends_on('snappy', when='+libsnappy')
|
||||||
depends_on('speex', when='+libspeex')
|
depends_on('speex', when='+libspeex')
|
||||||
depends_on('xz', when='+lzma')
|
depends_on('xz', when='+lzma')
|
||||||
|
depends_on('x264', when='+libx264')
|
||||||
|
|
||||||
# TODO: enable when libxml2 header issue is resolved
|
# TODO: enable when libxml2 header issue is resolved
|
||||||
# conflicts('+libxml2', when='@:3')
|
# conflicts('+libxml2', when='@:3')
|
||||||
@ -162,15 +164,19 @@ def configure_args(self):
|
|||||||
|
|
||||||
variant_opts = [
|
variant_opts = [
|
||||||
'bzlib',
|
'bzlib',
|
||||||
|
'gpl',
|
||||||
'libmp3lame',
|
'libmp3lame',
|
||||||
'libopenjpeg',
|
'libopenjpeg',
|
||||||
'libopus',
|
'libopus',
|
||||||
'libspeex',
|
'libspeex',
|
||||||
'libvorbis',
|
'libvorbis',
|
||||||
'libvpx',
|
'libvpx',
|
||||||
|
'libx264',
|
||||||
'avresample',
|
'avresample',
|
||||||
|
'nonfree',
|
||||||
'openssl',
|
'openssl',
|
||||||
'shared',
|
'shared',
|
||||||
|
'version3',
|
||||||
]
|
]
|
||||||
|
|
||||||
if spec.satisfies('@2.0:'):
|
if spec.satisfies('@2.0:'):
|
||||||
|
19
var/spack/repos/builtin/packages/x264/package.py
Normal file
19
var/spack/repos/builtin/packages/x264/package.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
from spack.directives import depends_on, version
|
||||||
|
|
||||||
|
|
||||||
|
class X264(AutotoolsPackage):
|
||||||
|
"""Software library and application for encoding video streams"""
|
||||||
|
|
||||||
|
homepage = "https://www.videolan.org/developers/x264.html"
|
||||||
|
git = "https://code.videolan.org/videolan/x264.git"
|
||||||
|
|
||||||
|
version("20210613", commit="5db6aa6cab1b146e07b60cc1736a01f21da01154")
|
||||||
|
|
||||||
|
depends_on("nasm")
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
return ["--enable-shared", "--enable-pic"]
|
Loading…
Reference in New Issue
Block a user