aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2011-10-25 12:38:57 -0500
committerAdam Vandenberg2011-11-17 20:05:41 -0800
commitc9fcbf09fcf9a870aec07d6fb01f18efbf62deda (patch)
tree65a30dc9890a8db2a2c5729df3a303c757118513
parentdae625d322f201f953628ee25ae0e86b6e170d21 (diff)
downloadhomebrew-c9fcbf09fcf9a870aec07d6fb01f18efbf62deda.tar.bz2
New formula: ffmbc
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/ffmbc.rb59
1 files changed, 59 insertions, 0 deletions
diff --git a/Library/Formula/ffmbc.rb b/Library/Formula/ffmbc.rb
new file mode 100644
index 000000000..6ba20d54f
--- /dev/null
+++ b/Library/Formula/ffmbc.rb
@@ -0,0 +1,59 @@
+require 'formula'
+
+class Ffmbc < Formula
+ url 'http://ffmbc.googlecode.com/files/FFmbc-0.7-rc4.tar.bz2'
+ homepage 'http://code.google.com/p/ffmbc/'
+ md5 '45f68c3096c2ad0321fd4bacb7127be6'
+
+ depends_on 'yasm' => :build
+ 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
+
+ def install
+ args = ["--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-shared",
+ "--enable-gpl",
+ "--enable-nonfree",
+ "--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?
+
+ system "./configure", *args
+ system "make"
+
+ # ffmbc's lib and bin names conflict with ffmpeg and libav
+ # This formula will only install the commandline tools
+ File.rename "ffprobe", "ffprobe-bc"
+ bin.install ["ffmbc","ffprobe-bc"]
+ Dir.chdir "doc"
+ File.rename "ffprobe.1", "ffprobe-bc.1"
+ man1.install ["ffmbc.1", "ffprobe-bc.1"]
+ end
+
+ def caveats
+ <<-EOS.undent
+ Due to naming conflicts with other FFmpeg forks, this formula installs
+ only static binaries - no shared libraries are built.
+
+ The `ffprobe` program has been renamed to `ffprobe-bc` to avoid name
+ conflicts with the FFmpeg executable of the same name.
+ EOS
+ end
+
+ def test
+ system "#{bin}/ffmbc -h"
+ end
+end