# $Id: Portfile,v 1.5 2006/04/14 13:03:18 mww Exp $

PortSystem 1.0

name			openmpi
version			1.0.2
categories		science parallel net
platforms		darwin
maintainers		mww@opendarwin.org
description		A High Performance Message Passing Library
long_description	Open MPI is a project combining technologies and resources \
			from several other projects (FT-MPI, LA-MPI, LAM/MPI, and \
			PACX-MPI) in order to build the best MPI library available. A \
			completely new MPI-2 compliant implementation, Open MPI offers \
			advantages for system and software vendors, application developers \
			and computer science researchers.

homepage		http://www.open-mpi.org/
master_sites	http://www.open-mpi.org/software/ompi/v1.0/downloads/ freebsd
checksums		md5 fd32861d643f9fe539a01d0d5b836f41 \
				sha1 f90a295a92769e95aa362153949c87aa14bf072a
use_bzip2		yes

pre-extract { file mkdir ${workpath}/build }

configure.dir	${workpath}/build
configure.cmd	${worksrcpath}/configure
configure.args	--disable-f77 --disable-f90 --disable-cxx \
				--enable-static --disable-shared \
				--sysconfdir=${prefix}/etc/${name} \
				--includedir=${prefix}/include/${name} \
				--bindir=${prefix}/lib/${name}/bin

build.dir		${configure.dir}

destroot.dir	${build.dir}
post-destroot {
	foreach bin { mpicc mpirun } {
		system "cd ${destroot}${prefix}/bin \
			&& ln -sf ${prefix}/lib/${name}/bin/${bin} open${bin}"
	}
}

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

