From bf165b8afbcf45b115b53410380ff9fdb17c96dd Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 26 Aug 2012 22:11:37 -0700 Subject: r: use new dsl --- Library/Formula/r.rb | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'Library/Formula') 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" -- cgit v1.2.3