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

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

math/slepc: better error handling

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 100640 2012-12-18 15:45:34Z mmoll@macports.org $
2
3PortSystem      1.0
4PortGroup       conflicts_build 1.0
5
6name            slepc
7version         3.3-p3
8license         LGPL
9categories      math science
10maintainers     mmoll
11license         LGPL
12description     Scalable Library for Eigenvalue Problem Computations
13long_description    SLEPc is a software library for the solution of large \
14    scale sparse eigenvalue problems on parallel computers. It is an \
15    extension of PETSc and can be used for either standard or generalized \
16    eigenproblems, with real or complex arithmetic. It can also be used for \
17    computing a partial SVD of a large, sparse, rectangular matrix.
18notes           "Add the following lines to your .bash_profile if you plan to\
19                use the PETSC/SLEPC makefile rules in $prefix/lib/petsc/conf:\n\
20                \texport PETSC_DIR=${prefix}/lib/petsc\n\
21                \texport SLEPC_DIR=${prefix}/lib/petsc"
22
23platforms       darwin
24homepage        http://www.grycap.upv.es/slepc
25master_sites    http://www.grycap.upv.es/slepc/download/distrib
26distname        ${name}-${version}
27universal_variant   no
28
29checksums           md5     c6a9d7fe2f6eaff0ac65854d44c0bb57 \
30                    sha1    9af6b377cb8fe15ec33ea36ce6f1a4ea9ff81308 \
31                    rmd160  1fc621a1f88c9fcb1f288f9c51127c0f5305b6a8
32
33depends_lib-append  port:petsc
34
35configure.args        --prefix=${prefix}/lib/petsc
36build.env-append      PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=arch-installed-petsc SLEPC_DIR=${worksrcpath}
37destroot.env-append   PETSC_DIR=${prefix}/lib/petsc PETSC_ARCH=arch-installed-petsc SLEPC_DIR=${worksrcpath}
38destroot.cmd-append   SLEPC_DESTDIR=${destroot}${prefix}/lib/petsc
39
40conflicts_build     slepc
41
42variant arpack description {compile with ARPACK support} {
43    pre-fetch {
44        if {![file exists ${prefix}/lib/libparpack.a]} {
45            return -code error "Please install the openmpi or mpich2 variant of arpack first."
46        }
47    }
48    # This is a rather fragile way to figure out where the fortran library can be
49    # found that is needed to link against libparpack.a:
50    set fortrandirs {g95 gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48}
51    set fortrandir ""
52    foreach dir ${fortrandirs} {
53        if {[file exists ${prefix}/lib/${dir}]} {
54            set fortrandir ${prefix}/lib/${dir}
55        }
56    }
57    if {${fortrandir} == ""} {
58        ui_error "Install a fortran compiler by installing one of these ports:"
59        ui_error "gcc42, gcc43, gcc44, gcc45, gcc46, gcc47, gcc48, or g95."
60        return -code error "No fortran compiler installed"
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
67livecheck.type  regex
68livecheck.url   http://www.grycap.upv.es/slepc/download/download.htm
69livecheck.regex slepc-(\[0-9.\]+(-p\[0-9\]+))\\.tar.gz
Note: See TracBrowser for help on using the repository browser.