homebrew-cask/Casks/r.rb

53 lines
1.9 KiB
Ruby
Raw Normal View History

2015-12-18 09:15:28 +08:00
cask 'r' do
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
url "https://cran.rstudio.com/bin/macosx/R-#{version}-snowleopard.pkg"
pkg "R-#{version}-snowleopard.pkg"
2014-08-09 22:10:15 +08:00
else
2016-05-05 02:45:30 +08:00
version '3.3.0'
sha256 '5b447d9d3369ecece719bf5e15a586eb6392a2159ffcccb756d5914eb7989cbe'
2015-01-18 10:49:39 +08:00
# rstudio.com is the official download host per the vendor homepage
url "https://cran.rstudio.com/bin/macosx/R-#{version}.pkg"
2015-05-04 21:08:50 +08:00
pkg "R-#{version}.pkg"
2014-04-23 01:03:04 +08:00
end
2015-04-23 05:36:04 +08:00
name 'R'
homepage 'https://www.r-project.org/'
license :gpl
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',
],
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.2/Resources/fontconfig/cache
'/Library/Frameworks/R.Framework/Versions/3.2',
]
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