source: trunk/dports/math/sundials/Portfile @ 129988

Last change on this file since 129988 was 129988, checked in by sean@…, 5 years ago

sundials: update master_sites url; fixes #45613

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
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: Portfile 129988 2014-12-24 00:42:46Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup           mpi 1.0
6
7name                sundials
8version             2.5.0
9revision            1
10categories          math devel
11license             bsd
12platforms           darwin
13maintainers         sean openmaintainer
14
15description         SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
16
17long_description    SUNDIALS consists of the following five solvers: CVODE\
18                    solves initial value problems for ordinary differential\
19                    equation (ODE) systems.  CVODES solves ODE systems and\
20                    includes sensitivity analysis capabilities (forward and\
21                    adjoint).  IDA solves initial value problems for\
22                    differential-algebraic equation (DAE) systems.  IDAS solves\
23                    DAE systems and includes sensitivity analysis capabilities\
24                    (forward and adjoint).  KINSOL solves nonlinear algebraic\
25                    systems.
26
27homepage            http://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
33mpi.setup
34
35patchfiles          sundials-2.5.0_destdir.patch
36patch.pre_args      -p1
37
38configure.args      --enable-shared \
39                    --disable-mpi \
40                    --without-blas \
41                    --without-lapack
42
43if {![mpi_variant_isset]} {
44    default_variants      +mpich
45}
46
47if {![fortran_variant_isset] && ![mpi_variant_isset]} {
48    if {[variant_isset atlas]} {
49        ui_error "Atlas requires a fortran compiler"
50        return -code error "no fortran compiler selected"
51    }
52
53    # ensure that sundials doesn't try to find a fortran compiler in the user's
54    # path
55    pre-configure {
56        configure.f77
57        configure.f90
58        configure.fc
59    }
60} else {
61    configure.args-delete --without-blas --without-lapack
62    if {![variant_isset atlas]} {
63        configure.args-append --with-blas="-framework Accelerate" \
64                              --with-lapack="-framework Accelerate"
65    }
66}
67
68pre-configure {
69    if {[mpi_variant_isset]} {
70        configure.args-delete --disable-mpi
71        configure.args-append --enable-mpi \
72                              --with-mpicc=${mpi.cc} \
73                              --with-mpif77=${mpi.fc}
74    }
75}
76
77# gcc is hardcoded in libtool, so we change it to use the CC it found from
78# configure
79post-configure {
80    reinplace "s,`gcc,`\$CC," ${worksrcpath}/libtool
81}
82
83variant atlas description {build with atlas (requires a fortran compiler)} {
84    depends_lib-append port:atlas
85    configure.args-append --with-blas=${prefix}/lib/libtatlas.dylib
86    configure.args-append --with-lapack=${prefix}/lib/libtatlas.dylib
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        eval copy [glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}
97        system "find ${destroot}${prefix}/share/doc -type f -exec chmod 644 {} \\;"
98    }
99}
100
101livecheck.type      regex
102livecheck.regex     v.(\[0-9.\]+)
Note: See TracBrowser for help on using the repository browser.