Ticket #35342: Portfile_sundials

File Portfile_sundials, 4.5 KB (added by jjstickel (Jonathan Stickel), 11 years ago)

shared libraries enabled

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: CVODE\
16                    solves initial value problems for ordinary differential\
17                    equation (ODE) systems.  CVODES solves ODE systems and\
18                    includes sensitivity analysis capabilities (forward and\
19                    adjoint).  IDA solves initial value problems for\
20                    differential-algebraic equation (DAE) systems.  IDAS solves\
21                    DAE systems and includes sensitivity analysis capabilities\
22                    (forward and adjoint).  KINSOL solves nonlinear algebraic\
23                    systems.
24
25homepage            https://computation.llnl.gov/casc/sundials/main.html
26master_sites        http://www.llnl.gov/casc/sundials/download/code/
27
28checksums           rmd160  c489fcb114f6846c7d5aef2d0eb096cb96f3fbc9 \
29                    sha256  9935760931fa6539edd0741acbcf4986770426fd5ea40e50ad4ebed0fc77b0d3
30
31patchfiles          sundials-2.5.0_destdir.patch
32patch.pre_args      -p1
33
34configure.args-append   --enable-shared
35
36# this is recommended for py-assiumulo, but I have not tested without,
37# JJS 7/27/12,
38# http://www.jmodelica.org/assimulo_home/installation.html
39configure.env-append    CFLAGS=-fPIC
40
41variant gcc45 conflicts gcc46 gcc47 gcc48 gcc49 description {Use the gcc45 compiler} {
42    depends_lib-append  port:gcc45
43    configure.compiler  macports-gcc-4.5
44}
45variant gcc46 conflicts gcc45 gcc47 gcc48 gcc49 description {Use the gcc46 compiler} {
46    depends_lib-append  port:gcc46
47    configure.compiler  macports-gcc-4.6
48}
49variant gcc47 conflicts gcc45 gcc46 gcc48 gcc49 description {Use the gcc47 compiler} {
50    depends_lib-append  port:gcc47
51    configure.compiler  macports-gcc-4.7
52}
53variant gcc48 conflicts gcc45 gcc46 gcc47 gcc49 description {Use the gcc48 compiler} {
54    depends_lib-append  port:gcc48
55    configure.compiler  macports-gcc-4.8
56}
57variant gcc49 conflicts gcc45 gcc46 gcc47 gcc48 description {Use the gcc49 compiler} {
58    depends_lib-append  port:gcc49
59    configure.compiler  macports-gcc-4.9
60}
61if { ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc48] && ![variant_isset gcc49] } {
62        default_variants      +gcc47
63}
64
65variant g95 description {Use g95 to compile fortran libraries} {
66    configure.args-append   F77=${prefix}/bin/g95
67    depends_lib-append      port:g95
68}
69
70variant atlas description {build with atlas} {
71    depends_lib-append port:atlas
72    configure.args-append --with-blas=${prefix}/lib/libtatlas.dylib
73    configure.args-append --with-lapack=${prefix}/lib/libtatlas.dylib
74}
75default_variants +atlas
76
77variant openmpi description {build with OpenMPI} conflicts mpich2 {
78    depends_lib-append port:openmpi
79    configure.args-append --with-mpicc=${prefix}/bin/openmpicc
80    configure.args-append --with-mpif77=${prefix}/bin/openmpif77
81}
82variant mpich2 description {build with MPICH2} conflicts openmpi {
83    # this variant needs testing, JJS 7/25/12
84    depends_lib-append port:mpich2
85    configure.args-append --with-mpicc=${prefix}/bin/mpicc
86    configure.args-append --with-mpif77=${prefix}/bin/mpif77
87}
88if {![variant_isset mpich2]} {
89    default_variants +openmpi
90}
91
92post-destroot {
93    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
94    xinstall -m 644 -W ${worksrcpath} LICENSE README ${destroot}${prefix}/share/doc/${name}
95}
96
97variant doc description {install pdf documentation} {
98    post-destroot {
99        system "cp -r ${worksrcpath}/doc/* ${destroot}${prefix}/share/doc/${name}/."
100        system "find ${destroot}${prefix}/share/doc -type f -exec chmod 644 {} \\;"
101    }
102}
103
104variant debug description {build with debug symbols} {
105    configure.optflags -g
106    configure.optflags-append -fbounds-check
107}
108
109variant static description {build and install static libraries} {
110    configure.args-delete   --enable-shared
111}
112
113# are the compiled example files being installed after building them? this
114# needs to be checked further, JJS 8/22/12
115variant examples description {build, run, and install examples} {
116    configure.args-append --enable-examples --with-exinstdir=${prefix}/share/examples
117}