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

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

petsc: add missing require of hdf5 for netcdf

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