Skip to content
This repository
Browse code

New formula: ffmbc

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
commit c9fcbf09fcf9a870aec07d6fb01f18efbf62deda 1 parent dae625d
Misty De Meo authored October 25, 2011 adamv committed November 17, 2011

Showing 1 changed file with 59 additions and 0 deletions. Show diff stats Hide diff stats

  1. 59  Library/Formula/ffmbc.rb
59  Library/Formula/ffmbc.rb
... ...
@@ -0,0 +1,59 @@
  1
+require 'formula'
  2
+
  3
+class Ffmbc < Formula
  4
+  url 'http://ffmbc.googlecode.com/files/FFmbc-0.7-rc4.tar.bz2'
  5
+  homepage 'http://code.google.com/p/ffmbc/'
  6
+  md5 '45f68c3096c2ad0321fd4bacb7127be6'
  7
+
  8
+  depends_on 'yasm' => :build
  9
+  depends_on 'x264' => :optional
  10
+  depends_on 'faac' => :optional
  11
+  depends_on 'lame' => :optional
  12
+  depends_on 'theora' => :optional
  13
+  depends_on 'libvorbis' => :optional
  14
+  depends_on 'libogg' => :optional
  15
+  depends_on 'libvpx' => :optional
  16
+  depends_on 'xvid' => :optional
  17
+
  18
+  def install
  19
+    args = ["--prefix=#{prefix}",
  20
+            "--disable-debug",
  21
+            "--disable-shared",
  22
+            "--enable-gpl",
  23
+            "--enable-nonfree",
  24
+            "--cc=#{ENV.cc}"]
  25
+
  26
+    args << "--enable-libx264" if Formula.factory('x264').installed?
  27
+    args << "--enable-libfaac" if Formula.factory('faac').installed?
  28
+    args << "--enable-libmp3lame" if Formula.factory('lame').installed?
  29
+    args << "--enable-libtheora" if Formula.factory('theora').installed?
  30
+    args << "--enable-libvorbis" if Formula.factory('libvorbis').installed?
  31
+    args << "--enable-libvpx" if Formula.factory('libvpx').installed?
  32
+    args << "--enable-libxvid" if Formula.factory('xvid').installed?
  33
+
  34
+    system "./configure", *args
  35
+    system "make"
  36
+
  37
+    # ffmbc's lib and bin names conflict with ffmpeg and libav
  38
+    # This formula will only install the commandline tools
  39
+    File.rename "ffprobe", "ffprobe-bc"
  40
+    bin.install ["ffmbc","ffprobe-bc"]
  41
+    Dir.chdir "doc"
  42
+    File.rename "ffprobe.1", "ffprobe-bc.1"
  43
+    man1.install ["ffmbc.1", "ffprobe-bc.1"]
  44
+  end
  45
+
  46
+  def caveats
  47
+    <<-EOS.undent
  48
+      Due to naming conflicts with other FFmpeg forks, this formula installs
  49
+      only static binaries - no shared libraries are built.
  50
+
  51
+      The `ffprobe` program has been renamed to `ffprobe-bc` to avoid name
  52
+      conflicts with the FFmpeg executable of the same name.
  53
+    EOS
  54
+  end
  55
+
  56
+  def test
  57
+    system "#{bin}/ffmbc -h"
  58
+  end
  59
+end

0 notes on commit c9fcbf0

Please sign in to comment.
Something went wrong with that request. Please try again.