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-9.0.tar.xz" sha256 "c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686" revision 1 bottle do sha256 "6d3c7848457ef249c7ba72ca8d8d8ee3333a091d8bed9ed97c616ab9a4dae664" => :sierra sha256 "a393636c33da1749ba322058c8fad0c96bdd97aa7888f06731fa3393710d8ebe" => :el_capitan sha256 "fec391960ab949e12cc5e17d13ef164b7b42e216321135d2f13e062b24ad49a6" => :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" option :universal 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 "dbus" => :recommended depends_on "speex" => :recommended depends_on "glib" => :optional depends_on "gconf" => :optional depends_on "gtk+3" => :optional depends_on "jack" => :optional # i386 patch per MacPorts patch :p0 do url "https://raw.githubusercontent.com/Homebrew/formula-patches/15fa4f03/pulseaudio/i386.patch" sha256 "d3a2180600a4fbea538949b6c4e9e70fe7997495663334e50db96d18bfb1da5f" end 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=/ ] args << "--with-mac-sysroot=#{MacOS.sdk_path}" args << "--with-mac-version-min=#{MacOS.version}" args << "--disable-nls" if build.without? "nls" args << "--disable-x11" if build.universal? args << "--enable-mac-universal" ENV.universal_binary end if build.head? # autogen.sh runs bootstrap.sh then ./configure system "./autogen.sh", *args else system "./configure", *args end system "make", "install" end test do system bin/"pulseaudio", "--dump-modules" end end