homebrew-core/Formula/wesnoth.rb
2017-02-08 10:12:34 +00:00

50 lines
1.7 KiB
Ruby

class Wesnoth < Formula
desc "Single- and multi-player turn-based strategy game"
homepage "http://www.wesnoth.org/"
url "https://downloads.sourceforge.net/project/wesnoth/wesnoth-1.12/wesnoth-1.12.4/wesnoth-1.12.4.tar.bz2"
sha256 "bf525060da4201f1e62f861ed021f13175766e074a8a490b995052453df51ea7"
head "https://github.com/wesnoth/wesnoth.git"
bottle do
sha256 "f5152f725924178af6172de9dc712470195d4df061e1e17556a4610bdfa895ca" => :sierra
sha256 "ff711ce841b40bf9737ff9284edf505c4784aec3617dee3faae01ef85ddeea3b" => :el_capitan
sha256 "9808f9d078a039a3d95f2f1313c97de24036c6f5766181c7ccd07cb87916cd04" => :yosemite
end
option "with-ccache", "Speeds recompilation, convenient for beta testers"
option "with-debug", "Build with debugging symbols"
depends_on "scons" => :build
depends_on "gettext" => :build
depends_on "ccache" => :optional
depends_on "fribidi"
depends_on "boost"
depends_on "libpng"
depends_on "fontconfig"
depends_on "cairo"
depends_on "pango"
depends_on "sdl"
depends_on "sdl_image" # Must have png support
depends_on "sdl_mixer" => "with-libvorbis" # The music is in .ogg format
depends_on "sdl_net"
depends_on "sdl_ttf"
def install
args = %W[prefix=#{prefix} docdir=#{doc} mandir=#{man} fifodir=#{var}/run/wesnothd gettextdir=#{Formula["gettext"].opt_prefix}]
args << "OS_ENV=true"
args << "install"
args << "wesnoth"
args << "wesnothd"
args << "-j#{ENV.make_jobs}"
args << "ccache=true" if build.with? "ccache"
args << "build=debug" if build.with? "debug"
scons *args
end
test do
system bin/"wesnoth", "-p", pkgshare/"data/campaigns/tutorial/", testpath
end
end