Ticket #25920: Portfile

File Portfile, 3.4 KB (added by johnmichael.fischer@…, 14 years ago)
Line 
1# $Id: Portfile 63559 2010-02-08 21:54:17Z mmoll@macports.org $
2
3PortSystem      1.0
4
5name            petsc
6version     3.0.0-p11
7categories  math science
8maintainers     mmoll
9description     Portable, Extensible Toolkit for Scientific Computation
10long_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.
14platforms       darwin
15homepage        http://www-unix.mcs.anl.gov/petsc/petsc-as/
16master_sites    ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/
17distname        ${name}-lite-${version}
18worksrcdir      ${name}-${version}
19universal_variant   no
20checksums           md5     ebaa7638bb30bce694c440f2f63f7b8b \
21                    sha1    7fcba825134a8c65f53f4653bbf8b3bbac814d53 \
22                    rmd160  d1f1708540d697a78421b8df1097c8a92243e0e3
23
24depends_lib-append  port:openmpi
25
26configure.env-append    PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin
27configure.cmd   ${worksrcpath}/config/configure.py
28configure.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
34build.env       PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin
35destroot.destdir    INSTALL_DIR=${destroot}${prefix}/lib/petsc \
36        PETSC_DIR=${worksrcpath} PETSC_ARCH=darwin
37post-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
50variant 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
56variant 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
61variant debug description {build with debugging support} {
62    configure.args-delete --with-debugging=0
63    configure.args-append --with-debugging=1
64}
65
66post-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
77livecheck.type  regex
78livecheck.url   http://www.mcs.anl.gov/petsc/petsc-2/download/index.html
79livecheck.regex petsc-lite-(\[0-9.\]+(-p\[0-9\]+))\\.tar\\.gz