2011-10-25 17:38:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Ffmbc < Formula
|
|
|
|
homepage 'http://code.google.com/p/ffmbc/'
|
2014-03-05 07:22:08 +00:00
|
|
|
url 'https://ffmbc.googlecode.com/files/FFmbc-0.7-rc8.tar.bz2'
|
2013-03-22 03:51:11 +00:00
|
|
|
sha1 '85a9673ac82a698bb96057fe027222efe6ebae28'
|
2012-08-24 05:50:27 +00:00
|
|
|
|
2013-02-02 21:54:47 +00:00
|
|
|
option "without-x264", "Disable H.264 encoder"
|
2012-08-24 05:50:27 +00:00
|
|
|
option "without-lame", "Disable MP3 encoder"
|
2013-02-02 21:54:47 +00:00
|
|
|
option "without-xvid", "Disable Xvid MPEG-4 video encoder"
|
2011-10-25 17:38:57 +00:00
|
|
|
|
2012-08-14 22:29:49 +00:00
|
|
|
# manpages won't be built without texi2html
|
2012-09-05 04:04:01 +00:00
|
|
|
depends_on 'texi2html' => :build if MacOS.version >= :mountain_lion
|
2011-10-25 17:38:57 +00:00
|
|
|
depends_on 'yasm' => :build
|
2012-08-24 05:50:27 +00:00
|
|
|
|
2013-02-02 21:54:47 +00:00
|
|
|
depends_on 'x264' => :recommended
|
|
|
|
depends_on 'faac' => :recommended
|
|
|
|
depends_on 'lame' => :recommended
|
|
|
|
depends_on 'xvid' => :recommended
|
2012-08-24 05:50:27 +00:00
|
|
|
|
2013-02-02 21:54:47 +00:00
|
|
|
depends_on :freetype => :optional
|
|
|
|
depends_on 'theora' => :optional
|
|
|
|
depends_on 'libvorbis' => :optional
|
|
|
|
depends_on 'libogg' => :optional
|
|
|
|
depends_on 'libvpx' => :optional
|
2011-10-25 17:38:57 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-shared",
|
|
|
|
"--enable-gpl",
|
|
|
|
"--enable-nonfree",
|
|
|
|
"--cc=#{ENV.cc}"]
|
|
|
|
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--enable-libx264" if build.with? 'x264'
|
|
|
|
args << "--enable-libfaac" if build.with? 'faac'
|
|
|
|
args << "--enable-libmp3lame" if build.with? 'lame'
|
|
|
|
args << "--enable-libxvid" if build.with? 'xvid'
|
2012-08-24 05:50:27 +00:00
|
|
|
|
2013-02-02 21:54:47 +00:00
|
|
|
args << "--enable-libfreetype" if build.with? 'freetype'
|
|
|
|
args << "--enable-libtheora" if build.with? 'theora'
|
|
|
|
args << "--enable-libvorbis" if build.with? 'libvorbis'
|
|
|
|
args << "--enable-libogg" if build.with? 'libogg'
|
|
|
|
args << "--enable-libvpx" if build.with? 'libvpx'
|
2011-10-25 17:38:57 +00:00
|
|
|
|
|
|
|
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
|
2012-08-24 05:50:27 +00:00
|
|
|
#mv "ffprobe.1", "ffprobe-bc.1"
|
|
|
|
#man1.install "ffmbc.1", "ffprobe-bc.1"
|
2012-02-21 06:04:21 +00:00
|
|
|
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
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/ffmbc", "-h"
|
2011-10-25 17:38:57 +00:00
|
|
|
end
|
|
|
|
end
|