42 lines
1.2 KiB
Ruby
42 lines
1.2 KiB
Ruby
class AlsaLib < Formula
|
|
bottle do
|
|
root_url "https://homebrew.mirror.ygg/bottles"
|
|
sha256 cellar: "/home/linuxbrew/.linuxbrew/Cellar", x86_64_linux: "4324d90988f149a55f5f00b2990177981677e3edbf3196793fbba3b6ad66675f"
|
|
end
|
|
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.16.1.tar.bz2"
|
|
sha256 "f740db7f488255944ffd4428416ee3390a96742856916433df468c281436480e"
|
|
license all_of: ["LGPL-2.1-or-later", "GPL-2.0-or-later"]
|
|
compatibility_version 1
|
|
|
|
livecheck do
|
|
url "https://www.alsa-project.org/files/pub/lib/"
|
|
regex(/href=.*?alsa-lib[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
|
|
|
|
depends_on :linux
|
|
|
|
def install
|
|
system "./configure", "--disable-silent-rules", *std_configure_args
|
|
system "make", "install"
|
|
prefix.install "aserver/COPYING" => "COPYING-aserver"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~C
|
|
#include <alsa/asoundlib.h>
|
|
int main(void)
|
|
{
|
|
snd_ctl_card_info_t *info;
|
|
snd_ctl_card_info_alloca(&info);
|
|
return 0;
|
|
}
|
|
C
|
|
system ENV.cc, "test.c", "-L#{lib}", "-lasound", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|