forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcockatrice.rb
48 lines (41 loc) · 1.43 KB
/
cockatrice.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
class Cockatrice < Formula
desc "Virtual tabletop for multiplayer card games"
homepage "https://github.com/Cockatrice/Cockatrice"
url "https://github.com/Cockatrice/Cockatrice.git",
:tag => "2016-10-30-Release",
:revision => "3498b16e01093dc21e2b2aaaf10365d13bb5cb1c"
version "2016-10-30"
head "https://github.com/Cockatrice/Cockatrice.git"
bottle do
sha256 "1c292441c9c6b920f6fbd4f59499c4538a34055e9d62ac80f27782bbff33791e" => :sierra
sha256 "a4ff1df9421f2c3f37852c9ce625140ae6fb13c4716841215aa0e9188a47ac5b" => :el_capitan
sha256 "a7c18ee10956407ec01d26aaad85d4498f1875520ae2980bdaee023144dea426" => :yosemite
end
option "with-server", "Build `servatrice` for running game servers"
depends_on :macos => :mavericks
depends_on "cmake" => :build
depends_on "protobuf"
if build.with? "server"
depends_on "qt5" => "with-mysql"
else
depends_on "qt5"
end
fails_with :clang do
build 503
cause "Undefined symbols for architecture x86_64: google::protobuf"
end
def install
mkdir "build" do
args = std_cmake_args
args << "-DWITH_SERVER=ON" if build.with? "server"
system "cmake", "..", *args
system "make", "install"
prefix.install Dir["release/*.app"]
end
doc.install Dir["doc/usermanual/*"]
end
test do
(prefix/"cockatrice.app/Contents/MacOS/cockatrice").executable?
(prefix/"oracle.app/Contents/MacOS/oracle").executable?
end
end