# -*- 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           cmake 1.1
PortGroup           linear_algebra 1.0

name                pastix
version             6.4.0
revision            0

categories          science
license             LGPL-3
maintainers         {mps @Schamschula} openmaintainer
description         PaStiX: A sparse direct solver
long_description    {*}${description} PaStiX (Parallel Sparse matriX package) is a \
                    scientific library that provides a high performance parallel solver \
                    for very large sparse linear systems based on direct methods. \
                    Numerical algorithms are implemented in single or double precision \
                    (real or complex) using LLt, LDLt and LU with static pivoting (for \
                    non symmetric matrices having a symmetric pattern). This solver \
                    also provides some low-rank compression methods to reduce the \
                    memory footprint and/or the time-to-solution.
homepage            https://solverstack.gitlabpages.inria.fr/pastix/
master_sites        https://files.inria.fr/pastix/releases/v6/

checksums           rmd160  6e66f689d2f43f4bd310650953840ee4906a047e \
                    sha256  891d426188eed56c1075fb34d2d80132593a1536ffc05cf333567f68a4811e55 \
                    size    2096924

depends_build-append \
                    port:pkgconfig

depends_lib         port:gcc15 \
                    port:hwloc \
                    port:metis \
                    port:scotch

pre-configure {
    configure.args-append \
                    ${cmake_linalglib}
}

configure.args-append \
                    -DCMAKE_Fortran_COMPILER=${prefix}/bin/gfortran-mp-15 \
                    -DPASTIX_INT64=OFF \
                    -DPASTIX_ORDERING_METIS=ON

livecheck.type      regex
livecheck.url       https://files.inria.fr/pastix/releases/
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
