2017-02-08 10:33:12 +00:00
|
|
|
class Simutrans < Formula
|
|
|
|
desc "Transport simulator"
|
|
|
|
homepage "http://www.simutrans.com/"
|
|
|
|
head "https://github.com/aburch/simutrans.git"
|
|
|
|
|
2017-02-12 08:37:08 +00:00
|
|
|
stable do
|
|
|
|
url "https://downloads.sourceforge.net/project/simutrans/simutrans/120-1-3/simutrans-src-120-1-3.zip"
|
|
|
|
version "120.1.3"
|
|
|
|
sha256 "2d29b849fc39d25a0580091e1377270bddb2cae36c0fc32bd7c2d0f1d7ccfb84"
|
|
|
|
|
|
|
|
# Port Mac audio code from QTKit to AVFoundation
|
|
|
|
# Required since 10.12 SDK no longer includes QTKit.
|
|
|
|
# Submitted upstream: http://forum.simutrans.com/index.php?topic=16675.0
|
|
|
|
patch do
|
|
|
|
url "https://raw.githubusercontent.com/Homebrew/formula-patches/bea80842a6ccc5639341add0d8abbca2d49b04c2/simutrans/avfoundation.patch"
|
|
|
|
sha256 "9b9c9e6d89de49f152faaf584fcbbeec628bb07315b7c767e1f8b6791ad1e3ee"
|
|
|
|
end
|
|
|
|
end
|
2017-02-08 10:33:12 +00:00
|
|
|
|
2017-02-12 15:33:35 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "d07c63fcaa13fa5c670f27603cc0609a46da912374e30bd1e785329db26e7651" => :sierra
|
|
|
|
sha256 "36961b1c305e6c2081447e54a274d0e118df63eb771626be1dc511b9c34811ed" => :el_capitan
|
|
|
|
sha256 "200ce8fa5e825a6f49ac4f6d87a014bad0d6a4a16a7640a71261ac7680472ab1" => :yosemite
|
|
|
|
end
|
|
|
|
|
2017-02-12 08:37:08 +00:00
|
|
|
depends_on :macos => :lion
|
|
|
|
depends_on "libpng"
|
2017-02-08 10:33:12 +00:00
|
|
|
depends_on "sdl2"
|
|
|
|
|
|
|
|
resource "pak64" do
|
|
|
|
url "https://downloads.sourceforge.net/project/simutrans/pak64/120-1/simupak64-120-1-2.zip"
|
|
|
|
sha256 "125fa5c13a51bb0630ca651fddb8af06a823e8c4d4638bfa1bb2d89e92cc1d54"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "text" do
|
|
|
|
url "http://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip"
|
2017-02-12 08:37:08 +00:00
|
|
|
sha256 "202816f67750cfb9decdfca3bacfebbc5bfc3474c8703239418edc093ce3774d"
|
2017-02-08 10:33:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
args = %w[
|
|
|
|
BACKEND=sdl2
|
|
|
|
COLOUR_DEPTH=16
|
|
|
|
OSTYPE=mac
|
|
|
|
]
|
|
|
|
system "make", *args
|
|
|
|
libexec.install "build/default/sim" => "simutrans"
|
|
|
|
libexec.install Dir["simutrans/*"]
|
|
|
|
bin.write_exec_script libexec/"simutrans"
|
|
|
|
|
|
|
|
libexec.install resource("pak64")
|
|
|
|
(libexec/"text").install resource("text")
|
|
|
|
|
2017-02-12 08:37:08 +00:00
|
|
|
system "make", "makeobj", *args
|
|
|
|
bin.install "build/default/makeobj/makeobj"
|
2017-02-08 10:33:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/simutrans", "--help"
|
|
|
|
end
|
|
|
|
end
|