forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalsa-lib.rb
33 lines (30 loc) · 994 Bytes
/
alsa-lib.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class AlsaLib < Formula
desc "Provides audio and MIDI functionality to the Linux operating system"
homepage "https://www.alsa-project.org/"
url "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.2.1.2.tar.bz2"
sha256 "958e260e3673f1f6ff6b2d2c0df3fc2e469bea5b2957163ce96ce17f23e87943"
# tag "linux"
bottle do
sha256 "8280bb44070d41048d081911ec73782e72cf5739d65997a5d8ee58517cf708f4" => :x86_64_linux
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <alsa/asoundlib.h>
int main(void)
{
snd_ctl_card_info_t *info;
snd_ctl_card_info_alloca(&info);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lasound", "-o", "test"
system "./test"
end
end