Ticket #35342: Portfile_sundials.2

File Portfile_sundials.2, 4.0 KB (added by dershow, 11 years ago)

g95 variant added

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
5
6name                sundials
7version             2.5.0
8categories          math devel
9license             bsd
10platforms           darwin
11maintainers         gmail.com:jjstickel openmaintainer
12
13description         SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
14
15long_description    SUNDIALS consists of the following five solvers:\
16                    CVODE solves initial value problems for ordinary differential equation (ODE) systems.\
17                    CVODES solves ODE systems and includes sensitivity analysis capabilities (forward and adjoint).\
18                    IDA solves initial value problems for differential-algebraic equation (DAE) systems.\
19                    IDAS solves DAE systems and includes sensitivity analysis capabilities (forward and adjoint).\
20                    KINSOL solves nonlinear algebraic systems.
21
22homepage            https://computation.llnl.gov/casc/sundials/main.html
23master_sites        http://www.llnl.gov/casc/sundials/download/code/
24
25checksums           rmd160  c489fcb114f6846c7d5aef2d0eb096cb96f3fbc9 \
26                    sha256  9935760931fa6539edd0741acbcf4986770426fd5ea40e50ad4ebed0fc77b0d3
27
28patchfiles          sundials-2.5.0_destdir.patch
29patch.pre_args      -p1
30
31configure.args-append   --enable-shared
32
33# this is recommended for py-assiumulo, but I have not tested without,
34# JJS 7/27/12,
35# http://www.jmodelica.org/assimulo_home/installation.html
36configure.env-append    CFLAGS=-fPIC
37
38variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Use the gcc43 compiler} {
39    depends_lib-append  port:gcc43
40    configure.compiler  macports-gcc-4.3
41}
42variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Use the gcc44 compiler} {
43    depends_lib-append  port:gcc44
44    configure.compiler  macports-gcc-4.4
45}
46variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Use the gcc45 compiler} {
47    depends_lib-append  port:gcc45
48    configure.compiler  macports-gcc-4.5
49}
50variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Use the gcc46 compiler} {
51    depends_lib-append  port:gcc46
52    configure.compiler  macports-gcc-4.6
53}
54variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Use the gcc47 compiler} {
55    depends_lib-append  port:gcc47
56    configure.compiler  macports-gcc-4.7
57}
58if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset gcc47] } {
59        default_variants      +gcc45
60}
61
62variant atlas description {build with atlas} {
63    depends_lib-append port:atlas
64    configure.args-append --with-blas=${prefix}/lib/libtatlas.dylib
65    configure.args-append --with-lapack=${prefix}/lib/libtatlas.dylib
66}
67default_variants +atlas
68
69variant openmpi description {build with OpenMPI} conflicts mpich2 {
70    depends_lib-append port:openmpi
71    configure.args-append --with-mpicc=${prefix}/bin/openmpicc
72    configure.args-append --with-mpif77=${prefix}/bin/openmpif77
73}
74variant mpich2 description {build with MPICH2} conflicts openmpi {
75    # this variant needs testing, JJS 7/25/12
76    depends_lib-append port:mpich2
77    configure.args-append --with-mpicc=${prefix}/bin/mpicc
78    configure.args-append --with-mpif77=${prefix}/bin/mpif77
79}
80if {![variant_isset mpich2]} {
81    default_variants +openmpi
82}
83
84variant g95 {
85    configure.args-append   F77=${prefix}/bin/g95
86    depends_lib-append      port:g95
87}
88
89post-destroot {
90    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
91    xinstall -m 644 -W ${worksrcpath} LICENSE README ${destroot}${prefix}/share/doc/${name}
92}
93
94variant doc description {install pdf documentation} {
95    post-destroot {
96        system "cp -r ${worksrcpath}/doc/* ${destroot}${prefix}/share/doc/${name}/."
97        system "find ${destroot}${prefix}/share/doc -type f -exec chmod 644 {} \\;"
98    }
99}
100
101variant examples description {build, run, and install examples} {
102    configure.args-append --enable-examples --with-exinstdir=${prefix}/share/examples
103}