# -*- 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 106288 2013-05-21 16:15:53Z macsforever2000@macports.org $

PortSystem          1.0

name                libxc
version             2.0.1
categories          science
platforms           darwin
license             LGPL-3+
maintainers         googlemail.com:fabian.renn

description         exchange-correlation functionals for DFT

long_description    Libxc is a library of exchange-correlation functionals \
                    for density-functional theory. The aim is to provide a \
                    portable, well tested and reliable set of exchange and \
                    correlation functionals that can be used by all the \
                    ETSF codes and also other codes.

homepage            http://www.tddft.org/programs/octopus/wiki/index.php/Libxc
master_sites        http://www.tddft.org/programs/octopus/download/libxc

checksums           rmd160  4aea4331120d78ced6cc1cb0740d4eddb4472797 \
                    sha256  c332f08648ec2bc7ccce83e45a84776215aa5dfebc64fae2a23f2ac546d41ea4

pre-configure {
    configure.args  FCCPP=${configure.cpp}
}

use_parallel_build  no

universal_variant   no

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

if {![variant_isset gcc45] && ![variant_isset gcc46]} {
    default_variants    +gcc47
}

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