# $Id: Portfile 111778 2013-10-01 16:32:53Z jmr@macports.org $

PortSystem 1.0

name			lam
version			7.1.3
revision                1
categories		net science parallel
# Starts off BSD-like but has more attribution and naming restrictions
license			Permissive GPLConflict
maintainers		nomaintainer
description		Local Area Multicomputer MPI implementation
long_description	LAM (Local Area Multicomputer) is an MPI programming \
				environment and development system for heterogeneous computers \
				on a network. With LAM, a dedicated cluster or an existing \
				network computing infrastructure can act as one parallel \
				computer solving one problem. It features extensive debugging \
				support in the application development cycle and peak \
				performance for production applications. LAM features a full \
				implementation of the MPI communication standard.
homepage		http://www.lam-mpi.org/
platforms		darwin
master_sites	http://www.lam-mpi.org/download/files/ \
				http://lam.squyres.com/download/files/ \
				http://lam.fries.net/download/files/ \
				http://www.thinkingnerds.com/lam/download/files/ \
				http://lam-mpi.lzu.edu.cn/download/files/
checksums           md5     dccca92409654f4f822b1d343ca75be6 \
                    sha1    4a583308c0442eb46f4fd0abe7e26ea3e1fd4adb \
                    rmd160  e0de240380d2275090bad0f0f57ac3a54b6d9f96
use_bzip2		yes
universal_variant	no

configure.args	--without-fc \
				--without-romio \
				--mandir=${prefix}/share/man

destroot.args	docdir=${prefix}/share/doc/lam

post-patch {
	reinplace {s|char\* argv)|char **argv)|} ${worksrcpath}/configure
	reinplace {s|char \*argv)|char **argv)|} ${worksrcpath}/configure
}

variant gcc43 description {enable Fortran support with GCC 4.3} conflicts gcc44 gcc45 gcc46 gcc47 g95 {
	depends_lib   path:lib/libgcc/libgcc_s.1.dylib:libgcc
	depends_build port:gcc43
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/gfortran-mp-4.3
}

variant gcc44 description {enable Fortran support with GCC 4.4} conflicts gcc43 gcc45 gcc46 gcc47 g95 {
	depends_lib   path:lib/libgcc/libgcc_s.1.dylib:libgcc
	depends_build port:gcc44
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/gfortran-mp-4.4
}

variant gcc45 description {enable Fortran support with GCC 4.5} conflicts gcc43 gcc44 gcc46 gcc47 g95 {
	depends_lib   path:lib/libgcc/libgcc_s.1.dylib:libgcc
	depends_build port:gcc45
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/gfortran-mp-4.5
}

variant gcc46 description {enable Fortran support with GCC 4.6} conflicts gcc43 gcc44 gcc45 gcc47 g95 {
	depends_lib   path:lib/libgcc/libgcc_s.1.dylib:libgcc
	depends_build port:gcc46
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/gfortran-mp-4.6
}

variant gcc47 description {enable Fortran support with GCC 4.7} conflicts gcc43 gcc44 gcc45 gcc46 g95 {
	depends_lib   path:lib/libgcc/libgcc_s.1.dylib:libgcc
	depends_build port:gcc47
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/gfortran-mp-4.7
}

variant g95 description {enable Fortran support with G95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 {
	depends_lib   port:g95
	configure.args-delete	--without-fc
	configure.args-append	--with-fc=${prefix}/bin/g95
}
