class Allegro < Formula desc "C/C++ multimedia library for cross-platform game development" homepage "http://liballeg.org/" url "https://github.com/liballeg/allegro5/releases/download/5.2.4.0/allegro-5.2.4.0.tar.gz" sha256 "346163d456c5281c3b70271ecf525e1d7c754172aef4bab15803e012b12f2af1" head "https://github.com/liballeg/allegro5.git", :branch => "master" bottle do cellar :any sha256 "13e8c8518d9925dd1480b7217233262ac098e40728d5f4f3be6c2dcc6f872340" => :high_sierra sha256 "7b8fdcdbfc49555517f654a9b8ad961bb675509b7e365aa58d5f0b7f6b23024c" => :sierra sha256 "b8ab4c72c7e3f6b8a46fba5af812ebe7f7b1821c44485facd6bec622a1f00300" => :el_capitan end depends_on "cmake" => :build depends_on "flac" depends_on "freetype" depends_on "libogg" depends_on "libvorbis" depends_on "opusfile" depends_on "physfs" depends_on "theora" depends_on "webp" depends_on "dumb" => :optional def install args = std_cmake_args args << "-DWANT_DOCS=OFF" args << "-DWANT_MODAUDIO=1" if build.with?("dumb") mkdir "build" do system "cmake", "..", *args system "make", "install" end end test do (testpath/"allegro_test.cpp").write <<~EOS #include #include 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