homebrew-core/Formula/libtcod.rb
2017-09-19 09:35:12 +02:00

37 lines
1.3 KiB
Ruby

class Libtcod < Formula
desc "API for roguelike developpers"
homepage "http://roguecentral.org/doryen/libtcod/"
url "https://bitbucket.org/libtcod/libtcod/get/1.5.1.tar.bz2"
sha256 "290145f760371881bcc6aa3fda256a2927f9210acc3f0a7230c5dfd57d9052d0"
bottle do
cellar :any
sha256 "1c87548bf17dfd58392f7da311b312c7f081239457aaff986bfefb4086847855" => :high_sierra
sha256 "ccad47287c9a34afcffa48d6b8f469cb729a1133f95f44be0fe7a1506723980f" => :sierra
sha256 "65cf5860b8325fe352f497ad287303c4a725e623d1a64c45c879463a36603f51" => :el_capitan
sha256 "de169860f67c2be9d4ed7770f682700b31642030da1b50583b26b53e5e514bfe" => :yosemite
end
depends_on "cmake" => :build
depends_on "sdl"
conflicts_with "libzip", :because => "both install `zip.h` header"
def install
# Remove unnecessary X11 check - our SDL doesn't use X11
inreplace "CMakelists.txt" do |s|
s.gsub! "find_package(X11 REQUIRED)", ""
s.gsub! "${X11_INCLUDE_DIRS}", ""
end
system "cmake", ".", *std_cmake_args
system "make"
# cmake produces an install target, but it installs nothing
lib.install "src/libtcod.dylib"
lib.install "src/libtcod-gui.dylib"
include.install Dir["include/*"]
# don't yet know what this is for
libexec.install "data"
end
end