# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 119604 2014-05-02 09:12:57Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0
PortGroup           mpi 1.0

mpi.setup           require

name                scalapack
version             2.0.2
categories          math
platforms           darwin
maintainers         sean openmaintainer
supported_archs     noarch
license             BSD
description         A package for solving linear equations
long_description    The ScaLAPACK (or Scalable LAPACK) library includes \
                    a subset of LAPACK routines redesigned for distributed \
                    memory MIMD parallel computers. Since version 2.0.0, \
                    ScaLAPACK includes BLACS.

homepage            http://www.netlib.org/scalapack/
master_sites        ${homepage}
extract.suffix      .tgz

checksums           rmd160  cbe6b783aab96cc73f37156b10e28accffdf28e3 \
                    sha256  0c74aeae690fe5ee4db7926f49c5d0bb69ce09eea75beb915e00bba07530395c

configure.args      -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \
                    -DBUILD_SHARED_LIBS=ON \
                    -DBUILD_TESTING=OFF

pre-configure {
    configure.args-append \
                    -DMPI_C_COMPILER=${mpi.cc} \
                    -DMPI_Fortran_COMPILER=${mpi.fc}
}

if {![mpi_variant_isset]} {
    default_variants +mpich
}

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
