# -*- 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

PortSystem          1.0

PortGroup           mpi 1.0
compilers.choose    cc cxx
mpi.setup           require -clang -g95 -gfortran

compiler.blacklist  {clang < 421} *llvm-gcc-4.2 *gcc-4.0 gcc-3.3

name                GASNet
version             1.26.3
revision            1
categories          devel net parallel net science
maintainers         {takeshi @tenomoto}
description         Global-Address Space Networking
license             BSD
long_description    \
    ${name} is a language-independent, low-level networking layer \
    that provides network-independent, high-performance communication \
    primitives tailored for implementing parallel global address space SPMD languages
homepage            http://gasnet.cs.berkeley.edu
platforms           darwin
master_sites        ${homepage}

checksums           rmd160  142664b23be82531d84460d87e9ffe361447c9a4 \
                    sha256  0f86cde63b7b6f095775b3636693eb27c0659938ce3604ea724ad66719febf38

depends_build       bin:perl:perl5

universal_variant   no

if {![gcc_variant_isset]} {
    default_variants-append +gcc6
}
set mpi [mpi_variant_name]
set cmp [gcc_variant_name]
if {${cmp} == ""} {
    set cmp mp
}

configure.args-append \
                    --mandir=${prefix}/share/man \
                    --enable-pthreads \
                    --disable-dependency-tracking \
                    --enable-trace \
                    --enable-stats \
                    --enable-udp \
                    --enable-mpi \
                    --enable-smp \
                    --disable-mxm \
                    --disable-portals4 \
                    --disable-ibv \
                    --disable-gemini \
                    --disable-aries \
                    --disable-shmem \
                    --disable-pami \
                    --enable-backtrace \
                    --disable-plpa \
                    --enable-mmap \
                    --enable-strict-prototypes \
                    --disable-aligned-segments \
                    --disable-hugetlbfs \
                    --enable-pshm \
                    --enable-pshm-sysv \
                    --disable-fca \
                    --with-mpi-cc=${prefix}/bin/mpicc-${mpi}-${cmp} \
                    --with-mpirun-cmd=${prefix}/bin/mpirun-${mpi}-${cmp}

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