Ticket #39282: Portfile.3

File Portfile.3, 3.8 KB (added by dstrubbe (David Strubbe), 11 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           active_variants 1.1
6
7name                octopus
8version             4.1.0
9categories          science
10platforms           darwin
11license             GPL-2+
12maintainers         gmail.com:dstrubbe
13
14description         A real-space (time-dependent) density-functional theory code.
15long_description    Octopus is a scientific program aimed at ab initio virtual experimentation \
16                    on a hopefully ever-increasing range of system types. \
17                    Electrons are described quantum-mechanically within density-functional \
18                    theory (DFT), in its time-dependent form (TDDFT) when doing simulations \
19                    in time. Nuclei are described classically as point particles. Electron-nucleus \
20                    interaction is described within the pseudopotential approximation.
21homepage            http://www.tddft.org/programs/octopus
22master_sites        ${homepage}/download/${version}
23
24checksums           rmd160  636cf345f53a8d558a79258a257ed68a17488b76 \
25                    sha256  e367b2e594d8344085c8c424c8a31b4a7210b80e83c2d331ee602cc6fc7c838a
26
27depends_lib         port:atlas port:libxc port:fftw-3 port:gsl
28
29configure.args      --with-libxc-prefix=${prefix} --with-blas=-lsatlas \
30                    --disable-gdlib --without-sparskit
31# configure will find and use gdlib and sparskit unless they are explicitly disabled
32
33pre-configure {
34    configure.args-append  FCCPP="${configure.cpp} -ansi"
35
36    if { [variant_isset gcc46] } {
37        require_active_variants libxc gcc46
38    }
39    if { [variant_isset gcc47] } {
40        require_active_variants libxc gcc47
41    }
42
43    if { [variant_isset netcdf] } {
44        require_active_variants netcdf-fortran {} universal
45        if {[variant_isset gcc46]} {
46            require_active_variants netcdf-fortran gcc46
47        } else {
48            require_active_variants netcdf-fortran gcc47
49        }
50    }
51
52    if { [variant_isset etsf_io] } {
53        if {[variant_isset gcc46]} {
54            require_active_variants etsf_io gcc46
55        } else {
56            require_active_variants etsf_io gcc47
57        }
58    }
59
60}
61configure.optflags  -O3
62
63# More options that could be added:
64# variants: berkeleygw, openmp, openmpi, mpich, threads (for fftw, atlas?), scalapack
65
66# libxc does not have universal variant, so octopus cannot either
67universal_variant   no
68
69test.run            yes
70test.target         check-full
71
72variant gcc46 conflicts gcc47 description {Build with GCC 4.6} {
73    configure.compiler  macports-gcc-4.6
74    depends_lib-append  port:gcc46
75}
76
77variant gcc47 conflicts gcc46 description {Build with GCC 4.7} {
78    configure.compiler  macports-gcc-4.7
79    depends_lib-append  port:gcc47
80}
81
82default_variants +newuoa
83if {![variant_isset gcc46]} {
84    default_variants    +gcc47
85}
86
87variant newuoa description {Build with internal newuoa library for optimal control} {
88    configure.args-append --enable-newuoa
89}
90
91variant netcdf description {Build with support for NetCDF output} {
92    configure.args-append   --with-netcdf-prefix=${prefix}
93    depends_lib-append      port:netcdf-fortran
94}
95
96variant etsf_io requires netcdf description {Build with support for ETSF_IO output} {
97    configure.args-append   --with-etsf-io-prefix=${prefix}
98    depends_lib-append      port:etsf_io
99}
100
101variant sparskit description {Build with support for SPARSKIT propagators} {
102    configure.args-delete   --without-sparskit
103    depends_lib-append      port:sparskit
104}
105
106variant gdlib description {Build with support for definition of domain by 2D image} {
107    configure.args-delete   --disable-gdlib
108    depends_lib-append      port:gd2
109}
110
111livecheck.type      regex
112livecheck.url       ${homepage}/wiki/index.php/Main_Page
113livecheck.regex     ${name} (\[0-9.\]+)