source: trunk/dports/math/petsc/Portfile

Last change on this file was 153874, checked in by sean@…, 10 months ago

petsc: update to 3.7.4

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