87 lines
2.5 KiB
Ruby
87 lines
2.5 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-9.0.tar.xz"
|
|
sha256 "c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686"
|
|
|
|
bottle do
|
|
sha256 "462b639e10a35707632216543223664921f5f0db2344bbea62f8c7d3ea6a2763" => :sierra
|
|
sha256 "e49ab0d39e1786e903402602fcac4ea47f01f0b85d44ae56967a4bc6e664e83b" => :el_capitan
|
|
sha256 "3eabb2e862b797aed678dda68880a9b6f74eaaaf27c58eaeec900ca44e5143ed" => :yosemite
|
|
sha256 "9025f45fcaa300794ef2331af865c45d41aef3d96cc4ea064cec4bd740d33d19" => :mavericks
|
|
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 :x11 => :optional
|
|
depends_on "glib" => :optional
|
|
depends_on "gconf" => :optional
|
|
depends_on "dbus" => :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"
|
|
|
|
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
|