2013-11-10 09:59:25 +08:00
|
|
|
class Xquartz < Cask
|
2014-08-21 04:02:42 +08:00
|
|
|
version '2.7.7'
|
|
|
|
sha256 'c9b3a373b7fd989331117acb9696fffd6b9ee1a08ba838b02ed751b184005211'
|
2014-06-27 08:01:54 +08:00
|
|
|
|
2014-08-21 04:02:42 +08:00
|
|
|
url 'https://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg'
|
2014-06-27 08:01:54 +08:00
|
|
|
appcast 'http://xquartz-dl.macosforge.org/sparkle/release.xml'
|
|
|
|
homepage 'http://xquartz.macosforge.org/'
|
|
|
|
|
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
|
|
|
|
|
|
|
# Set default path to X11 = 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 = avoid the need of relogin
|
|
|
|
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/'
|
2012-03-10 17:04:33 +08:00
|
|
|
end
|