Updated ffmpeg formula

* now supports, x264, faac, faad, lame optional dependencies.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

* Also silenced a warning on x86_64.
master
Kyle Fuller 2010-01-14 20:56:04 +00:00 committed by Adam Vandenberg
parent 37aab7182c
commit 120f5ba11d
1 changed files with 26 additions and 8 deletions

View File

@ -4,17 +4,35 @@ class Ffmpeg <Formula
head 'svn://svn.ffmpeg.org/ffmpeg/trunk', :revision => 22585 head 'svn://svn.ffmpeg.org/ffmpeg/trunk', :revision => 22585
homepage 'http://ffmpeg.org/' homepage 'http://ffmpeg.org/'
depends_on 'x264' depends_on 'x264' => :optional
depends_on 'faac' => :optional
depends_on 'faad2' => :optional
depends_on 'lame' => :optional
def install def install
configure_flags = [ "--prefix=#{prefix}", configure_flags = [
"--disable-debug", "--prefix=#{prefix}",
"--enable-shared", "--disable-debug",
"--enable-pthreads", "--enable-shared",
"--enable-nonfree", "--enable-pthreads",
"--enable-gpl", "--enable-nonfree",
"--enable-libx264"] "--enable-gpl"
]
configure_flags << "--enable-libx264" if Formula.factory('x264').installed?
configure_flags << "--enable-libfaac" if Formula.factory('faac').installed?
configure_flags << "--enable-libfaad" if Formula.factory('faad2').installed?
configure_flags << "--enable-libmp3lame" if Formula.factory('lame').installed?
system "./configure", *configure_flags system "./configure", *configure_flags
inreplace 'config.mak' do |s|
if MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
shflags = s.get_make_var 'SHFLAGS'
s.change_make_var! 'SHFLAGS', shflags.gsub!(' -Wl,-read_only_relocs,suppress', '')
end
end
system "make install" system "make install"
end end
end end