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" revision 1 bottle do sha256 "7beb3a76b5f1a8c8b80b0b7493e460b69e081fd6b104447fa6e8f4f47f132ef4" => :sierra sha256 "7a967bf3d290c73b0c14d130fbb4f3303a06c672dd0115fc457a223bf5f8345d" => :el_capitan sha256 "f2a311478b98388a32f62a440b39cb0b1b8b675338dd1623c68b21b8007698bc" => :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