Skip to content

Instantly share code, notes, and snippets.

@aycabta
Last active August 29, 2015 14:03
Embed
What would you like to do?
PulseAudio formula for Mavericks

PulseAudio formula for Mavericks

Usage

  • $ sudo cp pulseaudio.rb /usr/local/Library/Formula/pulseaudio.rb
  • $ brew install pulseaudio
--- configure 2014-07-15 11:36:11.000000000 +0900
+++ configure.new 2014-07-15 11:35:30.000000000 +0900
@@ -22267,29 +22267,13 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking looking for Apple CoreService Framework" >&5
$as_echo_n "checking looking for Apple CoreService Framework... " >&6; }
# How do I check a framework "library" - AC_CHECK_LIB prob. won't work??, just assign LIBS & hope
- ac_fn_c_check_header_mongrel "$LINENO" "/Developer/Headers/FlatCarbon/CoreServices.h" "ac_cv_header__Developer_Headers_FlatCarbon_CoreServices_h" "$ac_includes_default"
-if test "x$ac_cv_header__Developer_Headers_FlatCarbon_CoreServices_h" = xyes; then :
- LIBS="$LIBS -framework CoreServices"
-else
- for ac_header in /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h" "ac_cv_header__System_Library_Frameworks_CoreServices_framework_Headers_CoreServices_h" "$ac_includes_default"
-if test "x$ac_cv_header__System_Library_Frameworks_CoreServices_framework_Headers_CoreServices_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__SYSTEM_LIBRARY_FRAMEWORKS_CORESERVICES_FRAMEWORK_HEADERS_CORESERVICES_H 1
-_ACEOF
- LIBS="$LIBS -framework CoreServices"
-else
- as_fn_error $? "CoreServices.h header file not found" "$LINENO" 5
-
-fi
-
-done
-
-
-fi
-
-
+# AC_CHECK_HEADER([/Developer/Headers/FlatCarbon/CoreServices.h],
+# [LIBS="$LIBS -framework CoreServices"],
+# [AC_CHECK_HEADERS([/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h],
+# [LIBS="$LIBS -framework CoreServices"],
+# [AC_MSG_ERROR([CoreServices.h header file not found])]
+# )]
+# )
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
require 'formula'
class Pulseaudio < Formula
homepage "http://pulseaudio.org"
url "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-5.0.tar.xz"
sha1 "e420931a0b9cf37331cd06e30ba415046317ab85"
option "with-nls", "Build with native language support"
option :universal
depends_on "pkg-config" => :build
depends_on "libtool" => :build
depends_on "intltool" => :build if build.with? "nls"
depends_on "gettext" => :build if build.with? "nls"
depends_on "json-c"
depends_on "libsndfile"
depends_on "libsamplerate"
depends_on :x11 => :optional
depends_on "glib" => :optional
depends_on "gconf" => :optional
depends_on "d-bus" => :optional
depends_on "gtk+3" => :optional
depends_on "jack" => :optional
# i386 patch per MacPorts
patch :p0 do
url "https://trac.macports.org/export/119615/trunk/dports/audio/pulseaudio/files/i386.patch"
sha1 "4193a6112f90d103875d2ca91462c26d811a9386"
end
patch :p0 do
url "https://gist.githubusercontent.com/aycabta/e02c1c5096ea562ecd27/raw/configure.diff"
sha1 "c781e508e50076d26d968fd27bd8b8ff2603d775"
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
system "./configure", *args
system "make", "install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment