R: use optional dep for valgrind

This commit is contained in:
Jack Nagel 2013-06-25 21:17:59 -05:00
parent 63064df14c
commit 0968c01d32

View file

@ -22,19 +22,20 @@ class R < Formula
depends_on 'libtiff'
depends_on 'jpeg'
depends_on :x11
depends_on 'valgrind' if build.include? 'with-valgrind'
depends_on 'valgrind' => :optional
def install
ENV.Og if build.include? 'with-valgrind'
args = [
"--prefix=#{prefix}",
"--with-aqua",
"--enable-R-framework",
"--with-lapack"
]
args << '--with-valgrind-instrumentation=2' if build.include? 'with-valgrind'
if build.with? 'valgrind'
args << '--with-valgrind-instrumentation=2'
ENV.Og
end
# Pull down recommended packages if building from HEAD.
system './tools/rsync-recommended' if build.head?