libsoundio 1.0.3 (new formula)
Closes Homebrew/homebrew#45547. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
87f48abeb6
commit
91ad746b40
1 changed files with 33 additions and 0 deletions
33
Formula/libsoundio.rb
Normal file
33
Formula/libsoundio.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
class Libsoundio < Formula
|
||||
desc "Cross-platform audio input and output"
|
||||
homepage "http://libsound.io"
|
||||
url "https://github.com/andrewrk/libsoundio/archive/1.0.3.tar.gz"
|
||||
sha256 "a2b9fb88ad44cb97bab03e8955b444d824182c12a3957a5e4f5a52aee45b1bc3"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "cmake", ".", *std_cmake_args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <soundio/soundio.h>
|
||||
|
||||
int main() {
|
||||
struct SoundIo *soundio = soundio_create();
|
||||
|
||||
if (!soundio) { return 1; }
|
||||
if (soundio_connect(soundio)) return 1;
|
||||
|
||||
soundio_flush_events(soundio);
|
||||
soundio_destroy(soundio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "-L#{lib}", "-lsoundio", "test.c", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue