homebrew-core/Formula/pulseaudio.rb
2017-10-20 14:10:54 +01:00

96 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"
bottle do
sha256 "4c978ad02a720678b6f4e5255d540cb859ba9d9b6ec22dcd9251f9d64df366f4" => :high_sierra
sha256 "65f121b3c8a4d159a9acd803adfb3eb4b2fed82ba5b21d3867fe9dfb08941a5b" => :sierra
sha256 "0ba8b12b715a1259e5fade3ea45238994f0e46f00d8f687e043f47c3474f643c" => :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" => :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
<?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