source: trunk/dports/math/slepc/Portfile @ 37219

Last change on this file since 37219 was 37219, checked in by mmoll@…, 12 years ago

math/slepc: new port, includes a fragile check of which fortran library to use for the arpack variant.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 37219 2008-05-30 15:52:10Z mmoll@macports.org $
2
3PortSystem      1.0
4
5name            slepc
6version         2.3.3
7categories      math science
8maintainers     mmoll
9description     Scalable Library for Eigenvalue Problem Computations
10long_description    SLEPc is a software library for the solution of large \
11    scale sparse eigenvalue problems on parallel computers. It is an \
12    extension of PETSc and can be used for either standard or generalized \
13    eigenproblems, with real or complex arithmetic. It can also be used for \
14    computing a partial SVD of a large, sparse, rectangular matrix.
15platforms       darwin
16homepage        http://www.grycap.upv.es/slepc
17master_sites    http://www.grycap.upv.es/slepc/download/distrib
18distname        ${name}-${version}
19
20# fixed up patch from official site:
21# (1) removed one patch that was rejected by patch,
22# (2) official path assumed "patch -p1", whereas MacPorts assumes "patch -p0".
23patchfiles      patch-${distname}-7.diff
24
25checksums       md5 5f9172c12f95ea0bebc73d45f4cdcaa0 \
26                sha1 17ffa8507ae81102178e5041e1f57c20cb9143c2
27
28depends_lib-append  port:petsc
29
30extract.suffix  .tgz
31configure.env-append    PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=darwin \
32                SLEPC_DIR=${worksrcpath}
33configure.cmd   ${worksrcpath}/config/configure.py
34configure.args  --prefix=${prefix}/lib/petsc
35build.env       PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=darwin \
36                SLEPC_DIR=${worksrcpath}
37destroot.env    PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=darwin \
38                SLEPC_DIR=${worksrcpath}
39destroot.destdir    SLEPC_INSTALL_DIR=${destroot}${prefix}/lib/petsc
40
41variant arpack description {compile with ARPACK support} {
42    pre-fetch {
43        if {![file exists ${prefix}/lib/libparpack.a]} {
44            return -code error "Please install the mpi variant of arpack first."
45        }
46    }
47    # This is a rather fragile way to figure out where the fortran library can be
48    # found that is needed to link against libparpack.a:
49    if {[file exists ${prefix}/lib/gcc43]} {
50        set fortrandir ${prefix}/lib/gcc43
51    } else {
52        if {[file exists ${prefix}/lib/gcc42]} {
53            set fortrandir ${prefix}/lib/gcc42
54        } else {
55            if {[file exists ${prefix}/lib/g95]} {
56                set fortrandir ${prefix}/lib/gcc95
57            } else {
58                return -code error "Please install a fortran compiler by installing one of the following ports: gcc42, gcc43, or g95."
59            }
60        }
61    }
62    depends_lib-append      port:arpack
63    configure.args-append   --with-arpack-dir=${fortrandir} \
64                --with-arpack-flags=-lparpack,-larpack,-lgfortran,-lmpi_f77
65}
66
67post-activate {
68    ui_msg "********************************************************"
69    ui_msg "* Add the following lines to your .bash_profile if you *"
70    ui_msg "* plan to use the PETSC/SLEPC makefile rules in        *"
71    ui_msg "* $prefix/lib/petsc/bmake:                             *"
72    ui_msg "*                                                      *"
73    ui_msg "*   export PETSC_DIR=${prefix}/lib/petsc               *"
74    ui_msg "*   export PETSC_ARCH=darwin                           *"
75    ui_msg "*   export SLEPC_DIR=${prefix}/lib/petsc               *"
76    ui_msg "*                                                      *"
77    ui_msg "********************************************************"
78}
Note: See TracBrowser for help on using the repository browser.