87 lines
2.4 KiB
Ruby
87 lines
2.4 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"
|
|
revision 2
|
|
|
|
bottle do
|
|
sha256 "f1db3d1981966e6b33fcb2f0f069192ed9a2d125a71e0083278ee01549a7fbb2" => :sierra
|
|
sha256 "0830df60c69b9f9ca0010ae45d6cd969e39531c039835e74a046c2e5f44a0ea9" => :el_capitan
|
|
sha256 "bb8e83c029a058f9d84ae14ffa0fdc372979d1e33fc7352e4ab035788c608a3b" => :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
|