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