forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibtcod.rb
27 lines (23 loc) · 829 Bytes
/
libtcod.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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"
depends_on "cmake" => :build
depends_on "sdl"
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