# $Id: Portfile 55949 2009-08-21 18:16:56Z raimue@macports.org $

PortSystem 1.0

name            valgrind
version         3.5.0
categories      devel
platforms       darwin
maintainers     raimue

description     A powerful open-source memory debugger.
long_description \
    Valgrind is a powerful open-source memory debugger. When valgrind is \
    attached to a program, it intercepts calls to malloc/new/free/delete and \
    all memory operations are checked for invalid read or write.
homepage        http://valgrind.org
master_sites    http://valgrind.org/downloads/
use_bzip2 yes

depends_build   bin:perl:perl5
# Ignore trace reports about boost, Qt and OpenMP
# as they are only used for tests

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

checksums       md5     f03522a4687cf76c676c9494fcc0a517 \
                sha1    76678c2617278cc9fbda1232e4e56fb2a96b0eb8 \
                rmd160  dd0ca80d73daac774b9352fe7a07ab72aae767c9

variant mpich2 description {Use mpich2 for MPI support} {
    depends_lib-append port:mpich2
    configure.args-delete --without-mpicc
    configure.args-append --with-mpicc=${prefix}/bin/mpicc
}

variant openmpi description {Use openmpi for MPI support} {
    depends_lib-append port:openmpi
    configure.args-delete --without-mpicc
    configure.args-append --with-mpicc=${prefix}/bin/mpicc
}
