homebrew-core/Formula/widelands.rb

48 lines
1.4 KiB
Ruby

class Widelands < Formula
desc "Free real-time strategy game like Settlers II"
homepage "https://www.widelands.org/"
url "https://launchpad.net/widelands/build20/build20/+download/widelands-build20.tar.bz2"
sha256 "38594d98c74f357d4c31dd8ee2b056bfe921f42935935af915d11b792677bcb2"
revision 2
bottle do
sha256 "99de8c47d5824abd73dca688f63c4d9091b9423bf1d054b21c614e571ddbf329" => :catalina
sha256 "1c0c8a4cb4e3d2a9db80409c4ecaf4f5fecab339fd0c1bc55090a82d7ef344c4" => :mojave
sha256 "69e6610a6057de646d76598f1e9f21570f340293d3c69daa88c502750e60dab3" => :high_sierra
end
depends_on "cmake" => :build
depends_on "boost"
depends_on "doxygen"
depends_on "gettext"
depends_on "glew"
depends_on "icu4c"
depends_on "libpng"
depends_on "lua"
depends_on "minizip"
depends_on "sdl2_image"
depends_on "sdl2_mixer"
depends_on "sdl2_ttf"
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
#!/bin/sh
exec #{prefix}/widelands "$@"
EOS
end
end
test do
system bin/"widelands", "--version"
end
end