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

name                libxc
set my_name         libxc
version             2.2.3
revision            1
# HORTON cannot use version 3 yet. There is also libxc4 port.
categories          science
license             LGPL-3+
maintainers         {dstrubbe @dstrubbe}

conflicts           libxc4

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            https://www.tddft.org/programs/libxc/
master_sites        https://www.tddft.org/programs/libxc/down.php?file=${version}
distname            ${my_name}-${version}
dist_subdir         ${my_name}

checksums           rmd160  28e7d96c49aebfc4d7b7d16edc91565bc2fd8eea \
                    sha256  2f2b00b77a75c7fe8fe3f3ae70700cf28a09ff8d0ce791e47980ff7f9cde68e7 \
                    size    734714

compilers.choose    fc
compilers.setup     require_fortran
# g95 gives seg fault running tests

universal_variant   no

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       http://www.tddft.org/programs/libxc/download/previous
livecheck.regex     "${my_name}-(2\.\[0-9\.\]+).tar.gz"