Ticket #35342: Portfile_sundials_cmake

File Portfile_sundials_cmake, 3.8 KB (added by jjstickel (Jonathan Stickel), 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           cmake 1.0
6
7set mpi.optional    yes
8PortGroup           mpi 1.0
9
10name                sundials
11version             2.5.0
12categories          math devel
13platforms           darwin
14license             bsd
15supported_archs     noarch
16maintainers         sean openmaintainer
17description         SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
18long_description \
19 SUNDIALS consists of the following five solvers: CVODE solves initial value\
20 problems for ordinary differential equation (ODE) systems.  CVODES solves ODE\
21 systems and includes sensitivity analysis capabilities (forward and adjoint).\
22 IDA solves initial value problems for differential-algebraic equation (DAE)\
23 systems.  IDAS solves DAE systems and includes sensitivity analysis\
24 capabilities (forward and adjoint).  KINSOL solves nonlinear algebraic\
25 systems.
26
27homepage            https://computation.llnl.gov/casc/sundials/main.html
28master_sites        http://ftp.mcs.anl.gov/pub/petsc/externalpackages/
29
30checksums           rmd160  c489fcb114f6846c7d5aef2d0eb096cb96f3fbc9 \
31                    sha256  9935760931fa6539edd0741acbcf4986770426fd5ea40e50ad4ebed0fc77b0d3
32
33patchfiles          install_name_dir.patch
34
35# In-source-builds are not allowed
36configure.dir       ${worksrcpath}/build
37build.dir           ${configure.dir}
38
39configure.post_args ..
40configure.args-append    -DBUILD_SHARED_LIBS:BOOL=ON \
41    -DMPI_ENABLE:BOOL=OFF \
42
43# this is recommended for py-assiumulo, but I have not tested without,
44# JJS 7/27/12,
45# http://www.jmodelica.org/assimulo_home/installation.html
46configure.args-append    -DCMAKE_C_FLAGS=-fPIC
47
48
49variant gcc45 conflicts gcc46 gcc47 gcc48 gcc49 description {Use the gcc45 compiler to enable building of Fortran libraries} {
50    configure.compiler  macports-gcc-4.5
51    configure.args-append    -DFCMIX_ENABLE=ON
52}
53variant gcc46 conflicts gcc45 gcc47 gcc48 gcc49 description {Use the gcc46 compiler to enable building of Fortran libraries} {
54    configure.compiler  macports-gcc-4.6
55    configure.args-append    -DFCMIX_ENABLE=ON
56}
57variant gcc47 conflicts gcc45 gcc46 gcc48 gcc49 description {Use the gcc47 compiler to enable building of Fortran libraries} {
58    configure.compiler  macports-gcc-4.7
59    configure.args-append    -DFCMIX_ENABLE=ON
60}
61variant gcc48 conflicts gcc45 gcc46 gcc47 gcc49 description {Use the gcc48 compiler to enable building of Fortran libraries} {
62    configure.compiler  macports-gcc-4.8
63    configure.args-append    -DFCMIX_ENABLE=ON
64}
65variant gcc49 conflicts gcc45 gcc46 gcc47 gcc48 description {Use the gcc49 compiler to enable building of Fortran libraries} {
66    configure.compiler  macports-gcc-4.9
67    configure.args-append    -DFCMIX_ENABLE=ON
68}
69
70
71# if any mpi variant is selected then --enable-mpi
72foreach variant ${mpi.variants} {
73    if {[variant_isset $variant]} {
74        configure.args-delete      -DMPI_ENABLE:BOOL=OFF
75        configure.args-append      -DMPI_ENABLE:BOOL=ON
76    }
77}
78
79post-extract {
80    xinstall -d ${build.dir}
81}
82
83post-destroot {
84    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
85    xinstall -m 644 -W ${worksrcpath} LICENSE README ${destroot}${prefix}/share/doc/${name}
86}
87
88variant doc description {install pdf documentation} {
89    post-destroot {
90        system "cp -r ${worksrcpath}/doc/* ${destroot}${prefix}/share/doc/${name}/."
91        system "find ${destroot}${prefix}/share/doc -type f -exec chmod 644 {} \\;"
92    }
93}
94
95# are the compiled example files being installed after building them? this
96# needs to be checked further, JJS 8/22/12
97variant examples description {build, run, and install examples} {
98    configure.args-append --enable-examples --with-exinstdir=${prefix}/share/examples
99}
100
101livecheck.type      regex
102livecheck.regex     v.(\[0-9.\]+)