homebrew-cask/Casks/r.rb

52 lines
1.9 KiB
Ruby
Raw Normal View History

2014-11-14 01:26:47 +08:00
cask :v1 => 'r' do
2015-03-16 07:10:37 +08:00
version '3.1.3'
2015-03-01 20:29:50 +08:00
if MacOS.release < :mavericks
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
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
sha256 '28445419c73b03dd3e0e1199114e23c83e56a5140f8c43f37b63cb550dc0eba7'
2015-01-18 10:49:39 +08:00
# rstudio.com is the official download host per the vendor homepage
url "http://cran.rstudio.com/bin/macosx/R-#{version}-mavericks.pkg"
pkg "R-#{version}-mavericks.pkg"
2014-04-23 01:03:04 +08:00
end
2015-04-23 05:36:04 +08:00
name 'R'
2014-03-04 03:17:42 +08:00
homepage 'http://www.r-project.org/'
license :gpl
2015-03-02 01:00:01 +08:00
depends_on :macos => '>= :snow_leopard'
2015-03-01 20:29:50 +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',
]
caveats do
files_in_usr_local
end
2014-03-04 03:17:42 +08:00
end