50 lines
1.7 KiB
Ruby
50 lines
1.7 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"
|
|
|
|
head "https://github.com/wesnoth/wesnoth.git"
|
|
|
|
bottle do
|
|
sha256 "a6f059a27c01c95a43603b26f59f2d3506ebccbd98d0099e649e4d9d57d377e2" => :sierra
|
|
sha256 "5a20e3463745819f8d569b1422f47886ae532c7f40e53d531d7c844bad39ba49" => :el_capitan
|
|
sha256 "b1533d980e7675354c265a431867c4b044e5209314b66c37da7909260c795bed" => :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
|