homebrew-core/Formula/widelands.rb
2017-02-08 10:12:35 +00:00

49 lines
1.5 KiB
Ruby

class Widelands < Formula
desc "Free real-time strategy game like Settlers II."
homepage "https://wl.widelands.org/"
url "https://launchpad.net/widelands/build19/build19/+download/widelands-build19-src.tar.bz2"
sha256 "e511f9d26828a2b71b64cdfc6674e6e847543b2da73961ab882acca36c7c01a6"
bottle do
sha256 "bf7af934904ca34981ff86a8c720428d81751aa1185a29e58f6ed20b024a2086" => :sierra
sha256 "797b9842ba80337f8705f421182f01cbed13804c47bae9dd8265786f5c5d5d28" => :el_capitan
sha256 "0376e78a26a50d0576233ebb626fb00a1e969be5a540e29a6219d16ff3b4d969" => :yosemite
end
depends_on "cmake" => :build
depends_on "boost"
depends_on "libpng"
depends_on "minizip"
depends_on "gettext"
depends_on "sdl2_image"
depends_on "sdl2_mixer"
depends_on "sdl2_net"
depends_on "sdl2_ttf"
depends_on "doxygen"
depends_on "glew"
depends_on "lua"
depends_on "icu4c"
needs :cxx11
def install
ENV.cxx11
mkdir "build" do
system "cmake", "..",
# Without the following option, Cmake intend to use the library of MONO framework.
"-DPNG_PNG_INCLUDE_DIR:PATH=#{Formula["libpng"].opt_include}",
"-DWL_INSTALL_DATADIR=#{pkgshare}/data",
*std_cmake_args
system "make", "install"
(bin/"widelands").write <<-EOS.undent
#!/bin/sh
exec #{prefix}/widelands "$@"
EOS
end
end
test do
system bin/"widelands", "--version"
end
end