blob: fead1c4445c10386cb10f29e70c7997f91e08ba1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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('mplayer') || which('mplayer2') }
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.1.tar.gz'
sha1 'fe009b774eca8e8a8e3030a49cdd463f5b368b27'
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
|