Ticket #39282: Portfile.4

File Portfile.4, 3.6 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}
36configure.optflags  -O3
37
38# More options that could be added:
39# variants: berkeleygw, openmp, openmpi, mpich, threads (for fftw, atlas?), scalapack
40
41# libxc does not have universal variant, so octopus cannot either
42universal_variant   no
43
44test.run            yes
45test.target         check-full
46
47variant gcc46 conflicts gcc47 description {Build with GCC 4.6} {
48    configure.compiler  macports-gcc-4.6
49    depends_lib-append  port:gcc46
50    require_active_variants libxc gcc46
51}
52
53variant gcc47 conflicts gcc46 description {Build with GCC 4.7} {
54    configure.compiler  macports-gcc-4.7
55    depends_lib-append  port:gcc47
56    require_active_variants libxc gcc47
57}
58
59default_variants +newuoa
60if {![variant_isset gcc46]} {
61    default_variants    +gcc47
62}
63
64variant newuoa description {Build with internal newuoa library for optimal control} {
65    configure.args-append --enable-newuoa
66}
67
68variant netcdf description {Build with support for NetCDF output} {
69    configure.args-append   --with-netcdf-prefix=${prefix}
70    depends_lib-append      port:netcdf-fortran
71
72    require_active_variants netcdf-fortran {} universal
73    if {[variant_isset gcc46]} {
74        require_active_variants netcdf-fortran gcc46
75    } else {
76        require_active_variants netcdf-fortran gcc47
77    }
78}
79
80variant etsf_io requires netcdf description {Build with support for ETSF_IO output} {
81    configure.args-append   --with-etsf-io-prefix=${prefix}
82    depends_lib-append      port:etsf_io
83
84    if {[variant_isset gcc46]} {
85        require_active_variants etsf_io gcc46
86    } else {
87        require_active_variants etsf_io gcc47
88    }
89}
90
91variant sparskit description {Build with support for SPARSKIT propagators} {
92    configure.args-delete   --without-sparskit
93    depends_lib-append      port:sparskit
94}
95
96variant gdlib description {Build with support for definition of domain by 2D image} {
97    configure.args-delete   --disable-gdlib
98    depends_lib-append      port:gd2
99}
100
101livecheck.type      regex
102livecheck.url       ${homepage}/wiki/index.php/Main_Page
103livecheck.regex     ${name} (\[0-9.\]+)