mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
126 lines
5.3 KiB
Tcl
126 lines
5.3 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup mpi 1.0
|
|
PortGroup muniversal 1.0
|
|
|
|
name slepc
|
|
version 3.22.1
|
|
revision 0
|
|
categories math science
|
|
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
|
|
license BSD
|
|
description Scalable Library for Eigenvalue Problem Computations
|
|
long_description SLEPc is a software library for the solution of large \
|
|
scale sparse eigenvalue problems on parallel computers. It is an \
|
|
extension of PETSc and can be used for either standard or generalized \
|
|
eigenproblems, with real or complex arithmetic. It can also be used for \
|
|
computing a partial SVD of a large, sparse, rectangular matrix.
|
|
|
|
notes "Add the following lines to your .bash_profile if you plan to\
|
|
use the PETSC/SLEPC makefile rules in ${prefix}/lib/petsc/conf:\n\
|
|
\texport PETSC_DIR=${prefix}/lib/petsc\n\
|
|
\texport SLEPC_DIR=${prefix}/lib/slepc"
|
|
|
|
homepage https://slepc.upv.es
|
|
master_sites https://slepc.upv.es/download/distrib/
|
|
|
|
checksums rmd160 535f248681d580ec48ee705eda2d6a480c7851c7 \
|
|
sha256 badb5cb038d09dbf1cc8f34d194673ab011c69cc46888101955c786d21c8d8c9 \
|
|
size 1867493
|
|
|
|
mpi.setup default
|
|
mpi.enforce_variant petsc
|
|
|
|
depends_lib-append port:petsc
|
|
use_parallel_build no
|
|
|
|
set python_ver_dot 3.11
|
|
set python.version [string map {. ""} $python_ver_dot]
|
|
|
|
depends_build-append port:sowing \
|
|
port:python${python.version}
|
|
|
|
configure.python ${prefix}/bin/python${python_ver_dot}
|
|
|
|
post-patch {
|
|
reinplace "s|/usr/bin/env python3|${configure.python}|" ${worksrcpath}/configure
|
|
fs-traverse f [list ${worksrcpath}] {
|
|
if {[string match *.py ${f}]} {
|
|
reinplace "s|/usr/bin/env python3|${configure.python}|" ${f}
|
|
}
|
|
}
|
|
}
|
|
|
|
# allow configure script to find MacPorts Python
|
|
configure.env-append PATH=${frameworks_dir}/Python.framework/Versions/${python_ver_dot}/bin:$env(PATH)
|
|
|
|
configure.pre_args --prefix=${prefix}/lib/slepc
|
|
if {!${universal_possible} || ![variant_isset universal]} {
|
|
configure.env-append PETSC_DIR=${prefix}/lib/petsc
|
|
build.env-append PETSC_DIR=${prefix}/lib/petsc
|
|
destroot.env-append PETSC_DIR=${prefix}/lib/petsc
|
|
} else {
|
|
foreach arch ${configure.universal_archs} {
|
|
if {${arch} eq ${build_arch}} {
|
|
set merger_configure_env(${arch}) PETSC_DIR=${prefix}/lib/petsc
|
|
set merger_build_env(${arch}) PETSC_DIR=${prefix}/lib/petsc
|
|
set merger_destroot_env(${arch}) PETSC_DIR=${prefix}/lib/petsc
|
|
} else {
|
|
set merger_configure_env(${arch}) PETSC_DIR=${prefix}/lib/petsc/${arch}
|
|
set merger_build_env(${arch}) PETSC_DIR=${prefix}/lib/petsc/${arch}
|
|
set merger_destroot_env(${arch}) PETSC_DIR=${prefix}/lib/petsc/${arch}
|
|
}
|
|
}
|
|
}
|
|
|
|
configure.universal_args-delete --disable-dependency-tracking
|
|
|
|
if {${universal_possible} && [variant_isset universal]} {
|
|
merger-post-destroot {
|
|
foreach arch ${configure.universal_archs} {
|
|
if {${arch} ne ${build_arch}} {
|
|
xinstall -d -m 0755 ${destroot}-${arch}${prefix}/lib/${arch}
|
|
fs-traverse fl ${destroot}-${arch}${prefix}/lib/slepc {
|
|
set trg [string map "${destroot}-${arch}${prefix}/lib/slepc ${prefix}/lib/slepc" ${fl}]
|
|
set sfl [string map "${destroot}-${arch}${prefix}/lib/slepc ${destroot}-${arch}${prefix}/lib/${arch}" ${fl}]
|
|
if {[file isdir ${fl}]} {
|
|
xinstall -d -m 0755 ${sfl}
|
|
} elseif {[file extension ${fl}] eq ".pc"} {
|
|
# do nothing
|
|
} elseif {[file extension ${fl}] eq ".mod"} {
|
|
move ${fl} ${sfl}
|
|
} elseif {[file tail ${fl}] eq "uninstall.py"} {
|
|
move ${fl} ${sfl}
|
|
} else {
|
|
ln -s ${trg} ${sfl}
|
|
}
|
|
}
|
|
move \
|
|
${destroot}-${arch}${prefix}/lib/${arch} \
|
|
${destroot}-${arch}${prefix}/lib/slepc/
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
variant arpack description {compile with ARPACK support} {
|
|
mpi.enforce_variant arpack
|
|
|
|
pre-fetch {
|
|
if {![file exists ${prefix}/lib/libparpack.a]} {
|
|
return -code error "Please install a mpi variant of arpack first."
|
|
}
|
|
}
|
|
|
|
depends_lib-append port:arpack
|
|
configure.args-append --with-arpack-dir=${prefix} \
|
|
--with-arpack-flags=-lparpack,-larpack
|
|
}
|
|
|
|
post-destroot {
|
|
move ${destroot}${prefix}/lib/${name}/lib/pkgconfig/slepc.pc ${destroot}${prefix}/lib/pkgconfig/
|
|
}
|
|
|
|
livecheck.url https://slepc.upv.es/download
|