class Pulseaudio < Formula desc "Sound system for POSIX OSes" homepage "https://wiki.freedesktop.org/www/Software/PulseAudio/" url "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-13.0.tar.xz" sha256 "961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057" bottle do sha256 "a638afdb2e14989110a52ab860804ec0c005461d80398b736a641a678371bc3d" => :catalina sha256 "819cb5b8dd86715db2285f647b1742611dd2a802447aea637f05adae33a6056b" => :mojave sha256 "a5c5442b2118b9e3e3b2cbd8a8a700a121e9264b11c7096a3b3c42ce780a7a0b" => :high_sierra sha256 "bc42617a58074e5631eae20559f6a043ee87c8dcfd9944ac45b47467a3cdca66" => :sierra end head do url "https://anongit.freedesktop.org/git/pulseaudio/pulseaudio.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "gettext" => :build depends_on "intltool" => :build end depends_on "pkg-config" => :build depends_on "json-c" depends_on "libsndfile" depends_on "libsoxr" depends_on "libtool" depends_on "openssl@1.1" depends_on "speexdsp" def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --enable-coreaudio-output --disable-neon-opt --disable-nls --disable-x11 --with-mac-sysroot=#{MacOS.sdk_path} --with-mac-version-min=#{MacOS.version} ] if build.head? # autogen.sh runs bootstrap.sh then ./configure system "./autogen.sh", *args else system "./configure", *args end system "make", "install" end plist_options :manual => "pulseaudio" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_bin}/pulseaudio --exit-idle-time=-1 --verbose RunAtLoad KeepAlive StandardErrorPath #{var}/log/#{name}.log StandardOutPath #{var}/log/#{name}.log EOS end test do assert_match "module-sine", shell_output("#{bin}/pulseaudio --dump-modules") end end