Skip to content

Instantly share code, notes, and snippets.

@lokeb
Forked from jaygooby/jack.rb
Last active November 21, 2020 03:19
Show Gist options
  • Save lokeb/ad2e7504fe6848519ee91e3345a7d416 to your computer and use it in GitHub Desktop.
Save lokeb/ad2e7504fe6848519ee91e3345a7d416 to your computer and use it in GitHub Desktop.
#does not work Homebrew formula to install JackOSX binary package.
require 'formula'
class Jack2 <Formula
homepage 'http://jackaudio.org'
version '1.9.16'
url 'https://github.com/jackaudio/jack2-releases/releases/download/v1.9.16/jack2-macOS-v1.9.16.tar.gz'
def install
system "xar -xf jack2-osx-1.9.16.pkg"
system "pax -rz -f jack2-osx-root.pkg/Payload"
Dir['usr/local/bin/jack_*',
'Library/Frameworks/Jackmp.framework/Jackmp',
'Library/Frameworks/Jackmp.framework/Versions/A/Jackmp'].each do |f|
system "install_name_tool", "-change",
"/Library/Frameworks/Jackmp.framework/Versions/A/Jackmp",
prefix+"Frameworks/Jackmp.framework/Versions/A/Jackmp", f
end
Dir['usr/local/bin/jackd*', 'usr/local/lib/jackmp/*.so',
'/Library/Frameworks/Jackservermp.framework/Versions/A/Jackservermp',
'/Library/Frameworks/Jackservermp.framework/Jackservermp'].each do |f|
system "install_name_tool", "-change",
"/Library/Frameworks/Jackservermp.framework/Versions/A/Jackservermp",
prefix+"Frameworks/Jackservermp.framework/Versions/A/Jackservermp", f
end
lib.install Dir['usr/local/lib/*']
bin.install Dir['usr/local/bin/*']
include.install Dir['usr/local/include/*']
prefix.install 'Library/Frameworks'
prefix.install 'Library/Audio'
ln_s prefix+'Frameworks/Jackmp.framework/Jackmp',
lib+'libjack.0.dylib', :force => true
ln_s prefix+'Frameworks/Jackmp.framework/Jackmp',
lib+'libjack.dylib', :force => true
ln_s prefix+'Frameworks/Jackservermp.framework/Jackservermp',
lib+'libjackserver.0.dylib', :force => true
ln_s prefix+'Frameworks/Jackservermp.framework/Jackservermp',
lib+'libjackserver.dylib', :force => true
end
def caveats; <<-EOS
The JackRouter CoreAudio device is located in jack/0.90/Audio/Plug-Ins/HAL/JackRouter.plugin
within the Homebrew Cellar. Link this into /Library/Audio to install (requires restart.)
ie: sudo ln -s #{HOMEBREW_PREFIX}/Cellar/jack/0.90/Audio/Plug-Ins/HAL/JackRouter.plugin /Library/Audio/Plug-Ins/HAL/
(you make need to make the parent directories first.)
Also included within the Audio subfolder are an AudioUnit and VST plugin.
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment