Ticket #39282: Portfile.2

File Portfile.2, 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}/downloads/${version}
23
24checksums           rmd160  cc365798de110e278227be31ad9ddf6c47768d1b \
25                    sha1    c54593f34f85671864b461ad2a460669c9891e71
26
27depends_lib         port:atlas port:libxc port:fftw-3 port:gsl
28
29pre-configure {
30    configure.args  FCCPP="${configure.cpp} -ansi" \
31                    --with-libxc-prefix=${prefix} --with-blas=-lsatlas \
32                    --disable-gdlib --without-sparskit
33# configure will find and use gdlib and sparskit unless they are explicitly disabled
34}
35configure.optflags  -O3
36
37# More options that could be added:
38# variants: berkeleygw, openmp, openmpi, mpich, threads (for fftw, atlas?), scalapack
39
40use_parallel_build  yes
41# libxc does not have universal variant, so octopus cannot either
42universal_variant   no
43
44test.run            yes
45test.cmd            make
46test.target         check-full
47
48variant gcc46 conflicts gcc47 description {Build with GCC 4.6} {
49    configure.compiler  macports-gcc-4.6
50    require_active_variants libxc gcc46
51    depends_lib-append  port:gcc46
52}
53
54variant gcc47 conflicts gcc46 description {Build with GCC 4.7} {
55    configure.compiler  macports-gcc-4.7
56    require_active_variants libxc gcc47
57    depends_lib-append  port:gcc47
58}
59
60default_variants +newuoa
61if {![variant_isset gcc46]} {
62    default_variants    +gcc47
63}
64
65variant newuoa description {Build with internal newuoa library for optimal control} {
66    configure.args-append --enable-newuoa
67}
68
69variant netcdf description {Build with support for NetCDF output} {
70    configure.args-append   --with-netcdf-prefix=${prefix}
71    depends_lib-append      port:netcdf-fortran
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    if {[variant_isset gcc46]} {
84        require_active_variants etsf_io gcc46
85    } else {
86        require_active_variants etsf_io gcc47
87    }
88}
89
90variant sparskit description {Build with support for SPARSKIT propagators} {
91    configure.args-delete   --without-sparskit
92    depends_lib-append      port:sparskit
93}
94
95variant gdlib description {Build with support for definition of domain by 2D image} {
96    configure.args-delete   --disable-gdlib
97    depends_lib-append      port:gd2
98}
99
100livecheck.type      regex
101livecheck.url       ${homepage}/wiki/index.php/Main_Page
102livecheck.regex     ${name} (\[0-9.\]+)