diff --git a/Formula/openal-soft.rb b/Formula/openal-soft.rb new file mode 100644 index 0000000000..11a752b266 --- /dev/null +++ b/Formula/openal-soft.rb @@ -0,0 +1,28 @@ +require "formula" + +class OpenalSoft < Formula + homepage "http://kcat.strangesoft.net/openal.html" + url "http://kcat.strangesoft.net/openal-releases/openal-soft-1.15.1.tar.bz2" + sha1 "a0e73a46740c52ccbde38a3912c5b0fd72679ec8" + + depends_on "cmake" => :build + + def install + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include "AL/al.h" + #include "AL/alc.h" + int main() { + ALCdevice *device; + device = alcOpenDevice(0); + alcCloseDevice(device); + return 0; + } + EOS + system ENV.cc, "test.c", "-lopenal" + end +end