forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mupen64plus.rb
73 lines (60 loc) · 2.39 KB
/
mupen64plus.rb
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
class Mupen64plus < Formula
homepage "https://code.google.com/p/mupen64plus/"
url "https://github.com/mupen64plus/mupen64plus-core/releases/download/2.5/mupen64plus-bundle-src-2.5.tar.gz"
sha256 "9c75b9d826f2d24666175f723a97369b3a6ee159b307f7cc876bbb4facdbba66"
bottle do
cellar :any
sha256 "fcc0f6c7b4b125d5d00eaf22870aaa1315900913007703baab07848e71fd7b36" => :yosemite
sha256 "a2535a29684c1cc94f16fac22ad209490b9b8319f7bfa189c81d716ee206e51a" => :mavericks
sha256 "722bdaeb709fa4e4e2defae1f5f92ce15c9c19a2ed1e01e182c5c165936d69a3" => :mountain_lion
end
option "without-osd", "Disables the On Screen Display"
option "with-new-dynarec", "Replace dynamic recompiler with Ari64\"s experimental dynarec"
option "with-src", "Build with libsamplerate"
option "with-speex", "Build with libspeexdsp"
deprecated_option "disable-osd" => "without-osd"
deprecated_option "enable-new-dynarec" => "with-new-dynarec"
depends_on "pkg-config" => :build
depends_on "libpng"
depends_on "sdl"
depends_on "freetype" if build.with? "osd"
depends_on "libsamplerate" if build.with? "src"
depends_on "speex" => :optional
resource "rom" do
url "https://github.com/mupen64plus/mupen64plus-rom/raw/76ef14c876ed036284154444c7bdc29d19381acc/m64p_test_rom.v64"
sha256 "b5fe9d650a67091c97838386f5102ad94c79232240f9c5bcc72334097d76224c"
end
def install
common_args = ["install", "PREFIX=#{prefix}", "INSTALL_STRIP_FLAG=-S"]
cd "source/mupen64plus-core/projects/unix" do
args = common_args.dup
args << "OSD=0" if build.without? "osd"
args << "NEW_DYNAREC=1" if build.with? "new-dynarec"
system "make", *args
end
cd "source/mupen64plus-audio-sdl/projects/unix" do
args = common_args.dup
args << "NO_SRC=1" if build.without? "src"
args << "NO_SPEEX=1" if build.without? "speex"
system "make", *args
end
cd "source/mupen64plus-input-sdl/projects/unix" do
system "make", *common_args
end
cd "source/mupen64plus-rsp-hle/projects/unix" do
system "make", *common_args
end
cd "source/mupen64plus-video-rice/projects/unix" do
system "make", *common_args
end
cd "source/mupen64plus-ui-console/projects/unix" do
system "make", *common_args
end
end
test do
resource("rom").stage do
system bin/"mupen64plus", "--testshots", "1",
"m64p_test_rom.v64"
end
end
end