1 | # $Id: Portfile 63559 2010-02-08 21:54:17Z mmoll@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name petsc |
---|
6 | version 3.0.0-p11 |
---|
7 | categories math science |
---|
8 | maintainers mmoll |
---|
9 | description Portable, Extensible Toolkit for Scientific Computation |
---|
10 | long_description PETSc, pronounced PET-see (the S is silent), is a suite \ |
---|
11 | of data structures and routines for the scalable (parallel) solution \ |
---|
12 | of scientific applications modeled by partial differential equations. \ |
---|
13 | It employs the MPI standard for all message-passing communication. |
---|
14 | platforms darwin |
---|
15 | homepage http://www-unix.mcs.anl.gov/petsc/petsc-as/ |
---|
16 | master_sites ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/ |
---|
17 | distname ${name}-lite-${version} |
---|
18 | worksrcdir ${name}-${version} |
---|
19 | universal_variant no |
---|
20 | checksums md5 ebaa7638bb30bce694c440f2f63f7b8b \ |
---|
21 | sha1 7fcba825134a8c65f53f4653bbf8b3bbac814d53 \ |
---|
22 | rmd160 d1f1708540d697a78421b8df1097c8a92243e0e3 |
---|
23 | |
---|
24 | depends_lib-append port:openmpi |
---|
25 | |
---|
26 | configure.env-append PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin |
---|
27 | configure.cmd ${worksrcpath}/config/configure.py |
---|
28 | configure.args --with-python --with-debugging=0 \ |
---|
29 | --with-c-support=1 --with-c++-support=1 --with-pic=fPIC \ |
---|
30 | --prefix=${prefix}/lib/petsc \ |
---|
31 | --with-cc=${prefix}/bin/openmpicc \ |
---|
32 | --with-cxx=${prefix}/bin/openmpicxx \ |
---|
33 | --with-mpiexec=${prefix}/bin/openmpiexec |
---|
34 | build.env PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin |
---|
35 | destroot.destdir INSTALL_DIR=${destroot}${prefix}/lib/petsc \ |
---|
36 | PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin |
---|
37 | post-destroot { |
---|
38 | reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/base |
---|
39 | reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/rules |
---|
40 | reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/petscvariables |
---|
41 | reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/variables |
---|
42 | } |
---|
43 | |
---|
44 | # disabled for now; no mpi support in fftw port yet |
---|
45 | # variant fftw description {build with fftw support} { |
---|
46 | # configure.args-append --with-fftw=1 --with-fftw-dir=${prefix} |
---|
47 | # depends_lib-append port:fftw-3 |
---|
48 | # } |
---|
49 | |
---|
50 | variant hdf5 description {build with support for HDF5 file format} { |
---|
51 | configure.args-append --with-hdf5=1 --with-hdf5-dir=${prefix} \ |
---|
52 | --LIBS=-lsz |
---|
53 | depends_lib-append port:hdf5-18 |
---|
54 | } |
---|
55 | |
---|
56 | variant triangle description {build with support for Triangle library} { |
---|
57 | configure.args-append --with-triangle=1 --with-triangle-dir=${prefix} |
---|
58 | depends_lib-append port:triangle |
---|
59 | } |
---|
60 | |
---|
61 | variant debug description {build with debugging support} { |
---|
62 | configure.args-delete --with-debugging=0 |
---|
63 | configure.args-append --with-debugging=1 |
---|
64 | } |
---|
65 | |
---|
66 | post-activate { |
---|
67 | ui_msg "******************************************************" |
---|
68 | ui_msg "* Add the following line to your .bash_profile if you " |
---|
69 | ui_msg "* plan to use the PETSC makefile rules in " |
---|
70 | ui_msg "* $prefix/lib/petsc/conf: " |
---|
71 | ui_msg "* " |
---|
72 | ui_msg "* export PETSC_DIR=${prefix}/lib/petsc " |
---|
73 | ui_msg "* " |
---|
74 | ui_msg "******************************************************" |
---|
75 | } |
---|
76 | |
---|
77 | livecheck.type regex |
---|
78 | livecheck.url http://www.mcs.anl.gov/petsc/petsc-2/download/index.html |
---|
79 | livecheck.regex petsc-lite-(\[0-9.\]+(-p\[0-9\]+))\\.tar\\.gz |
---|