homebrew-core/Formula/wesnoth.rb
2018-03-21 13:41:19 -07:00

53 lines
1.8 KiB
Ruby

class Wesnoth < Formula
desc "Single- and multi-player turn-based strategy game"
homepage "https://www.wesnoth.org/"
url "https://downloads.sourceforge.net/project/wesnoth/wesnoth-1.12/wesnoth-1.12.6/wesnoth-1.12.6.tar.bz2"
sha256 "a50f384cead15f68f31cfa1a311e76a12098428702cb674d3521eb169eb92e4e"
revision 6
head "https://github.com/wesnoth/wesnoth.git"
bottle do
sha256 "4eeeaab16db5b477de2b20c3f07e5961265f29ccdb99b6c58302581e96dd003f" => :high_sierra
sha256 "5840aaf3e87825a40953e036d2e85bcd4074e1b861e14687383f910ec71f1fe5" => :sierra
sha256 "42a37c80ce4cbbb492742e3a05cab8983ee94d6d9d3d3c3bf9cc7b8b5fd78f82" => :el_capitan
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" # The music is in .ogg format
depends_on "sdl_net"
depends_on "sdl_ttf"
def install
mv "scons/gettext.py", "scons/gettext_tool.py"
inreplace "SConstruct", ", \"gettext\",", ", \"gettext_tool\","
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