homebrew-core/Formula/open-mpi.rb

44 lines
1.3 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class OpenMpi < Formula
homepage 'http://www.open-mpi.org/'
url 'http://www.open-mpi.org/software/ompi/v1.7/downloads/openmpi-1.7.3.tar.bz2'
sha1 'ce61ee466ac2b21024c7d8dabc4f18676b2f1b76'
2013-03-26 05:31:24 +00:00
option 'disable-fortran', 'Do not build the Fortran bindings'
option 'enable-mpi-thread-multiple', 'Enable MPI_THREAD_MULTIPLE'
conflicts_with 'mpich2', :because => 'both install mpi__ compiler wrappers'
depends_on :fortran unless build.include? 'disable-fortran'
def install
args = %W[
--prefix=#{prefix}
--disable-dependency-tracking
--disable-silent-rules
--enable-ipv6
]
2012-10-21 19:47:53 +00:00
if build.include? 'disable-fortran'
args << '--disable-mpi-f77' << '--disable-mpi-f90'
end
if build.include? 'enable-mpi-thread-multiple'
args << '--enable-mpi-thread-multiple'
end
system './configure', *args
system 'make', 'all'
system 'make', 'check'
system 'make', 'install'
# If Fortran bindings were built, there will be a stray `.mod` file
# (Fortran header) in `lib` that needs to be moved to `include`.
2012-08-07 18:20:52 +00:00
include.install lib/'mpi.mod' if File.exists? "#{lib}/mpi.mod"
2012-08-07 18:20:52 +00:00
# Not sure why the wrapped script has a jar extension - adamv
libexec.install bin/'vtsetup.jar'
bin.write_jar_script libexec/'vtsetup.jar', 'vtsetup.jar'
end
end