r: use resource
This commit is contained in:
parent
ba031bc63c
commit
dd6d98ee13
1 changed files with 8 additions and 8 deletions
16
Formula/r.rb
16
Formula/r.rb
|
@ -1,12 +1,5 @@
|
||||||
require 'formula'
|
require 'formula'
|
||||||
|
|
||||||
class RBashCompletion < Formula
|
|
||||||
# This is the same script that Debian packages use.
|
|
||||||
url 'http://rcompletion.googlecode.com/svn-history/r28/trunk/bash_completion/R', :using => :curl
|
|
||||||
version 'r28'
|
|
||||||
sha1 'af734b8624b33f2245bf88d6782bea0dc5d829a4'
|
|
||||||
end
|
|
||||||
|
|
||||||
class R < Formula
|
class R < Formula
|
||||||
homepage 'http://www.r-project.org'
|
homepage 'http://www.r-project.org'
|
||||||
url 'http://cran.r-project.org/src/base/R-3/R-3.0.1.tar.gz'
|
url 'http://cran.r-project.org/src/base/R-3/R-3.0.1.tar.gz'
|
||||||
|
@ -26,6 +19,13 @@ class R < Formula
|
||||||
depends_on 'valgrind' => :optional
|
depends_on 'valgrind' => :optional
|
||||||
depends_on 'homebrew/science/openblas' if build.with? 'openblas'
|
depends_on 'homebrew/science/openblas' if build.with? 'openblas'
|
||||||
|
|
||||||
|
# This is the same script that Debian packages use.
|
||||||
|
resource 'completion' do
|
||||||
|
url 'http://rcompletion.googlecode.com/svn-history/r28/trunk/bash_completion/R', :using => :curl
|
||||||
|
version 'r28'
|
||||||
|
sha1 'af734b8624b33f2245bf88d6782bea0dc5d829a4'
|
||||||
|
end
|
||||||
|
|
||||||
def install
|
def install
|
||||||
args = [
|
args = [
|
||||||
"--prefix=#{prefix}",
|
"--prefix=#{prefix}",
|
||||||
|
@ -60,7 +60,7 @@ class R < Formula
|
||||||
ln_s prefix+"R.framework/Resources/man1/R.1", man1
|
ln_s prefix+"R.framework/Resources/man1/R.1", man1
|
||||||
ln_s prefix+"R.framework/Resources/man1/Rscript.1", man1
|
ln_s prefix+"R.framework/Resources/man1/Rscript.1", man1
|
||||||
|
|
||||||
RBashCompletion.new.brew { bash_completion.install 'R' }
|
bash_completion.install resource('completion')
|
||||||
|
|
||||||
prefix.install 'make-check.log' if build.include? 'test'
|
prefix.install 'make-check.log' if build.include? 'test'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue