# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 60607 2009-11-16 18:38:54Z snc@macports.org $

PortSystem          1.0
name                mpich2
version             1.0.8
revision            1
categories          science parallel net
platforms           darwin
maintainers         nomaintainer
description         Message Passing Interface (MPI) Library
long_description \
   MPICH2 is an implementation of the Message-Passing Interface (MPI). The \
   goals of MPICH2 are to provide an MPI implementation for important \
   platforms, including clusters, SMPs, and massively parallel processors. \
   It also provides a vehicle for MPI implementation research and for \
   developing new and better parallel programming environments.

homepage            http://www-unix.mcs.anl.gov/mpi/mpich2/
master_sites        http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${version}/
checksums           md5     d9dfb6e38d7ca6f8ad92a191a413ee57 \
                    sha1    41d6f6ce1034ecec5c14fb03592730ae2dd071e5 \
                    rmd160  646cf50fbdc60a49809f4d0a6bcaf2835844db1f
patchfiles          patch-Makefile.in patch-src-util-createshlib.in

depends_lib         port:python25

# the default include-dir conflicts with openmpi!
configure.args      --with-thread-package=posix \
                    --enable-timer-type=gettimeofday \
                    --enable-cxx \
                    --mandir=${prefix}/share/man \
                    --with-htmldir=${prefix}/share/doc/${name} \
                    --includedir=${prefix}/include/${name} \
                    --with-docdir=${prefix}/share/doc/${name} \
                    --with-python=${prefix}/bin/python2.5 \
                    --disable-f77 --disable-f90

use_parallel_build  no

variant g95 description {Enable Fortran 77 and Fortran 90 bindings using g95} conflicts gcc42 gcc43 {
   depends_lib-append      port:g95
   configure.f77           "${prefix}/bin/g95"
   configure.fflags        "-i4"
   configure.f90           "${prefix}/bin/g95"
   configure.f90flags      "-i4"
   configure.args-append   --enable-f77 --enable-f90
}

variant gcc43 description {Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc43} conflicts g95 gcc42 {
   depends_lib-append    port:gcc43
   configure.compiler    macports-gcc-4.3
   configure.args-append   --enable-f77 --enable-f90
}

variant gcc42 description {Enable Fortran 77 and Fortran 90 bindings using gfortran from gcc42} conflicts g95 gcc43 {
   depends_lib-append    port:gcc42
   configure.compiler    macports-gcc-4.2
   configure.args-append   --enable-f77 --enable-f90
}

variant gforker description {Use gforker process manager instead of the default mpd} {
   configure.args-append   --with-pm=gforker
}

platform darwin {
   configure.args-append   --enable-sharedlibs=osx-gcc
}

