1 | # $Id: Portfile 96223 2012-08-05 04:07:18Z mmoll@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name petsc |
---|
6 | version 3.3-p2 |
---|
7 | revision 1 |
---|
8 | categories math science |
---|
9 | maintainers mmoll |
---|
10 | description Portable, Extensible Toolkit for Scientific Computation |
---|
11 | long_description PETSc, pronounced PET-see (the S is silent), is a suite \ |
---|
12 | of data structures and routines for the scalable (parallel) solution \ |
---|
13 | of scientific applications modeled by partial differential equations. \ |
---|
14 | It employs the MPI standard for all message-passing communication. |
---|
15 | |
---|
16 | notes "Add the following line to your .bash_profile if you plan to use\ |
---|
17 | the PETSC makefile rules in $prefix/lib/petsc/conf: \n\ |
---|
18 | \texport PETSC_DIR=${prefix}/lib/petsc" |
---|
19 | |
---|
20 | platforms darwin |
---|
21 | homepage http://www.mcs.anl.gov/petsc/petsc-as/ |
---|
22 | master_sites ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/ \ |
---|
23 | http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/ |
---|
24 | distname ${name}-lite-${version} |
---|
25 | worksrcdir ${name}-${version} |
---|
26 | universal_variant no |
---|
27 | |
---|
28 | checksums rmd160 200d049d691bce307d576aec27a4af6799e19802 \ |
---|
29 | sha256 75c0b127f1ba5077ae9d87d39331fb7cf1258c98ca7fd1dcf0f29f6d29ad3ff5 |
---|
30 | |
---|
31 | depends_build-append port:cmake |
---|
32 | depends_lib-append port:hdf5-18 \ |
---|
33 | port:libyaml |
---|
34 | |
---|
35 | configure.args --prefix=${prefix}/lib/petsc \ |
---|
36 | --with-mpi=1 \ |
---|
37 | --with-clanguage=C++ \ |
---|
38 | --download-ml \ |
---|
39 | --download-metis \ |
---|
40 | --download-parmetis \ |
---|
41 | --download-blacs \ |
---|
42 | --download-scalapack \ |
---|
43 | --download-mumps \ |
---|
44 | --download-ptscotch \ |
---|
45 | --with-hdf5-dir=${prefix} \ |
---|
46 | --with-yaml-dir=${prefix} |
---|
47 | |
---|
48 | pre-configure { |
---|
49 | configure.args-append \ |
---|
50 | --COPTFLAGS="${configure.optflags}" \ |
---|
51 | --CXXOPTFLAGS="${configure.optflags}" \ |
---|
52 | --FOPTFLAGS="${configure.optflags}" \ |
---|
53 | --LDFLAGS="${configure.ldflags}" \ |
---|
54 | --CFLAGS="${configure.cflags}" \ |
---|
55 | --CXXFLAGS="${configure.cxxflags}" \ |
---|
56 | --FFLAGS="-lstdc++" |
---|
57 | } |
---|
58 | |
---|
59 | variant openmpi description {Build using the OpenMPI compiler} conflicts mpich2 { |
---|
60 | depends_lib-append port:openmpi |
---|
61 | configure.args-append \ |
---|
62 | --with-cc=${prefix}/bin/openmpicc \ |
---|
63 | --with-cxx=${prefix}/bin/openmpicxx \ |
---|
64 | --with-fc=${prefix}/bin/openmpif90 \ |
---|
65 | --with-mpiexec=${prefix}/bin/openmpiexec |
---|
66 | } |
---|
67 | |
---|
68 | variant mpich2 description {Build using the MPICH2 compiler} conflicts openmpi { |
---|
69 | depends_lib-append port:mpich2 |
---|
70 | configure.args-append \ |
---|
71 | --with-cc=${prefix}/bin/mpicc \ |
---|
72 | --with-cxx=${prefix}/bin/picxx \ |
---|
73 | --with-fc=${prefix}/bin/mpif90 \ |
---|
74 | --with-mpiexec=${prefix}/bin/mpiexec |
---|
75 | } |
---|
76 | |
---|
77 | default_variants +openmpi |
---|
78 | |
---|
79 | destroot.destdir DESTDIR=${destroot}${prefix}/lib/petsc |
---|
80 | |
---|
81 | livecheck.type regex |
---|
82 | livecheck.url http://www.mcs.anl.gov/petsc/petsc-2/download/index.html |
---|
83 | livecheck.regex petsc-lite-(\[0-9.\]+(-p\[0-9\]+))\\.tar\\.gz |
---|