From 06a6ac51e2ed2930a21942ecfae1f8edcd5bfd67 Mon Sep 17 00:00:00 2001 From: Seeker Date: Thu, 10 Sep 2020 09:51:42 -0700 Subject: [PATCH] alsa-lib 1.2.1.2 (new formula) --- .github/workflows/tests-linux.yml | 1 + Formula/alsa-lib.rb | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Formula/alsa-lib.rb diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index b7d958baab3..3c86cbd075e 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -2,6 +2,7 @@ name: GitHub Actions CI on: pull_request: paths: + - "Formula/alsa-lib.rb" - "Formula/libseccomp.rb" jobs: tests_linux: diff --git a/Formula/alsa-lib.rb b/Formula/alsa-lib.rb new file mode 100644 index 00000000000..832d6504d10 --- /dev/null +++ b/Formula/alsa-lib.rb @@ -0,0 +1,31 @@ +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" + license "LGPL-2.1-or-later" + + 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 + 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