2015-06-01 02:19:07 +00:00
|
|
|
class Allegro < Formula
|
2015-06-02 15:53:34 +00:00
|
|
|
desc "C/C++ multimedia library for cross-platform game development"
|
2015-06-01 02:19:07 +00:00
|
|
|
homepage "http://liballeg.org/"
|
2016-04-17 01:08:37 +00:00
|
|
|
url "http://download.gna.org/allegro/allegro/5.2.0/allegro-5.2.0.tar.gz"
|
|
|
|
sha256 "af5a69cd423d05189e92952633f9c0dd0ff3a061d91fbce62fb32c4bd87f9fd7"
|
2016-04-19 08:34:56 +00:00
|
|
|
head "https://github.com/liballeg/allegro5.git", :branch => "master"
|
2015-10-17 14:38:17 +00:00
|
|
|
|
2015-06-01 03:40:48 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2016-04-17 10:49:22 +00:00
|
|
|
sha256 "73bd8ce63b7d8788973abc736e27bb342dd03c7e9d33be241ae9847d483ee448" => :el_capitan
|
|
|
|
sha256 "00aaa7f60e21646bf62365e4f33b7bba1a24c4386a5410317e0a9b8452b4ac1b" => :yosemite
|
|
|
|
sha256 "eac2ca128fca38ab9b5636808a927ce4941859312592acc1b6b10dd7f8f88af3" => :mavericks
|
2015-06-01 03:40:48 +00:00
|
|
|
end
|
|
|
|
|
2015-06-01 02:19:07 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "libvorbis" => :recommended
|
|
|
|
depends_on "freetype" => :recommended
|
|
|
|
depends_on "flac" => :recommended
|
|
|
|
depends_on "physfs" => :recommended
|
2016-04-17 01:08:37 +00:00
|
|
|
depends_on "libogg" => :recommended
|
|
|
|
depends_on "theora" => :recommended
|
|
|
|
depends_on "dumb" => :optional
|
2015-06-01 02:19:07 +00:00
|
|
|
|
|
|
|
def install
|
2016-04-17 01:08:37 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
args << "-DWANT_DOCS=OFF"
|
|
|
|
args << "-DWANT_MODAUDIO=1" if build.with?("dumb")
|
2015-07-14 05:57:11 +00:00
|
|
|
mkdir "build" do
|
2016-04-17 01:08:37 +00:00
|
|
|
system "cmake", "..", *args
|
2015-07-14 05:57:11 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-06-01 02:19:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"allegro_test.cpp").write <<-EOS
|
|
|
|
#include <assert.h>
|
|
|
|
#include <allegro5/allegro5.h>
|
|
|
|
|
|
|
|
int main(int n, char** c) {
|
|
|
|
if (!al_init()) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system ENV.cxx, "-I#{include}", "-L#{lib}", "-lallegro", "-lallegro_main", "-o", "allegro_test", "allegro_test.cpp"
|
|
|
|
system "./allegro_test"
|
|
|
|
end
|
|
|
|
end
|