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-05-04 21:08:50 +08:00
|
|
|
version '3.1.3'
|
2015-03-16 07:10:37 +08:00
|
|
|
sha256 '4d590d285e5085073ff1a1cb525a2261895b0bf3998a24071efadb33b2be530e'
|
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-05-04 21:08:50 +08:00
|
|
|
version '3.2.0'
|
|
|
|
sha256 '97552ad7e916e4aa94436ea692b2dae0c811e0a9b90fff6952050b1a529b2d39'
|
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
|
|
|
|
# /Library/Frameworks/R.Framework/Versions/3.1/Resources/fontconfig/cache
|
|
|
|
'/Library/Frameworks/R.Framework/Versions/3.1',
|
|
|
|
]
|
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
|