Ticket #50474: Portfile

File Portfile, 3.6 KB (added by cram5431@…, 9 years ago)
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           mpi 1.0
6
7name                atompaw
8version             4.0.0.12
9categories          science
10platforms           darwin
11license             GPL-3
12maintainers         gmail.com:cram5431 \
13                    openmaintainer
14
15description         Software for generating PAW atomic datasets to be used by first-principle simulation codes
16
17long_description    ATOMPAW is a program to be used for the generation of atomic datasets \
18                    needed by first-principle simulation software based on the \
19                    "Projector Augmented-Wave" (PAW) approach. Such software allow to \
20                    find the electronic structure of materials within the Density-Functional theory. \
21                    ATOMPAW produces, for a given atomic species, a set of basis and projectors \
22                    functions, as well as some additional atomic data stored in a PAW dataset \
23                    (text file). PAW datasets can be written in a XML file (conforming to XML-PAW \
24                    standard) or in several proprietary formats (ABINIT, SOCORRO, Quantum Espresso, ...).
25
26master_sites        http://users.wfu.edu/natalie/papers/pwpaw
27homepage            ${master_sites}/man.html
28
29checksums           rmd160  9afefbceb0c29560c8760874b79ed0b4a3fa7338 \
30                    sha256  693826cc5211cef965a619446a031d2207db45c3a570f470b685cb8ad538c2d5
31
32compilers.choose    fc
33
34configure.args      --disable-shared
35configure.optflags  -O3
36
37#apparently, parallel build does not work
38#not an issue; this is a small code
39use_parallel_build  no
40
41default_variants +libxc
42
43if {![variant_isset accelerate] && ![variant_isset atlas] && ![variant_isset openblas]} {
44    default_variants-append +accelerate
45}
46
47variant accelerate conflicts atlas openblas description {Build with linear algebra from built-in Accelerate framework} {
48    depends_lib-append      port:veclibfort
49    configure.args-append   --with-linalg-libs=-lveclibfort
50}
51
52variant atlas conflicts accelerate openblas description {Build with linear algebra from ATLAS} {
53    depends_lib-append      port:atlas
54    configure.args-append   --with-linalg-libs=-lsatlas
55}
56
57variant openblas conflicts accelerate atlas description {Build with linear algebra from OpenBLAS} {
58    # allow OpenBLAS-devel too
59    depends_lib-append      path:lib/libopenblas.dylib:OpenBLAS
60    require_active_variants path:lib/libopenblas.dylib:OpenBLAS lapack
61    configure.args-append   --with-linalg-libs=-lopenblas
62}
63
64variant libxc description {Build with support for libXC exchange-correlation library} {
65    depends_lib-append      port:libxc
66    compilers.enforce_fortran libxc
67    configure.args-append   --with-libxc-libs="-I${prefix}/lib -lxc -lxcf90"
68    configure.args-append   --with-libxc-incs="-I${prefix}/include"
69}
70
71pre-configure {
72    if {[fortran_variant_name] eq "g95"} {
73        configure.fcflags-append -ffree-line-length-huge
74    } else {
75        configure.fcflags-append -ffree-line-length-none
76    }
77
78    if { [variant_isset libxc] } {
79        configure.args-append --enable-libxc
80    }
81}
82
83destroot {
84    xinstall -W ${worksrcpath}/src atompaw ${destroot}${prefix}/bin
85}
86
87#universal variant not allowed for libxc
88universal_variant   no
89
90#this is not actually a test
91test.run            yes
92test.cmd            src/atompaw --version
93
94pre-configure {
95    configure.args-append  FCCPP="${configure.cc} -E -ansi"
96}
97
98livecheck.type      regex
99livecheck.url       ${master_sites}
100livecheck.regex     atompaw-(\[0-9.\]+).tar.gz