source: trunk/dports/math/sundials/Portfile

Last change on this file was 153384, checked in by sean@…, 12 months ago

sundials: fix layout violation; closes #51964

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 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 153384 2016-09-29 18:53:41Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           mpi 1.0
7
8name                sundials
9version             2.6.2
10revision            1
11categories          math devel
12license             bsd
13platforms           darwin
14maintainers         sean openmaintainer
15
16description         SUite of Nonlinear and DIfferential/ALgebraic equation Solvers
17
18long_description    SUNDIALS consists of the following five solvers: CVODE\
19                    solves initial value problems for ordinary differential\
20                    equation (ODE) systems.  CVODES solves ODE systems and\
21                    includes sensitivity analysis capabilities (forward and\
22                    adjoint).  IDA solves initial value problems for\
23                    differential-algebraic equation (DAE) systems.  IDAS solves\
24                    DAE systems and includes sensitivity analysis capabilities\
25                    (forward and adjoint).  KINSOL solves nonlinear algebraic\
26                    systems.
27
28homepage            http://computation.llnl.gov/casc/sundials/main.html
29master_sites        http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/
30
31checksums           rmd160  da6549605b45ad698dfe40a5136b64a7a408d6c6 \
32                    sha256  d8ed0151509dd2b0f317b318a4175f8b95a174340fc3080b8c20617da8aa4d2f
33
34mpi.setup
35
36configure.args-append \
37                    -DCXX_ENABLE=OFF \
38                    -DLAPACK_ENABLE=ON \
39                    -DMPI_ENABLE=OFF
40
41
42configure.post_args ..
43configure.dir       ${worksrcpath}/build
44build.dir           ${worksrcpath}/build
45
46post-patch {
47    file mkdir ${worksrcpath}/build
48}
49
50pre-configure {
51    if {[mpi_variant_isset]} {
52        configure.args-delete -DMPI_ENABLE=OFF
53        configure.args-append -DMPI_ENABLE=ON \
54                              -DMPI_MPICC=${prefix}/bin/${mpi.cc} \
55                              -DMPI_RUN_COMMAND=${prefix}/bin/${mpi.exec}
56    }
57}
58
59post-destroot {
60    xinstall -d ${destroot}${prefix}/share/examples
61    move ${destroot}${prefix}/examples ${destroot}${prefix}/share/examples/${name}
62}
63
64if {![mpi_variant_isset]} {
65    default_variants      +mpich
66}
67
68if {![fortran_variant_isset] && ![mpi_variant_isset]} {
69    if {[variant_isset atlas]} {
70        ui_error "Atlas requires a fortran compiler"
71        return -code error "no fortran compiler selected"
72    }
73
74    # ensure that sundials doesn't try to find a fortran compiler in the user's
75    # path
76    pre-configure {
77        configure.f77
78        configure.f90
79        configure.fc
80    }
81} else {
82    configure.args-delete --without-blas --without-lapack
83    if {![variant_isset atlas]} {
84        configure.args-append \
85            -DLAPACK_LIBRARIES="/usr/lib/liblapack.dylib\;/usr/lib/libblas.dylib"
86    }
87}
88
89variant atlas description {build with atlas (requires a fortran compiler)} {
90    depends_lib-append port:atlas
91    configure.args-append -DLAPACK_LIBRARIES=${prefix}/lib/libtatlas.dylib
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      none
Note: See TracBrowser for help on using the repository browser.