57 lines
1.8 KiB
Ruby
57 lines
1.8 KiB
Ruby
class Supertux < Formula
|
|
desc "Classic 2D jump'n run sidescroller game"
|
|
homepage "https://supertuxproject.org/"
|
|
url "https://github.com/SuperTux/supertux/releases/download/v0.5.1/SuperTux-v0.5.1-Source.tar.gz"
|
|
sha256 "c9dc3b42991ce5c5d0d0cb94e44c4ec2373ad09029940f0e92331e7e9ada0ac5"
|
|
revision 1
|
|
|
|
head "https://github.com/SuperTux/supertux.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "2428b9c6abbd55085a38e832cec4bb3e83e2f171c75a8c8d68a8a249772f3f6d" => :sierra
|
|
sha256 "a13338b55b4e56f0baf5f8ce576dd913037f8a91b4b08f36ef80e5eda7e1175b" => :el_capitan
|
|
sha256 "89bccee9096c2521c15f944ca635dc82f340221953d035bee9412cdf6486a3ae" => :yosemite
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost" => :build
|
|
depends_on "sdl2"
|
|
depends_on "sdl2_image"
|
|
depends_on "sdl2_mixer" => "with-libvorbis"
|
|
depends_on "libogg"
|
|
depends_on "libvorbis"
|
|
depends_on "glew"
|
|
|
|
# Fix symlink passing to physfs
|
|
# https://github.com/SuperTux/supertux/issues/614
|
|
patch do
|
|
url "https://github.com/SuperTux/supertux/commit/47a353e2981161e2da12492822fe88d797af2fec.diff"
|
|
sha256 "bb88211eacf76698521b5b85972e2facd93bceab92fa37529ec3ff5482d82956"
|
|
end
|
|
|
|
needs :cxx11
|
|
|
|
def install
|
|
ENV.cxx11
|
|
|
|
args = std_cmake_args
|
|
args << "-DINSTALL_SUBDIR_BIN=bin"
|
|
args << "-DINSTALL_SUBDIR_SHARE=share/supertux"
|
|
# Without the following option, Cmake intend to use the library of MONO framework.
|
|
args << "-DPNG_PNG_INCLUDE_DIR=#{Formula["libpng"].opt_include}"
|
|
system "cmake", ".", *args
|
|
system "make", "install"
|
|
|
|
# Remove unnecessary files
|
|
(share/"appdata").rmtree
|
|
(share/"applications").rmtree
|
|
(share/"pixmaps").rmtree
|
|
(prefix/"MacOS").rmtree
|
|
end
|
|
|
|
test do
|
|
assert_equal "supertux2 v#{version}", shell_output("#{bin}/supertux2 --version").chomp
|
|
end
|
|
end
|