aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-26 22:11:37 -0700
committerAdam Vandenberg2012-08-26 22:11:37 -0700
commitbf165b8afbcf45b115b53410380ff9fdb17c96dd (patch)
treef5e6e4b712679203c635c0941fe65ccd42deb108
parent3336332ae327eb6fbef40526ab097f193f0f6e6c (diff)
downloadhomebrew-bf165b8afbcf45b115b53410380ff9fdb17c96dd.tar.bz2
r: use new dsl
-rw-r--r--Library/Formula/r.rb20
1 files changed, 6 insertions, 14 deletions
diff --git a/Library/Formula/r.rb b/Library/Formula/r.rb
index 3177d54a1..7ad86694b 100644
--- a/Library/Formula/r.rb
+++ b/Library/Formula/r.rb
@@ -1,9 +1,5 @@
require 'formula'
-def valgrind?
- ARGV.include? '--with-valgrind'
-end
-
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
@@ -18,21 +14,17 @@ class R < Formula
head 'https://svn.r-project.org/R/trunk'
+ option 'with-valgrind', 'Compile an unoptimized build with support for the Valgrind debugger'
+
depends_on 'readline'
depends_on 'libtiff'
depends_on 'jpeg'
depends_on :x11
- depends_on 'valgrind' if valgrind?
-
- def options
- [
- ['--with-valgrind', 'Compile an unoptimized build with support for the Valgrind debugger.']
- ]
- end
+ depends_on 'valgrind' if build.include? 'with-valgrind'
def install
- ENV.Og if valgrind?
+ ENV.Og if build.include? 'with-valgrind'
ENV.fortran
args = [
@@ -41,10 +33,10 @@ class R < Formula
"--enable-R-framework",
"--with-lapack"
]
- args << '--with-valgrind-instrumentation=2' if valgrind?
+ args << '--with-valgrind-instrumentation=2' if build.include? 'with-valgrind'
# Pull down recommended packages if building from HEAD.
- system './tools/rsync-recommended' if ARGV.build_head?
+ system './tools/rsync-recommended' if build.head?
system "./configure", *args
system "make"