diff options
author | 2013-03-09 11:46:33 +0000 | |
---|---|---|
committer | 2013-03-09 11:46:33 +0000 | |
commit | 4e14a79daad55c9e32adb47c55297dc279d095e2 (patch) | |
tree | 22e5a38af784ce3d93f72217e89eea3a2a742953 /media-video | |
parent | keyword amd64-fbsd, untested because beta18 has been masked recently and this... (diff) | |
download | gentoo-2-4e14a79daad55c9e32adb47c55297dc279d095e2.tar.gz gentoo-2-4e14a79daad55c9e32adb47c55297dc279d095e2.tar.bz2 gentoo-2-4e14a79daad55c9e32adb47c55297dc279d095e2.zip |
build up configure options on the ffuse variable that will be fed to use_enable, use_enable works fine and avoids having features disappearing because the default behavior changed; factorize some code
(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/ffmpeg/ChangeLog | 7 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-9999.ebuild | 75 |
2 files changed, 40 insertions, 42 deletions
diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog index d591bc55cc5b..3b236cc3da67 100644 --- a/media-video/ffmpeg/ChangeLog +++ b/media-video/ffmpeg/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-video/ffmpeg # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.614 2013/03/04 12:12:35 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.615 2013/03/09 11:46:33 aballier Exp $ + + 09 Mar 2013; Alexis Ballier <aballier@gentoo.org> ffmpeg-9999.ebuild: + build up configure options on the ffuse variable that will be fed to + use_enable, use_enable works fine and avoids having features disappearing + because the default behavior changed; factorize some code 04 Mar 2013; Alexis Ballier <aballier@gentoo.org> -ffmpeg-1.0.4.ebuild, -ffmpeg-1.1.2.ebuild: diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index a799e4cb6ed9..a8d66bdaf649 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.120 2013/03/04 12:09:04 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-9999.ebuild,v 1.121 2013/03/09 11:46:33 aballier Exp $ EAPI="4" @@ -141,73 +141,66 @@ src_configure() { # Set to --enable-version3 if (L)GPL-3 is required local version3="" - # enabled by default - for i in debug doc network zlib; do - use ${i} || myconf="${myconf} --disable-${i}" - done - use bzip2 || myconf="${myconf} --disable-bzlib" - use sdl || myconf="${myconf} --disable-ffplay" - - use cpudetection || myconf="${myconf} --disable-runtime-cpudetect" - use openssl && myconf="${myconf} --enable-openssl --enable-nonfree" - # disabled by default - for i in gnutls iconv vaapi vdpau ; do - use $i && myconf="${myconf} --enable-$i" - done + # options to use as use_enable in the foo[:bar] form. + # This will feed configure with $(use_enable foo bar) + # or $(use_enable foo foo) if no :bar is set. + local ffuse="bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls + iconv network openssl sdl:ffplay vaapi vdpau zlib" + use openssl && myconf="${myconf} --enable-nonfree" # Encoders if use encode then - use mp3 && myconf="${myconf} --enable-libmp3lame" - use aac && { myconf="${myconf} --enable-libvo-aacenc" ; version3=" --enable-version3" ; } - use amr && { myconf="${myconf} --enable-libvo-amrwbenc" ; version3=" --enable-version3" ; } - for i in theora twolame x264 xvid; do - use ${i} && myconf="${myconf} --enable-lib${i}" + ffuse="${ffuse} aac:libvo-aacenc amr:libvo-amrwbenc mp3:libmp3lame fdk:libfdk-aac" + for i in aacplus faac theora twolame x264 xvid; do + ffuse="${ffuse} ${i}:lib${i}" done - use aacplus && myconf="${myconf} --enable-libaacplus --enable-nonfree" - use faac && myconf="${myconf} --enable-libfaac --enable-nonfree" - use fdk && myconf="${myconf} --enable-libfdk-aac --enable-nonfree" + + # Licensing. + if use aac || use amr ; then + version3=" --enable-version3" + fi + if use aacplus || use faac || use fdk ; then + myconf="${myconf} --enable-nonfree" + fi else myconf="${myconf} --disable-encoders" fi # libavdevice options - for i in cdio iec61883 ; do - use ${i} && myconf="${myconf} --enable-lib${i}" - done - use ieee1394 && myconf="${myconf} --enable-libdc1394" - use libcaca && myconf="${myconf} --enable-libcaca" - use openal && myconf="${myconf} --enable-openal" + ffuse="${ffuse} cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal" + # Indevs use v4l || myconf="${myconf} --disable-indev=v4l2" for i in alsa oss jack ; do use ${i} || myconf="${myconf} --disable-indev=${i}" done - use X && myconf="${myconf} --enable-x11grab" - use pulseaudio && myconf="${myconf} --enable-libpulse" - use libv4l && myconf="${myconf} --enable-libv4l2" + ffuse="${ffuse} libv4l:libv4l2 pulseaudio:libpulse X:x11grab" + # Outdevs for i in alsa oss sdl ; do use ${i} || myconf="${myconf} --disable-outdev=${i}" done + # libavfilter options - for i in frei0r fontconfig libass ; do - use ${i} && myconf="${myconf} --enable-${i}" - done - use truetype && myconf="${myconf} --enable-libfreetype" - use flite && myconf="${myconf} --enable-libflite" + ffuse="${ffuse} flite:libflite frei0r fontconfig libass truetype:libfreetype" + # libswresample options - use libsoxr && myconf="${myconf} --enable-libsoxr" + ffuse="${ffuse} libsoxr" # Threads; we only support pthread for now but ffmpeg supports more - use threads && myconf="${myconf} --enable-pthreads" + ffuse="${ffuse} threads:pthreads" # Decoders - use amr && { myconf="${myconf} --enable-libopencore-amrwb --enable-libopencore-amrnb" ; version3=" --enable-version3" ; } + ffuse="${ffuse} amr:libopencore-amrwb amr:libopencore-amrnb jpeg2k:libopenjpeg" + use amr && version3=" --enable-version3" for i in bluray celt gsm modplug opus rtmp schroedinger speex vorbis vpx; do - use ${i} && myconf="${myconf} --enable-lib${i}" + ffuse="${ffuse} ${i}:lib${i}" + done + + for i in ${ffuse} ; do + myconf="${myconf} $(use_enable ${i%:*} ${i#*:})" done - use jpeg2k && myconf="${myconf} --enable-libopenjpeg" # CPU features for i in ${CPU_FEATURES}; do |