# This now builds a version of JACKv1 which matches the current API # for JACKv2. JACKv2 is not buildable on a number of macOS # distributions, and the JACK team instead suggests installation of # JACKOSX, a pre-built binary form for which the source is not available. # If you require JACKv2, you should use that. Otherwise, this formula should # operate fine. # Please see https://github.com/Homebrew/homebrew/pull/22043 for more info class Jack < Formula desc "Audio Connection Kit" homepage "http://jackaudio.org" url "http://jackaudio.org/downloads/jack-audio-connection-kit-0.125.0.tar.gz" sha256 "3517b5bff82139a76b2b66fe2fd9a3b34b6e594c184f95a988524c575b11d444" revision 3 bottle do rebuild 1 sha256 "0df230c0f3646fb29ed5ff3041c810f92220d6ce012ace2e5c001f3d7eb05298" => :mojave sha256 "fd05eff6fde13c465c68d03bdd1f66f25e6e4b630348ed19cb2966f71a724601" => :high_sierra sha256 "651fef8ee2b8b844006b41c23c89a787664a76fb2614f9c6b47a8827adee091d" => :sierra sha256 "ee93da9885f06dde0f305fca2d5af6d6213c2133466ca93857a87ffb731ce43f" => :el_capitan end depends_on "pkg-config" => :build depends_on "berkeley-db" depends_on "libsndfile" depends_on "libsamplerate" def install sdk = MacOS.sdk_path_if_needed ? MacOS.sdk_path : "" # Makefile hardcodes Carbon header location inreplace Dir["drivers/coreaudio/Makefile.{am,in}"], "/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h", "#{sdk}/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h" # https://github.com/jackaudio/jack1/issues/81 inreplace "configure", "-mmacosx-version-min=10.4", "-mmacosx-version-min=#{MacOS.version}" ENV["LINKFLAGS"] = ENV.ldflags system "./configure", "--prefix=#{prefix}" system "make", "install" end plist_options :manual => "jackd -d coreaudio" def plist; <<~EOS Label #{plist_name} WorkingDirectory #{opt_prefix} ProgramArguments #{opt_bin}/jackd -d coreaudio RunAtLoad KeepAlive EOS end test do assert_match version.to_s, shell_output("#{bin}/jackd --version") end end