homebrew-core/Formula/pulseaudio.rb
2018-09-05 23:23:14 +02:00

83 lines
2.3 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-12.2.tar.xz"
sha256 "809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055"
bottle do
sha256 "d4e3317b4dbe4a94da0d4214dd283a905ad9a6cf0af6350cf8c7fdeca9178b41" => :mojave
sha256 "863574c4a45f3c8b0654e265d2febb545e483b6a6d958847d32e8c81c510af43" => :high_sierra
sha256 "1cdb396a073ac27b1f974530ecb3d663be522dc171cdfd473491a42d7ccb602c" => :sierra
sha256 "f2c4ebc01c8c104daab6739f61bc8aeeafe323fa8ed88f7730313cd6e84bb019" => :el_capitan
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"
depends_on "speexdsp"
depends_on "glib" => :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
--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
<?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