forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfreeciv.rb
37 lines (30 loc) · 952 Bytes
/
freeciv.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
require 'formula'
class Freeciv < Formula
homepage 'http://freeciv.wikia.com'
url 'http://downloads.sourceforge.net/project/freeciv/Freeciv%202.3/2.3.1/freeciv-2.3.1.tar.bz2'
md5 'efce9b2cd8b7a36017f1ebce59236dcb'
head 'svn://svn.gna.org/svn/freeciv/trunk', :using => :svn
def options
[['--disable-nls', 'Disable NLS support.']]
end
depends_on 'pkg-config' => :build
depends_on 'sdl'
depends_on 'sdl_image'
depends_on 'sdl_mixer'
depends_on :x11
depends_on "gettext" unless ARGV.include? "--disable-nls"
def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"]
unless ARGV.include? '--disable-nls'
gettext = Formula.factory('gettext')
args << "CFLAGS=-I#{gettext.include}"
args << "LDFLAGS=-L#{gettext.lib}"
end
system "./configure", *args
system "make install"
end
def test
system "#{bin}/freeciv-server -v"
end
end