diff options
| author | nibbles 2bits | 2012-05-17 13:57:36 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-07-02 07:53:48 -0800 |
| commit | 77c0e4bc7f3a127858e2e9459e57b62b81b6197e (patch) | |
| tree | 2e7e74414493166dc84193c061b9e4bad62b488e /Library/Formula | |
| parent | 4043be7c7f32c750f922224c84ccf197f9268693 (diff) | |
| download | homebrew-77c0e4bc7f3a127858e2e9459e57b62b81b6197e.tar.bz2 | |
open-mpi: Update to 1.6
Upgrade open-mpi to version 1.6, the new super stable.
Add code to build the Fortran bindings by default.
Add an option to disable building the Fortran bindings.
Add an option to run `make check`. Works with llvm-gcc.
Add a `fails_with :clang` because it fails `make check`.
Failure reported upstream and noted in comments.
Fix mv mpi.mod command. It wasn't moving the file to include.
Mv the vtsetup.jar out of bin into libexec to stop the warning.
Add a shell wrapper in bin, vtsetup.jar, for the jar in libexec.
Use bin/vtsetup.jar because `vtsetup` already exists in bin.
Use `make all` because the INSTALL docs say to use that target.
Works on Lion 10.7.4 using XCode-4.3.2.
Works on Snow Leopard 10.6.8 using XCode-4.0.2.
Closes #12302.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/open-mpi.rb | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/Library/Formula/open-mpi.rb b/Library/Formula/open-mpi.rb index 6c36584c1..e31cf122b 100644 --- a/Library/Formula/open-mpi.rb +++ b/Library/Formula/open-mpi.rb @@ -2,18 +2,48 @@ require 'formula' class OpenMpi < Formula homepage 'http://www.open-mpi.org/' - url 'http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.5.tar.gz' - md5 '28b2a7f9c2fcee0217facf47bf35d5ea' + url 'http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.tar.bz2' + sha1 '8b81eea712bb8f8120468003b5f29baecedf2367' + + # Reported upstream at version 1.6 here: + # http://www.open-mpi.org/community/lists/devel/2012/05/11003.php + fails_with :clang do + build 318 + cause 'fails make check' + end + + def options + [ + ['--disable-fortran', 'Do not build the Fortran bindings'], + ['--test', 'Verify the build with make check'] + ] + end def install # Compiler complains about link compatibility with FORTRAN otherwise ENV.delete('CFLAGS') ENV.delete('CXXFLAGS') - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make install" - + args = %W[ + --prefix=#{prefix} + --disable-dependency-tracking + --enable-ipv6 + ] + if ARGV.include? '--disable-fortran' + args << '--disable-mpi-f77' << '--disable-mpi-f90' + else + ENV.fortran + end + system './configure', *args + system 'make all' + system 'make check' if ARGV.include? '--test' + system 'make install' # If Fortran bindings were built, there will be a stra `.mod` file (Fortran # header) in `lib` that needs to be moved to `include`. - mv lib + 'mpi.mod', include if (lib + 'mpi.mod').exist? + mv "#{lib}/mpi.mod", include if File.exists? "#{lib}/mpi.mod" + mv "#{bin}/vtsetup.jar", libexec + (bin+'vtsetup.jar').write <<-EOS.undent + #!/bin/bash + java -jar "#{libexec}/vtsetup.jar" "$@" + EOS end end |
