source: trunk/dports/math/petsc/Portfile @ 146620

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

petsc-devel: update to newest commit

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.6 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 146620 2016-03-14 00:29:04Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup           bitbucket 1.0
6PortGroup           mpi 1.0
7
8bitbucket.setup     petsc petsc 3.6.3 v
9revision            1
10categories          math science
11maintainers         sean
12license             BSD
13description         Portable, Extensible Toolkit for Scientific Computation
14long_description    PETSc, pronounced PET-see (the S is silent), is a suite \
15                    of data structures and routines for the scalable (parallel) solution \
16                    of scientific applications modeled by partial differential equations. \
17                    It employs the MPI standard for all message-passing communication.
18
19platforms           darwin
20universal_variant   no
21
22checksums           rmd160  474b5c0cfb17657cdeb8a1b68590efee509b99c5 \
23                    sha256  007f24c7ec8ef4656248253b17e8c5bde5831f888c3a18059a7c7b044ee9e203
24
25mpi.setup
26
27use_parallel_build  no
28
29depends_build-append \
30                    port:sowing \
31                    port:c2html
32
33post-extract {
34    # superlu 4.3 works with 3.6.1, can remove this after next update
35    reinplace "s,4\.1,4.3,g" ${worksrcpath}/config/BuildSystem/config/packages/SuperLU_DIST.py
36    reinplace "s,5\.0,5.1,g" ${worksrcpath}/config/BuildSystem/config/packages/SuperLU.py
37}
38
39pre-configure {
40    configure.args-append \
41        CC="${configure.cc}" \
42        CXX="${configure.cxx}" \
43        FC="${configure.fc}" \
44        F77="${configure.fc}" \
45        F90="${configure.fc}" \
46        COPTFLAGS="${configure.optflags}" \
47        CXXOPTFLAGS="${configure.optflags}" \
48        FOPTFLAGS="${configure.optflags}" \
49        LDFLAGS="${configure.ldflags}" \
50        CPPFLAGS="${configure.cppflags}" \
51        CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
52        CXXFLAGS="${configure.cxxflags}" \
53        FFLAGS="${configure.fcflags}" \
54        FCFLAGS="${configure.fcflags}" \
55        F90FLAGS="${configure.fcflags}" \
56        PETSC_ARCH="arch-macports"
57
58    if {[mpi_variant_isset]} {
59        configure.args-delete --with-mpi=0 \
60                              --with-fc=0
61        configure.args-append --with-mpiexec=${mpi.exec}
62    } elseif {[fortran_variant_isset]} {
63        configure.args-delete --with-fc=0
64    }
65
66}
67
68subport petsc-devel {
69    bitbucket.setup     petsc petsc d89f5e7a10d7
70    bitbucket.livecheck master
71    name                petsc-devel
72    version             3.6.99
73    revision            21
74
75    checksums           rmd160  8fa1620dc49be3282af95f368c3c8f3734660d4f \
76                        sha256  c596826c6f2451de154b441b943650782d812a317a516d2997488ecdc6e54527
77}
78
79notes               "Add the following line to your .bash_profile if you plan to use\
80                    the PETSC makefile rules in $prefix/lib/petsc/conf: \n\
81                    \texport PETSC_DIR=${prefix}/lib/${name}"
82
83configure.args      --prefix=${prefix}/lib/${name} \
84                    --with-valgrind=0 \
85                    --with-mpi=0 \
86                    --with-fc=0 \
87                    --with-shared-libraries \
88                    --with-debugging=0 \
89                    --with-c2html-dir=${prefix} \
90                    --without-x
91
92post-destroot {
93    set dev ""
94    if {[string first "-devel" $subport] > 0} {
95        set dev "-devel"
96    }
97
98    move ${destroot}${prefix}/lib/${name}/lib/pkgconfig/PETSc.pc ${destroot}${prefix}/lib/pkgconfig/PETSc${dev}.pc
99}
100
101variant accelerate description {Use Accelerate framework for LAPACK} conflicts atlas {
102    configure.args-append --with-blas-lapack-lib=/System/Library/Frameworks/Accelerate.framework/Versions/Current/Accelerate
103}
104
105variant atlas description {Use Atlas for LAPACK} conflicts accelerate {
106    configure.args-append --with-blas-lapack-lib=${prefix}/lib/libtatlas.dylib
107}
108
109variant complex description {Build with support for complex numbers} conflicts sundials hwloc {
110    configure.args-append --with-scalar-type=complex
111    configure.args-append --with-clanguage=C++
112}
113
114variant hwloc description {Build with hwloc} conflicts complex {
115    depends_build-append  port:hwloc
116    configure.args-append --with-hwloc-dir=${prefix}
117}
118
119variant suitesparse description {Build with CHOLDMOD and UMFPACK} {
120    depends_lib-append    port:SuiteSparse
121    configure.args-append --with-suitesparse-dir=${prefix}
122}
123
124variant sundials description {Build with CVODE interface for TS} {
125    depends_lib-append    port:sundials
126    configure.args-append --with-sundials-dir=${prefix}
127    mpi.enforce_variant   sundials
128}
129
130if {[string first "-devel" $subport] > 0} {
131variant superlu description {Build with SuperLU interface for a serial direct solver} {
132    depends_lib-append    port:superlu
133    configure.args-append --with-superlu-dir=${prefix}
134}
135}
136
137variant mumps description {Build with MUMPS interface for a parallel direct solver} requires parmetis {
138    depends_lib-append    port:mumps
139    configure.args-append --with-scalapack-dir=${prefix} \
140                          --with-mumps-dir=${prefix}
141    mpi.enforce_variant   mumps
142}
143
144variant superlu_dist description {Build with SuperLU_DIST interface for a parallel direct solver} requires parmetis {
145    depends_lib-append    port:superlu_dist
146    configure.args-append --with-superlu_dist-dir=${prefix}
147    mpi.enforce_variant   superlu_dist
148}
149
150variant ml description {Build with ML interface for a sparse parallel solver} {
151    depends_lib-append    port:ml
152    configure.args-append --with-ml-dir=${prefix}
153    mpi.enforce_variant   ml
154}
155
156variant hypre description {Build with HYPRE interface for a sparse parallel solver} {
157    depends_lib-append    port:hypre
158    configure.args-append --with-hypre-dir=${prefix}
159    mpi.enforce_variant   hypre
160}
161
162variant parmetis description {Build with ParMetis interface for parallel graph partitioning} {
163    depends_lib-append    port:metis \
164                          port:parmetis
165    configure.args-append --with-metis-dir=${prefix} \
166                          --with-parmetis-dir=${prefix}
167    mpi.enforce_variant   parmetis
168}
169
170variant hdf5 description {Build with HDF5 interface for parallel file io} {
171    depends_lib-append    port:hdf5
172    configure.args-append --with-hdf5-dir=${prefix}
173
174    mpi.enforce_variant   hdf5
175}
176
177variant netcdf description {Build with NetCDF interface for parallel file io} requires hdf5 {
178    depends_lib-append    port:netcdf
179    configure.args-append --with-netcdf-dir=${prefix}
180    mpi.enforce_variant   netcdf
181}
182
183variant fftw description {Build with FFTW interface (requires MPI)} {
184    depends_lib-append    port:fftw-3
185    configure.args-append --with-fftw-dir=${prefix}
186    mpi.enforce_variant   fftw-3
187}
188
189variant yaml description {Build with YAML interface for option reading} {
190    depends_lib-append    port:libyaml
191    configure.args-append --with-yaml-dir=${prefix}
192}
193
194variant valgrind description {Build with valgrind support} {
195    depends_lib-append    port:valgrind
196    configure.args-delete --with-valgrind=0
197    configure.args-append --with-valgrind-dir=${prefix}
198}
199
200variant sprng description {Build with SPRNG interface for a sparse random number generator} {
201    depends_lib-append    port:sprng
202    configure.args-append --with-sprng-dir=${prefix}
203    mpi.enforce_variant   sprng
204}
205
206variant debug description {Build with debug support} {
207    configure.args-delete --with-debugging=0
208    configure.args-append --with-debugging=1
209}
210
211if {![mpi_variant_isset]} {
212    default_variants +mpich
213}
214
215if {![variant_isset atlas]} {
216    default_variants +accelerate
217}
218
219if {![variant_isset complex]} {
220    default_variants +hwloc
221}
222
223destroot.destdir    DESTDIR=${destroot}${prefix}/lib/${name}
Note: See TracBrowser for help on using the repository browser.