2014-11-14 01:26:47 +08:00
|
|
|
cask :v1 => 'r' do
|
2014-10-07 22:56:51 +08:00
|
|
|
|
2015-03-01 20:29:50 +08:00
|
|
|
if MacOS.release < :mavericks
|
2015-06-26 18:04:32 +08:00
|
|
|
version '3.2.1'
|
|
|
|
sha256 '88b9a20af00a916f3902ccac83098643b95a2801eb4775d38130b26871323a3f'
|
2015-01-18 10:49:39 +08:00
|
|
|
# rstudio.com is the official download host per the vendor homepage
|
2014-10-07 22:56:51 +08:00
|
|
|
url "http://cran.rstudio.com/bin/macosx/R-#{version}-snowleopard.pkg"
|
|
|
|
pkg "R-#{version}-snowleopard.pkg"
|
2014-08-09 22:10:15 +08:00
|
|
|
else
|
2015-08-17 20:53:11 +08:00
|
|
|
version '3.2.2'
|
|
|
|
sha256 '747bafd900695434133e200551e28fd1b2485473a9e374c80deb4bec73827d73'
|
2015-01-18 10:49:39 +08:00
|
|
|
# rstudio.com is the official download host per the vendor homepage
|
2015-05-04 21:08:50 +08:00
|
|
|
url "http://cran.rstudio.com/bin/macosx/R-#{version}.pkg"
|
|
|
|
pkg "R-#{version}.pkg"
|
2014-04-23 01:03:04 +08:00
|
|
|
end
|
2014-10-07 22:56:51 +08:00
|
|
|
|
2015-04-23 05:36:04 +08:00
|
|
|
name 'R'
|
2014-03-04 03:17:42 +08:00
|
|
|
homepage 'http://www.r-project.org/'
|
2014-12-05 01:07:24 +08:00
|
|
|
license :gpl
|
2014-10-07 22:56:51 +08:00
|
|
|
|
2015-03-02 01:00:01 +08:00
|
|
|
depends_on :macos => '>= :snow_leopard'
|
2015-03-01 20:29:50 +08:00
|
|
|
|
2014-07-15 01:20:18 +08:00
|
|
|
uninstall :pkgutil => [
|
|
|
|
# eg org.r-project.R.maverics.fw.pkg
|
|
|
|
# org.r-project.R.mavericks.GUI.pkg
|
|
|
|
'org\.r-project\.R\..*(fw|GUI)\.pkg',
|
|
|
|
# eg org.r-project.x86_64.tcltk.x11
|
|
|
|
'org.r-project\..*\.tcltk.x11',
|
|
|
|
],
|
2014-09-18 19:57:59 +08:00
|
|
|
:delete => [
|
|
|
|
# symlinks
|
|
|
|
'/usr/bin/R',
|
|
|
|
'/usr/bin/Rscript',
|
|
|
|
'/Library/Frameworks/R.Framework/Versions/Current',
|
|
|
|
# :pkgutil won't delete this dir if the fontconfig cache was written to at
|
2015-08-24 03:57:33 +08:00
|
|
|
# /Library/Frameworks/R.Framework/Versions/3.2/Resources/fontconfig/cache
|
|
|
|
'/Library/Frameworks/R.Framework/Versions/3.2',
|
2014-09-18 19:57:59 +08:00
|
|
|
]
|
2014-10-11 22:31:51 +08:00
|
|
|
zap :delete => [
|
|
|
|
'~/.R',
|
|
|
|
'~/.RData',
|
|
|
|
'~/.Rapp.history',
|
|
|
|
'~/.Rhistory',
|
|
|
|
'~/.Rprofile',
|
|
|
|
'~/Library/R',
|
|
|
|
'~/Library/Caches/org.R-project.R',
|
|
|
|
]
|
2014-12-27 21:36:08 +08:00
|
|
|
|
|
|
|
caveats do
|
|
|
|
files_in_usr_local
|
|
|
|
end
|
2014-03-04 03:17:42 +08:00
|
|
|
end
|