2011-10-25 17:38:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ffmbc < Formula
|
|
|
|
homepage 'http://code.google.com/p/ffmbc/'
|
2012-03-20 01:42:30 +00:00
|
|
|
url 'http://ffmbc.googlecode.com/files/FFmbc-0.7-rc7.tar.bz2'
|
|
|
|
md5 '547bb7b7963224dd66dffa8b25e623b3'
|
2011-10-25 17:38:57 +00:00
|
|
|
|
2012-08-14 22:29:49 +00:00
|
|
|
# manpages won't be built without texi2html
|
|
|
|
depends_on 'texi2html' => :build if MacOS.mountain_lion?
|
2011-10-25 17:38:57 +00:00
|
|
|
depends_on 'yasm' => :build
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :x11
|
2011-10-25 17:38:57 +00:00
|
|
|
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",
|
2011-12-30 21:41:48 +00:00
|
|
|
"--enable-libfreetype",
|
2011-10-25 17:38:57 +00:00
|
|
|
"--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
|
2012-02-13 06:41:23 +00:00
|
|
|
mv "ffprobe", "ffprobe-bc"
|
|
|
|
bin.install "ffmbc", "ffprobe-bc"
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "doc" do
|
|
|
|
mv "ffprobe.1", "ffprobe-bc.1"
|
|
|
|
man1.install "ffmbc.1", "ffprobe-bc.1"
|
|
|
|
end
|
2011-10-25 17:38:57 +00:00
|
|
|
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
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/ffmbc", "-h"
|
2011-10-25 17:38:57 +00:00
|
|
|
end
|
|
|
|
end
|