# -*- 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 compiler_blacklist_versions 1.0 PortGroup compilers 1.0 PortGroup conflicts_build 1.0 PortGroup muniversal 1.0 name libxc6 set my_name libxc version 6.2.2 revision 3 categories science license {MPL-2 LGPL-2.1+} maintainers {mascguy @mascguy} openmaintainer 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 8e1c0808a4d1f8c2fc860d80a7d8e4ecf7eda4f9 \ sha256 a0f6f1bba7ba5c0c85b2bfe65aca1591025f509a7f11471b4cd651a79491b045 \ size 64297852 # Avoid linking to 'libxc', if installed conflicts_build-append \ libxc compilers.choose fc compilers.setup require_fortran -g95 # g95 cannot handle F2003 here compiler.c_standard 1999 # gcc-4.2 builds port, but doesn't support -march=native and Fortran compiler.blacklist-append \ *gcc-4.* {clang < 421} set port_ver_major [lindex [split ${version} .] 0] set port_prefix ${prefix}/libexec/${name} set port_bin ${port_prefix}/bin configure.pre_args-delete \ --prefix=${prefix} configure.pre_args-append \ --prefix=${port_prefix} configure.args-append \ --disable-silent-rules \ --enable-shared \ --enable-static \ --program-suffix=-${port_ver_major} post-destroot { # Create bin symlinks set port_bin_list \ [glob -type f -directory ${destroot}${port_bin} *] foreach f ${port_bin_list} { set fname [file tail ${f}] ui_info "Symlinking bin: ${prefix}/bin/${fname} -> ${port_bin}/${fname}" ln -s ${port_bin}/${fname} ${destroot}${prefix}/bin/${fname} } } variant tests description {Enable Tests} { depends_test-append \ port:bash \ port:bzip2 test.run yes test.target check } if { ![variant_isset tests] } { # Regenerate everything, as we patch configure.ac, etc. use_autoreconf yes autoreconf.args -fvi patchfiles-append \ patch-tests-disable.diff } livecheck.type regex livecheck.url http://www.tddft.org/programs/libxc/download/previous livecheck.regex "${my_name}-(${port_ver_major}\.\[0-9\.\]+)${extract.suffix}"