From 0d0571471c2103ea535d0fe64f3d53877cde26c7 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 23 Aug 2012 22:50:27 -0700 Subject: ffmbc: clean up dependencies. --- Library/Formula/ffmbc.rb | 55 ++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 20 deletions(-) (limited to 'Library') diff --git a/Library/Formula/ffmbc.rb b/Library/Formula/ffmbc.rb index 6ed2f1cce..54f8dfab6 100644 --- a/Library/Formula/ffmbc.rb +++ b/Library/Formula/ffmbc.rb @@ -3,20 +3,33 @@ require 'formula' class Ffmbc < Formula homepage 'http://code.google.com/p/ffmbc/' url 'http://ffmbc.googlecode.com/files/FFmbc-0.7-rc7.tar.bz2' - md5 '547bb7b7963224dd66dffa8b25e623b3' + sha1 '79d125cd5d420e61120e2a66b018b0be096ad088' + + option "without-x264", "Disable H264 encoder" + option "without-faac", "Disable AAC encoder" + option "without-lame", "Disable MP3 encoder" + option "without-xvid", "Disable Xvid MPEG-4 video format" + + option "with-freetype", "Enable FreeType" + option "with-theora", "Enable Theora video format" + option "with-libvorbis", "Enable Vorbis audio format" + option "with-libogg", "Enable Ogg container format" + option "with-libvpx", "Enable VP8 video format" # manpages won't be built without texi2html depends_on 'texi2html' => :build if MacOS.mountain_lion? depends_on 'yasm' => :build - depends_on :x11 - depends_on 'x264' => :optional - depends_on 'faac' => :optional - depends_on 'lame' => :optional - depends_on 'theora' => :optional - depends_on 'libvorbis' => :optional - depends_on 'libogg' => :optional - depends_on 'libvpx' => :optional - depends_on 'xvid' => :optional + + depends_on 'x264' unless build.include? 'without-x264' + depends_on 'faac' unless build.include? 'without-faac' + depends_on 'lame' unless build.include? 'without-lame' + depends_on 'xvid' unless build.include? 'without-xvid' + + depends_on :freetype if build.include? 'with-freetype' + depends_on 'theora' if build.include? 'with-theora' + depends_on 'libvorbis' if build.include? 'with-libvorbis' + depends_on 'libogg' if build.include? 'with-libogg' + depends_on 'libvpx' if build.include? 'with-libvpx' def install args = ["--prefix=#{prefix}", @@ -24,16 +37,18 @@ class Ffmbc < Formula "--disable-shared", "--enable-gpl", "--enable-nonfree", - "--enable-libfreetype", "--cc=#{ENV.cc}"] - args << "--enable-libx264" if Formula.factory('x264').installed? - args << "--enable-libfaac" if Formula.factory('faac').installed? - args << "--enable-libmp3lame" if Formula.factory('lame').installed? - args << "--enable-libtheora" if Formula.factory('theora').installed? - 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 << "--enable-libx264" unless build.include? 'without-x264' + args << "--enable-libfaac" unless build.include? 'without-faac' + args << "--enable-libmp3lame" unless build.include? 'without-lame' + args << "--enable-libxvid" unless build.include? 'without-xvid' + + args << "--enable-libfreetype" if build.include? 'with-freetype' + args << "--enable-libtheora" if build.include? 'with-theora' + args << "--enable-libvorbis" if build.include? 'with-libvorbis' + args << "--enable-libogg" if build.include? 'with-libogg' + args << "--enable-libvpx" if build.include? 'with-libvpx' system "./configure", *args system "make" @@ -43,8 +58,8 @@ class Ffmbc < Formula mv "ffprobe", "ffprobe-bc" bin.install "ffmbc", "ffprobe-bc" cd "doc" do - mv "ffprobe.1", "ffprobe-bc.1" - man1.install "ffmbc.1", "ffprobe-bc.1" + #mv "ffprobe.1", "ffprobe-bc.1" + #man1.install "ffmbc.1", "ffprobe-bc.1" end end -- cgit v1.2.3