2015-12-18 09:15:28 +08:00
|
|
|
cask 'xquartz' do
|
2015-10-19 22:02:32 +08:00
|
|
|
version '2.7.8'
|
|
|
|
sha256 '17a4c2da1ab3b676fdf80d1a0714c6bfd22183a604e823b4fd8329fdb4432c2a'
|
2014-06-27 08:01:54 +08:00
|
|
|
|
2015-11-15 03:36:14 +08:00
|
|
|
# macosforge.org is the official download host per the vendor homepage
|
2014-09-26 20:09:19 +08:00
|
|
|
url "https://xquartz.macosforge.org/downloads/SL/XQuartz-#{version}.dmg"
|
2015-06-29 14:32:18 +08:00
|
|
|
appcast 'https://xquartz-dl.macosforge.org/sparkle/release.xml',
|
2015-11-15 03:36:14 +08:00
|
|
|
:sha256 => '0b2c7d4e0b101eefc0a3efb000b779b3ec7246fcb5d14a0540e85f540f26a9e6'
|
2015-01-05 04:45:58 +08:00
|
|
|
name 'XQuartz'
|
2015-11-15 03:36:14 +08:00
|
|
|
homepage 'http://www.xquartz.org/'
|
|
|
|
license :oss
|
2014-06-27 08:01:54 +08:00
|
|
|
|
2014-09-10 23:37:08 +08:00
|
|
|
pkg 'XQuartz.pkg'
|
2014-06-15 00:12:08 +08:00
|
|
|
|
2014-09-09 20:55:28 +08:00
|
|
|
postflight do
|
2014-07-06 18:40:30 +08:00
|
|
|
Pathname.new(File.expand_path('~')).join('Library', 'Logs').mkpath
|
2014-06-15 03:48:22 +08:00
|
|
|
|
2014-10-05 01:58:29 +08:00
|
|
|
# Set default path to X11 to avoid the need of manual setup
|
2014-06-15 03:48:22 +08:00
|
|
|
system '/usr/bin/defaults', 'write', 'com.apple.applescript', 'ApplicationMap', '-dict-add', 'X11', 'file://localhost/Applications/Utilities/XQuartz.app/'
|
|
|
|
|
2014-10-05 01:58:29 +08:00
|
|
|
# Load & start XServer to avoid the need of relogin
|
2014-06-15 03:48:22 +08:00
|
|
|
system '/bin/launchctl', 'load', '/Library/LaunchAgents/org.macosforge.xquartz.startx.plist'
|
2014-06-15 00:12:08 +08:00
|
|
|
end
|
|
|
|
|
2013-12-10 12:52:34 +08:00
|
|
|
uninstall :quit => 'org.macosforge.xquartz.X11',
|
2014-06-15 03:48:22 +08:00
|
|
|
:launchctl => 'org.macosforge.xquartz.startx',
|
2014-07-03 18:35:10 +08:00
|
|
|
:pkgutil => 'org.macosforge.xquartz.pkg',
|
2014-09-18 19:58:01 +08:00
|
|
|
:delete => '/opt/X11/'
|
2014-10-11 22:35:50 +08:00
|
|
|
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',
|
2014-12-30 23:47:03 +08:00
|
|
|
'~/Library/Preferences/org.macosforge.xquartz.X11.plist',
|
|
|
|
'~/Library/Saved Application State/org.macosforge.xquartz.X11.savedState',
|
2014-10-22 18:16:41 +08:00
|
|
|
'~/.Xauthority',
|
|
|
|
],
|
|
|
|
:rmdir => '~/.fonts'
|
2012-03-10 17:04:33 +08:00
|
|
|
end
|