forked from sjackman/linuxbrew-core
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalsa-lib.rb
40 lines (35 loc) · 1.14 KB
/
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
34
35
36
37
38
39
40
class AlsaLib < Formula
desc "Provides audio and MIDI functionality to the Linux operating system"
homepage "https://www.alsa-project.org/"
url "https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.4.tar.bz2"
sha256 "f7554be1a56cdff468b58fc1c29b95b64864c590038dd309c7a978c7116908f7"
license "LGPL-2.1-or-later"
livecheck do
url "https://www.alsa-project.org/files/pub/lib/"
regex(/href=.*?alsa-lib[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 x86_64_linux: "756ec564651fa7b7954d0af901a0fad8782691dcfeebb4e9a50ebfc464ac20c9"
end
depends_on :linux
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