diff --git a/Formula/openrct2.rb b/Formula/openrct2.rb new file mode 100644 index 0000000000..305c0717e4 --- /dev/null +++ b/Formula/openrct2.rb @@ -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