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/"
|
|
|
|
|
|
|
|
stable do
|
2015-10-17 05:40:39 +00:00
|
|
|
url "http://download.gna.org/allegro/allegro/5.0.11/allegro-5.0.11.tar.gz"
|
2015-06-01 02:19:07 +00:00
|
|
|
sha256 "49fe14c9571463ba08db4ff778d1fbb15e49f9c33bdada3ac8599e04330ea531"
|
|
|
|
end
|
2015-10-17 14:38:17 +00:00
|
|
|
|
2015-06-01 03:40:48 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-10-17 14:38:17 +00:00
|
|
|
revision 2
|
|
|
|
sha256 "920e11cc6cbb00016fdd6626aae4a051b38bf97ce8702ffdc11fc567f192601f" => :el_capitan
|
|
|
|
sha256 "53bd9902195241cdddc873a3c9afa92beab73c234e1e337d376bcb8d4b3fd2c6" => :yosemite
|
|
|
|
sha256 "65a04aa3c0901264e54ca91f8982da085ea90bccabcb885fac054ba5219e19bd" => :mavericks
|
2015-06-01 03:40:48 +00:00
|
|
|
end
|
|
|
|
|
2015-06-22 01:33:44 +00:00
|
|
|
devel do
|
2015-10-17 05:41:01 +00:00
|
|
|
url "http://download.gna.org/allegro/allegro-unstable/5.1.12/allegro-5.1.12.tar.gz"
|
|
|
|
sha256 "78d1056d6cc0e4527ef35646f612a80456442a7866445ca7cf61a11bd64e79c0"
|
2015-06-01 02:19:07 +00:00
|
|
|
|
|
|
|
depends_on "theora" => :recommended
|
|
|
|
end
|
|
|
|
|
2015-06-22 01:33:44 +00:00
|
|
|
head do
|
2015-08-31 01:27:06 +00:00
|
|
|
url "https://github.com/liballeg/allegro5.git", :branch => "5.1"
|
2015-06-01 02:19:07 +00:00
|
|
|
|
|
|
|
depends_on "theora" => :recommended
|
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "libvorbis" => :recommended
|
|
|
|
depends_on "freetype" => :recommended
|
|
|
|
depends_on "flac" => :recommended
|
|
|
|
depends_on "physfs" => :recommended
|
|
|
|
|
|
|
|
def install
|
2015-07-14 05:57:11 +00:00
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", "..", "-DWANT_DOCS=OFF", *std_cmake_args
|
|
|
|
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
|