# -*- 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 104769 2013-04-02 12:14:25Z ryandesign@macports.org $

PortSystem          1.0

name                silo
version             4.9
categories          science
platforms           darwin
maintainers         nomaintainer
license             BSD

description         mesh and field I/O library and scientific database

long_description    ${description}

homepage            https://wci.llnl.gov/codes/silo/
master_sites        ${homepage}silo-${version}/

checksums           sha1    47534662d880e9fec61aa7f55a72fa130a70c201 \
                    rmd160  6939158da08946c81f626ba5e0840cfe44a05f1d

distname            ${name}-${version}-bsd

depends_lib         port:zlib

use_parallel_build  yes

# Makefile:152: *** missing separator.  Stop.
configure.ccache    no

default_variants    +hdf5

configure.args      --enable-optimization \
                    --disable-fortran \
                    --with-zlib \
                    --enable-browser=no \
                    --enable-silex=no

test.run            yes
test.target         check

variant hdf5 description {Enable HDF5 support (recommended)} {
    depends_lib-append      port:hdf5-18
    configure.args-append   --with-hdf5=${prefix}
}

variant gcc44 description {
    Build with MacPorts gcc44 compiler.
} conflicts gcc45 gcc46 gcc47 {
    depends_lib-append          port:gcc44
    configure.compiler          macports-gcc-4.4
}

variant gcc45 description {
    Build with MacPorts gcc45 compiler.
} conflicts gcc44 gcc46 gcc47 {
    depends_lib-append          port:gcc45
    configure.compiler          macports-gcc-4.5
}

variant gcc46 description {
    Build with MacPorts gcc46 compiler.
} conflicts gcc44 gcc45 gcc47 {
    depends_lib-append          port:gcc46
    configure.compiler          macports-gcc-4.6
}

variant gcc47 description {
    Build with MacPorts gcc47 compiler.
} conflicts gcc44 gcc45 gcc46 {
    depends_lib-append          port:gcc47
    configure.compiler          macports-gcc-4.7
}

livecheck.type      regex
livecheck.url       ${homepage}downloads.html
livecheck.regex     ${name}-(\[0-9.\]+)-bsd
