41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
Ruby
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.6.1.tar.bz2"
|
|
sha256 "ad582993d52cdb5fb159a0beab60a6ac57eab0cc1bdf85dc4db6d6197f02333f"
|
|
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: "c673efe91d915b952414f5bc37381c9f75979f0ecd196236a2997413beca1bab"
|
|
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
|