forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenttd.rb
63 lines (51 loc) · 2.35 KB
/
openttd.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class Openttd < Formula
desc "Simulation game based upon Transport Tycoon Deluxe"
homepage "https://www.openttd.org/"
url "https://binaries.openttd.org/releases/1.5.1/openttd-1.5.1-source.tar.xz"
sha256 "c98e76e57de213c8d2ccafa4fa2e02b91c031b2487639ccf9b85c725c1428f49"
head "git://git.openttd.org/openttd/trunk.git"
bottle do
sha256 "dba77231d9a1b4034d3310afea8ea20f42888509673e2ea611024263b3c11e8b" => :yosemite
sha256 "2d5fd44fa7461aa73bc9e9f390656f648070e16c53c4d64009410e438ad0915f" => :mavericks
sha256 "addd02b6050fb3422021d39a08f9075572e79106e863e01a22114af90ea9d13c" => :mountain_lion
end
depends_on "lzo"
depends_on "xz"
depends_on "pkg-config" => :build
resource "opengfx" do
url "https://bundles.openttdcoop.org/opengfx/releases/0.5.2/opengfx-0.5.2.zip"
sha256 "19be61f1cb04cbb3cb9602f0b8eb6e6f56ecbefbfdd6e0e03f9579e5a5c1cbc8"
end
resource "opensfx" do
url "https://bundles.openttdcoop.org/opensfx/releases/0.2.3/opensfx-0.2.3.zip"
sha256 "3574745ac0c138bae53b56972591db8d778ad9faffd51deae37a48a563e71662"
end
resource "openmsx" do
url "https://bundles.openttdcoop.org/openmsx/releases/0.3.1/openmsx-0.3.1.zip"
sha256 "92e293ae89f13ad679f43185e83fb81fb8cad47fe63f4af3d3d9f955130460f5"
end
# Ensures a deployment target is not set on 10.9:
# https://bugs.openttd.org/task/6295
patch :p0 do
url "https://trac.macports.org/export/117147/trunk/dports/games/openttd/files/patch-config.lib-remove-deployment-target.diff"
sha256 "95c3d54a109c93dc88a693ab3bcc031ced5d936993f3447b875baa50d4e87dac"
end
def install
system "./configure", "--prefix-dir=#{prefix}"
system "make", "bundle"
(buildpath/"bundle/OpenTTD.app/Contents/Resources/data/opengfx").install resource("opengfx")
(buildpath/"bundle/OpenTTD.app/Contents/Resources/data/opensfx").install resource("opensfx")
(buildpath/"bundle/OpenTTD.app/Contents/Resources/gm/openmsx").install resource("openmsx")
prefix.install "bundle/OpenTTD.app"
end
def caveats; <<-EOS.undent
OpenTTD.app installed to: #{prefix}
If you have access to the sound and graphics files from the original
Transport Tycoon Deluxe, you can install them by following the
instructions in section 4.1 of #{prefix}/readme.txt
EOS
end
test do
File.executable? prefix/"OpenTTD.app/Contents/MacOS/openttd"
end
end