Ticket #40580: Portfile

File Portfile, 2.9 KB (added by fnog@…, 10 years ago)

Modified portfile for APE

Line 
1# -*- 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
2# $Id$
3
4PortSystem          1.0
5PortGroup           active_variants 1.1
6
7name                ape
8version             2.2.0
9categories          science
10platforms           darwin
11license             GPL-2+
12maintainers         uc.pt:fnog
13
14description         A tool for generating atomic pseudopotentials within a Density-Functional Theory framework.
15long_description    APE (Atomic Pseudopotentials Engine) is a computer package designed to generate \
16                    and test norm-conserving pseudo-potentials within Density Functional Theory. \
17                    The generated pseudo-potentials can be either non-relativistic, scalar \
18                    relativistic or fully relativistic and can explicitly include \
19                    semi-core states. A wide range of exchangecorrelation functionals is included. \
20                    APE can generate pseudopotential files for use with SIESTA, Abinit, OCTOPUS, \
21                    and Quantum Espresso.
22homepage            http://www.tddft.org/programs/APE
23master_sites        ${homepage}/sites/default/files
24
25checksums           rmd160  4f6e5ed09f354cfec12420354abf4346a9993d3e \
26                    sha256  6a64756cf53c89b99cb311f0ef2cd48ebc97474310bb99bac36f0f85a97d3d20
27
28depends_lib         port:libxc port:gsl
29
30configure.args      --with-libxc-prefix=${prefix}
31configure.optflags  -O3
32
33default_variants +newuoa
34if {![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48]} {
35    default_variants    +gcc48
36}
37
38pre-fetch {
39    set fortran unknown
40    set fortrans { gcc46 gcc47 gcc48 }
41
42    foreach fc_name ${fortrans} {
43        if { [variant_isset ${fc_name}] } {
44            set fortran ${fc_name} }
45    }
46
47    if { ${fortran} == "unknown" } {
48            ui_error "Internal error: cannot determine Fortran compiler."
49            return -code error "Internal error: cannot determine Fortran compiler."
50    }
51
52    if { ![active_variants libxc ${fortran}] } {
53        ui_error "libxc must have been built with +${fortran}."
54        return -code error "libxc must have been built with +${fortran}."
55    }
56
57}
58
59# libxc does not have universal variant, so APE cannot either
60universal_variant   no
61
62test.run            yes
63test.target         check-full
64
65variant gcc46 conflicts gcc47 gcc48 description {Build with GCC 4.6} {
66    configure.compiler  macports-gcc-4.6
67    configure.args-append  FCCPP="${configure.cpp} -ansi"
68}
69
70variant gcc47 conflicts gcc46 gcc48 description {Build with GCC 4.7} {
71    configure.compiler  macports-gcc-4.7
72    configure.args-append  FCCPP="${configure.cpp} -ansi"
73}
74
75variant gcc48 conflicts gcc46 gcc47 description {Build with GCC 4.8} {
76    configure.compiler  macports-gcc-4.8
77    configure.args-append  FCCPP="${configure.cpp} -ansi"
78}
79
80livecheck.type      regex
81livecheck.url       ${homepage}
82livecheck.regex     ${name} (\[0-9.\]+)