# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0
PortGroup           bitbucket 1.0
PortGroup           mpi 1.0

bitbucket.setup     slepc slepc4py 3.12.0
revision            0
name                py-slepc4py
categories-append   math
license             BSD
platforms           darwin
universal_variant   no
description         SLEPc for Python - Python bindings for SLEPc
long_description    ${description}

maintainers         {mcalhoun @MarcusCalhoun-Lopez} openmaintainer

checksums           rmd160  f972c74447f5862dac4a83096e00d2d2984ac59e \
                    sha256  97f8f30e86d268333a4bd45b144a81c90abc69d9e38254b376b2c10138aa0916 \
                    size    98846

mpi.setup           require

python.versions     27 35 36 37 38

build.env-append    PETSC_DIR=${prefix}/lib/petsc SLEPC_DIR=${prefix}/lib/slepc
destroot.env-append PETSC_DIR=${prefix}/lib/petsc SLEPC_DIR=${prefix}/lib/slepc

if {${subport} ne ${name}} {
    mpi.enforce_variant \
                    py${python.version}-petsc4py

    depends_build-append \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-cython

    depends_lib-append \
                    port:petsc \
                    port:slepc \
                    port:py${python.version}-petsc4py \
                    port:py${python.version}-numpy

    livecheck.type  none
}
