diff options
| author | Charlie Sharpsteen | 2011-11-09 12:02:42 -0800 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-11-09 12:02:42 -0800 |
| commit | cdcb773c4477ff4900011d673dc284e06db932af (patch) | |
| tree | 1143a2b8c6981dc5f55b7161c8d461e6ae48e1ed /Library/Formula/ffmpeg.rb | |
| parent | 51fc7e7af27b1988db95f8fcb416850301840160 (diff) | |
| download | homebrew-cdcb773c4477ff4900011d673dc284e06db932af.tar.bz2 | |
FFmpeg: Add option to build ffplay
The ffplay binary is only built by default if SDL is present---which made
obtaining it a hit-and-miss operation for some users. A new option,
`--with-ffplay`, has been added that will cause ffplay to be built.
ffplay will be explicitly disabled if the option is not invoked.
Fixes #6880.
Diffstat (limited to 'Library/Formula/ffmpeg.rb')
| -rw-r--r-- | Library/Formula/ffmpeg.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb index 728057b7c..6ffe651d1 100644 --- a/Library/Formula/ffmpeg.rb +++ b/Library/Formula/ffmpeg.rb @@ -1,5 +1,9 @@ require 'formula' +def ffplay? + ARGV.include? '--with-ffplay' +end + class Ffmpeg < Formula url 'http://ffmpeg.org/releases/ffmpeg-0.8.6.tar.bz2' homepage 'http://ffmpeg.org/' @@ -9,6 +13,13 @@ class Ffmpeg < Formula fails_with_llvm 'Dies during compilation of motionpixels_tablegen' + def options + [ + ["--with-tools", "Install additional FFmpeg tools."], + ["--with-ffplay", "Build ffplay."] + ] + end + depends_on 'yasm' => :build depends_on 'x264' => :optional depends_on 'faac' => :optional @@ -19,11 +30,7 @@ class Ffmpeg < Formula depends_on 'libvpx' => :optional depends_on 'xvid' => :optional - def options - [ - ["--with-tools", "Install additional FFmpeg tools."] - ] - end + depends_on 'sdl' if ffplay? def install args = ["--prefix=#{prefix}", @@ -41,6 +48,7 @@ class Ffmpeg < Formula args << "--enable-libvorbis" if Formula.factory('libvorbis').installed? args << "--enable-libvpx" if Formula.factory('libvpx').installed? args << "--enable-libxvid" if Formula.factory('xvid').installed? + args << "--disable-ffplay" unless ffplay? # For 32-bit compilation under gcc 4.2, see: # http://trac.macports.org/ticket/20938#comment:22 |
