From 7f13f84de71401d3d86a0e8254d8a39b4aefb86b Mon Sep 17 00:00:00 2001 From: Dave Goodell Date: Thu, 17 May 2012 13:29:38 -0500 Subject: mpich2: add Fortran support (enabled by default) A user can pass `--disable-fortran` to avoid compiling the Fortran bindings. Also remove the redundant default `--with-device=ch3:nemesis` argument to configure. Signed-off-by: Charlie Sharpsteen --- Library/Formula/mpich2.rb | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/mpich2.rb b/Library/Formula/mpich2.rb index d03750a68..0bb6b69a9 100644 --- a/Library/Formula/mpich2.rb +++ b/Library/Formula/mpich2.rb @@ -6,13 +6,25 @@ class Mpich2 < Formula version '1.4.1p1' md5 'b470666749bcb4a0449a072a18e2c204' + def options + [ + ['--disable-fortran', "Do not attempt to build Fortran bindings"], + ] + end + def install - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--disable-f77", - "--disable-fc", - "--with-device=ch3:nemesis", - "--enable-shared" + args = [ + "--prefix=#{prefix}", + "--mandir=#{man}", + "--enable-shared" + ] + if ARGV.include? '--disable-fortran' + args << "--disable-f77" << "--disable-fc" + else + ENV.fortran + end + + system "./configure", *args system "make" system "make install" end -- cgit v1.2.3