cask 'xquartz-beta' do version '2.7.10_rc1' sha256 'f91154cdaf1b3f8bf303a8d7fdc3ac8357578dc5dded6671a8f31f86977d0d9a' # bintray.com/xquartz was verified as official when first introduced to the cask url "https://dl.bintray.com/xquartz/downloads/XQuartz-#{version}.dmg" appcast 'https://xquartz-dl.macosforge.org/sparkle/beta.xml', checkpoint: '190e7ca981e0405e6233d5972e7d6bd27dbbc9e38186ff2d1a9aa55d51763780' name 'XQuartz' homepage 'http://www.xquartz.org/' license :oss pkg 'XQuartz.pkg' postflight do Pathname.new(File.expand_path('~')).join('Library', 'Logs').mkpath # Set default path to X11 to avoid the need of manual setup system '/usr/bin/defaults', 'write', 'com.apple.applescript', 'ApplicationMap', '-dict-add', 'X11', 'file://localhost/Applications/Utilities/XQuartz.app/' # Load & start XServer to avoid the need of relogin system '/bin/launchctl', 'load', '/Library/LaunchAgents/org.macosforge.xquartz.startx.plist' # Set automatic Updates for Beta Versions system 'defaults', 'write', 'org.macosforge.xquartz.X11', 'SUFeedURL', 'http://xquartz.macosforge.org/downloads/sparkle/beta.xml' end uninstall quit: 'org.macosforge.xquartz.X11', launchctl: 'org.macosforge.xquartz.*', pkgutil: 'org.macosforge.xquartz.pkg', delete: '/opt/X11/' zap delete: [ '~/Library/Caches/org.macosforge.xquartz.X11', '~/Library/Logs/X11', '~/Library/Logs/X11.org.macosforge.xquartz.log', '~/Library/Logs/X11.org.macosforge.xquartz.log.old', '~/Library/Preferences/org.macosforge.xquartz.X11.plist', '~/Library/Saved Application State/org.macosforge.xquartz.X11.savedState', '~/.Xauthority', ], rmdir: '~/.fonts' end