47 lines
1.4 KiB
Ruby
47 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 1
|
|
|
|
bottle do
|
|
sha256 "5f239a934442ca0adbf853a8d7d2761670a42aa04b4f6202092928ced39c120e" => :mojave
|
|
sha256 "02115536245a5dedb60d63df253f1658ddb25af43351625c250ad1b399ca785c" => :high_sierra
|
|
sha256 "5fa23f3fae36a92627f5e2b687a684a7888afa867074350a5ad2bee90edc4d02" => :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
|