openrct2: import from homebrew/games

Closes #9759.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2017-02-08 04:59:19 -08:00
parent cd4ea38607
commit 514030eb37

36
Formula/openrct2.rb Normal file
View file

@ -0,0 +1,36 @@
class Openrct2 < Formula
desc "Open source re-implementation of RollerCoaster Tycoon 2"
homepage "https://openrct2.website"
url "https://github.com/OpenRCT2/OpenRCT2/archive/v0.0.6.tar.gz"
sha256 "c4e04359ef91bedf58fbd9da57c39ba59066840a467aa0346c4a6353b0ae33f5"
head "https://github.com/OpenRCT2/OpenRCT2.git", :branch => "develop"
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "jansson"
depends_on "libpng"
depends_on "libzip"
depends_on "openssl"
depends_on "sdl2"
depends_on "sdl2_ttf"
depends_on "speexdsp"
depends_on "freetype" # for sdl2_ttf
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
# By default OS X build only looks up data in app bundle Resources
libexec.install bin/"openrct2"
(bin/"openrct2").write <<-EOS.undent
#!/bin/bash
exec "#{libexec}/openrct2" "$@" "--openrct-data-path=#{pkgshare}"
EOS
end
test do
assert_match /OpenRCT2, v#{version}/, shell_output("#{bin}/openrct2 -v")
end
end