forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfifechan.rb
41 lines (36 loc) · 1.23 KB
/
fifechan.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class Fifechan < Formula
desc "C++ GUI library designed for games"
homepage "https://fifengine.github.io/fifechan/"
url "https://github.com/fifengine/fifechan/archive/0.1.3.tar.gz"
sha256 "0b3dc9821a6f2acfc65299235e39b7fa5dc4c36bd9c50153d0debd8c27497e1e"
bottle do
cellar :any
sha256 "5d9d9cca51acebbab4e5fa4273d1c0825590ed38c725ebdf9edeb174229a07b1" => :sierra
sha256 "799e8fa5def1592ff559ed13913b0aff53b0df8fba9c8b2e46ed4af0800bbf20" => :el_capitan
sha256 "8eeeaad4b2d4d95573417b2a2a42dc2199d1148033011fab4a7854b0bf11542f" => :yosemite
end
depends_on "cmake" => :build
depends_on "allegro" => :recommended
depends_on "sdl" => :recommended
depends_on "sdl_image" => :recommended
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
end
test do
(testpath/"fifechan_test.cpp").write <<-EOS
#include <fifechan.hpp>
int main(int n, char** c) {
fcn::Container* mContainer = new fcn::Container();
if (mContainer == nullptr) {
return 1;
}
return 0;
}
EOS
system ENV.cxx, "-I#{include}", "-L#{lib}", "-lfifechan", "-o", "fifechan_test", "fifechan_test.cpp"
system "./fifechan_test"
end
end