aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorValerii Hiora2013-05-23 21:21:23 +0300
committerAdam Vandenberg2013-05-29 11:12:02 -0700
commitae528e89795954db0d3d1cdc5404c635de08ce4d (patch)
treeeedc61401965cf6f13dd8ede85834f8739614ec4 /Library
parentc6f78ae8fdf746d67e8adbf1fb58b69d9bcd883d (diff)
downloadhomebrew-ae528e89795954db0d3d1cdc5404c635de08ce4d.tar.bz2
MPlayerShell 0.9.0
MPlayerShell is an improved visual experience for MPlayer on OS X. Closes #20019. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mplayershell.rb57
1 files changed, 57 insertions, 0 deletions
diff --git a/Library/Formula/mplayershell.rb b/Library/Formula/mplayershell.rb
new file mode 100644
index 000000000..08fa56fd2
--- /dev/null
+++ b/Library/Formula/mplayershell.rb
@@ -0,0 +1,57 @@
+require 'formula'
+require 'macos'
+
+class LionOrHigher < Requirement
+ fatal true
+
+ satisfy { MacOS.version >= :lion }
+
+ def message
+ "MPlayerShell requires OS X 10.7 (Lion) or newer"
+ end
+end
+
+class MplayerPresented < Requirement
+ fatal true
+ default_formula 'mplayer'
+
+ satisfy { which 'mplayer2' unless which 'mplayer'}
+
+ def message; <<-EOS.undent
+ MPlayerShell requires mplayer or mplayer2 to be installed.
+
+ You can use either
+ brew install mplayer
+ or
+ brew tap pigoz/mplayer2
+ brew install mplayer2
+ EOS
+ end
+end
+
+class Mplayershell < Formula
+ homepage 'https://github.com/donmelton/MPlayerShell'
+ url 'https://github.com/donmelton/MPlayerShell/archive/0.9.0.tar.gz'
+ sha1 '0ed15622abd020b1924aaead7f3e373f36c98a47'
+
+ head 'https://github.com/donmelton/MPlayerShell.git'
+
+ depends_on MplayerPresented
+ depends_on LionOrHigher
+ depends_on :xcode
+
+ def install
+ system "xcodebuild", "-project", "MPlayerShell.xcodeproj",
+ "-target", "mps",
+ "-configuration", "Release",
+ "clean", "build",
+ "SYMROOT=build",
+ "DSTROOT=build"
+ bin.install "build/Release/mps"
+ man1.install "Source/mps.1"
+ end
+
+ test do
+ system "#{bin}/mps"
+ end
+end