From 2a1cb2157d7f6b0b59590224c49fc69c60faab95 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 6 Feb 2017 10:26:50 +0000 Subject: [PATCH] cockatrice: import from homebrew/games. --- Formula/cockatrice.rb | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Formula/cockatrice.rb diff --git a/Formula/cockatrice.rb b/Formula/cockatrice.rb new file mode 100644 index 0000000000..040b9e4a7d --- /dev/null +++ b/Formula/cockatrice.rb @@ -0,0 +1,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 => "2017-01-20-Release", + :revision => "dab731656dd5856ca293e2660e142cc215acc66e" + version "2017-01-20" + head "https://github.com/Cockatrice/Cockatrice.git" + + bottle do + sha256 "28ca464cbca6f17fc400492e4de9469c2fc173d3606e69bb5b95e5e6a8e5a79d" => :sierra + sha256 "34452dcfaa59ae77aa4b99f6c53f61b6fdbccef073c7ee5cefdb7710123089b2" => :el_capitan + sha256 "08ec954750f83ec2f3ff9d79d078072830ed8e68aa32c8cbfbd15538e0197d2f" => :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