# -*- 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 92049 2012-04-16 19:29:20Z jmr@macports.org $

PortSystem          1.0

name                blitz
version             0.9
revision            1
categories          math devel
license             GPL-2+
platforms           darwin
maintainers         nomaintainer

description         a C++ class library for scientific computing

long_description    Blitz++ is ${description} which provides performance on \
                    par with Fortran 77/90. It uses template techniques to \
                    achieve high performance.

homepage            http://www.oonumerics.org/blitz/
master_sites        sourceforge:project/blitz/blitz/Blitz%2B%2B%20${version}

checksums           md5     031df2816c73e2d3bd6d667bbac19eca

patchfiles          patch-fix-gcc43plus-header-deps.diff

configure.args      --infodir=${prefix}/share/info \
                    --enable-shared \
                    --disable-doxygen \
                    --disable-dot \
                    --disable-fortran \
                    --disable-latex-docs

destroot.args       docdir=${prefix}/share/doc/${name}

variant gcc43 conflicts gcc44 gcc45 description {Use the gcc43 compiler} {
    depends_lib-append  port:gcc43
    configure.compiler  macports-gcc-4.3
}
variant gcc44 conflicts gcc43 gcc45 description {Use the gcc44 compiler} {
    depends_lib-append  port:gcc44
    configure.compiler  macports-gcc-4.4
}
variant gcc45 conflicts gcc43 gcc44 description {Use the gcc45 compiler} {
    depends_lib-append  port:gcc45
    configure.compiler  macports-gcc-4.5
}

pre-build {
    build.env-append    CC="${configure.cc}" \
                        CXX="${configure.cxx}" \
                        F77="${configure.f77}"
}
pre-destroot {
    destroot.env-append CC="${configure.cc}" \
                        CXX="${configure.cxx}" \
                        F77="${configure.f77}"
}

# does not build universal software
universal_variant   no

livecheck.distname  ${name} Blitz++
