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-11.0.tar.xz" sha256 "072305d4018fc5e75bb1b45ee6b938fa52fc9fd27493bf327415ef89ed14c969" bottle do sha256 "be66730589463eb2c36fd3be634ad311c89a576409e6005e4640bed2253fa268" => :high_sierra sha256 "feee09c09d98204cf95a388793a862029a235380f16205e57923455264120ffe" => :sierra sha256 "317e8b66bf3e1d7b75eeb2cddcbc97ae4b2c62642ead619beafaa7c804caa27b" => :el_capitan sha256 "4e944423928d9745e8487d249c3f6b84d7d4cfdd5e804c77bf6ae216d5a6060a" => :yosemite end head do url "https://anongit.freedesktop.org/git/pulseaudio/pulseaudio.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "intltool" => :build depends_on "gettext" => :build end option "with-nls", "Build with native language support" deprecated_option "without-speex" => "without-speexdsp" depends_on "pkg-config" => :build if build.with? "nls" depends_on "intltool" => :build depends_on "gettext" => :build end depends_on "libtool" => :run depends_on "json-c" depends_on "libsndfile" depends_on "libsoxr" depends_on "openssl" depends_on "speexdsp" => :recommended depends_on "glib" => :optional depends_on "gconf" => :optional depends_on "gtk+3" => :optional depends_on "jack" => :optional fails_with :clang do build 421 cause "error: thread-local storage is unsupported for the current target" end def install args = %W[ --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --enable-coreaudio-output --disable-neon-opt --with-mac-sysroot=#{MacOS.sdk_path} --with-mac-version-min=#{MacOS.version} --disable-x11 ] args << "--disable-nls" if build.without? "nls" 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.undent Label #{plist_name} ProgramArguments #{opt_bin}/pulseaudio --start RunAtLoad EOS end test do assert_match "module-sine", shell_output("#{bin}/pulseaudio --dump-modules") end end