2014-11-14 01:27:24 +08:00
|
|
|
cask :v1 => 'xquartz' do
|
2014-08-21 04:02:42 +08:00
|
|
|
version '2.7.7'
|
|
|
|
sha256 'c9b3a373b7fd989331117acb9696fffd6b9ee1a08ba838b02ed751b184005211'
|
2014-06-27 08:01:54 +08:00
|
|
|
|
2014-09-26 20:09:19 +08:00
|
|
|
url "https://xquartz.macosforge.org/downloads/SL/XQuartz-#{version}.dmg"
|
2014-10-15 23:43:58 +08:00
|
|
|
appcast 'http://xquartz-dl.macosforge.org/sparkle/release.xml',
|
|
|
|
:sha256 => '9792f0d6abd547e523f6ca33c4dd3847134bc3d46d77ac91b93fe932d6123568'
|
2015-01-05 04:45:58 +08:00
|
|
|
name 'XQuartz'
|
2014-06-27 08:01:54 +08:00
|
|
|
homepage 'http://xquartz.macosforge.org/'
|
2014-12-20 21:47:43 +08:00
|
|
|
license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder
|
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
|