aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorTrung LĂȘ2011-11-08 13:32:18 +1100
committerMisty De Meo2011-12-11 22:35:26 -0600
commitf1bea3992c20e09c4dff271fa1d57f88e61cb86c (patch)
tree2d0e32ab73c2103fb042c813cd85a67caf884261 /Library
parente15e01c1ec24d31c56cbd54328568ba5e3fca01d (diff)
downloadhomebrew-f1bea3992c20e09c4dff271fa1d57f88e61cb86c.tar.bz2
New formula: ocp (open-cubic-player)
Closes #8503. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/ocp.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/Library/Formula/ocp.rb b/Library/Formula/ocp.rb
new file mode 100644
index 000000000..711eed67f
--- /dev/null
+++ b/Library/Formula/ocp.rb
@@ -0,0 +1,40 @@
+require "formula"
+
+class Ocp < Formula
+ url "http://downloads.sourceforge.net/project/opencubicplayer/ocp-0.1.21/ocp-0.1.21.tar.bz2"
+ md5 '558a6eacfadfd9c60c97a6e9c7f83f47'
+ homepage "http://sourceforge.net/p/opencubicplayer/home/"
+
+ depends_on "mad" unless ARGV.include? "--without-mad"
+ depends_on "flac" unless ARGV.include? "--without-flac"
+ depends_on "adplug" if ARGV.include? "--with-adplug"
+
+ def options
+ [
+ ["--without-mad", "disable mad mpeg audio support"],
+ ["--without-flac", "disable FLAC support"],
+ ["--with-adplug", "enable adplug support"],
+ ]
+ end
+
+ def install
+ ENV.deparallelize
+
+ args = ["--prefix=#{prefix}",
+ "--without-x11",
+ "--without-sdl",
+ "--without-desktop_file_install"]
+
+ if ARGV.include? "--without-mad"
+ args << "--without-mad"
+ elsif ARGV.include? "--without-flac"
+ args << "--without-flac"
+ elsif ARGV.include? "--with-adplug"
+ args << "--with-adplug"
+ end
+
+ system "./configure", *args
+ system "make"
+ system "make install"
+ end
+end