-
-
Save stefanschmidt/6842577 to your computer and use it in GitHub Desktop.
Homebrew formula for GNU R GUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class RApp < Formula | |
ARCHS = "x86_64" | |
SYSTEM = "SnowLeopard64" | |
url 'http://cran.r-project.org/bin/macosx/Mac-GUI-1.62.tar.gz' | |
homepage 'http://cran.r-project.org/bin/macosx/' | |
sha1 '3f7ef605076cf537b304a05d979ae44d3cb054ab' | |
keg_only "This is a gui app (and a brew antipattern as such, but whatev)" | |
depends_on 'r' | |
def install | |
# R.app has its R framework path hardcoded. I wouldn't hardcode brew's R | |
# framework path either if I could find a way to get the path to it. | |
# This won't execute in Homebrew, so just create the link manually | |
if !File.exist?("/Library/Frameworks/R.framework") | |
ln_s "#{HOMEBREW_PREFIX}/Cellar/r/3.0.1/R.framework", | |
"/Library/Frameworks/R.framework" | |
end | |
system "xcodebuild -target R -configuration #{SYSTEM} -project R.xcodeproj"+ | |
" ARCHS=#{ARCHS}" | |
mv "build/#{SYSTEM}/R.app", "/Applications/R.app" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment