homebrew-core/Formula/pulseaudio.rb
2018-05-10 00:28:24 -07:00

97 lines
2.6 KiB
Ruby

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.1.tar.xz"
sha256 "f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e"
revision 1
bottle do
sha256 "a449d66ca202e6ba2106af19ab3513ab17841ad45db2069bd8e18c5fa3341189" => :high_sierra
sha256 "80fdcab93388854621cd2392e3e0782587efda978c2f0de51381d3c3a264301e" => :sierra
sha256 "9ae35d388adbb4164afd5c121e5c8105886be394ad21921c33ebcff375ec8dff" => :el_capitan
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"
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/pulseaudio</string>
<string>--start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
test do
assert_match "module-sine", shell_output("#{bin}/pulseaudio --dump-modules")
end
end