# -*- 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           github 1.0

github.setup        FEniCS basix 0.10.0 v
revision            0
categories          science
license             MIT
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
homepage            https://fenicsproject.org
description         FEniCS finite element basis evaluation library
long_description    {*}${description}

checksums           rmd160  cf75690933acbec4f9749d25fc56517c86ae8c9d \
                    sha256  b93221dac7d3fea8c10e77617f6201036de35d0c5437440b718de69a28c3773f \
                    size    649342
github.tarball_from archive

cmake.source_dir    ${worksrcpath}/cpp

depends_lib-append  path:lib/libopenblas.dylib:OpenBLAS

compiler.cxx_standard 2020

# https://github.com/FEniCS/basix/issues/752
compiler.blacklist-append {clang < 1400}

# -DBLA_VENDOR is broken on Ventura for some reason.
configure.args-append \
                    -DBLAS_LIBRARIES="-lopenblas" \
                    -DLAPACK_LIBRARIES="-lopenblas" \
                    -DBUILD_SHARED_LIBS=ON
