blob: b994115fde95313d5716f6fb4b0052a2373ce27d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  | 
require 'formula'
# This now builds a version of JACKv1 which matches the current API
# for JACKv2. JACKv2 is not buildable on a number of Mac OS X
# 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
  homepage 'http://jackaudio.org'
  url "http://jackaudio.org/downloads/jack-audio-connection-kit-0.124.1.tar.gz"
  sha1 "e9ba4a4c754ec95fbe653dcf7344edd6cc47cd60"
  bottle do
    sha1 "1a6b9ef8bf76ac101b60469ce69c849487395bff" => :mavericks
    sha1 "fba42da50d726fa86ed02ae7607feac6ad9c1537" => :mountain_lion
    sha1 "89f26ade3b8e39a3fe8c888d6e67abb13fa508bd" => :lion
  end
  depends_on 'berkeley-db'
  depends_on 'celt'
  depends_on 'libsndfile'
  depends_on 'libsamplerate'
  # Change pThread header include from CarbonCore
  patch :p0, :DATA if MacOS.version >= :mountain_lion
  plist_options :manual => "jackd -d coreaudio"
  def plist; <<-EOS.undent
    <?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>WorkingDirectory</key>
      <string>#{prefix}</string>
      <key>ProgramArguments</key>
      <array>
        <string>#{opt_bin}/jackd</string>
        <string>-d</string>
        <string>coreaudio</string>
      </array>
      <key>RunAtLoad</key>
      <true/>
      <key>KeepAlive</key>
      <true/>
    </dict>
    </plist>
    EOS
  end
  def install
    ENV['LINKFLAGS'] = ENV.ldflags
    system "./configure", "--prefix=#{prefix}"
    system "make","install"
  end
end
__END__
--- config/os/macosx/pThreadUtilities.h
+++ config/os/macosx/pThreadUtilities.h
@@ -66,7 +66,7 @@
 #define __PTHREADUTILITIES_H__
 
 #import "pthread.h"
-#import <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
+#import <MacTypes.h>
 
 #define THREAD_SET_PRIORITY      0
 #define THREAD_SCHEDULED_PRIORITY    1
  |