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

name                py-pdal-plugins
version             1.6.2
revision            0

categories-append   gis
license             BSD
maintainers         {yahoo.com:n_larsson @nilason} openmaintainer

description         PDAL Python Plugins
long_description    {*}${description} allow you to process data with PDAL into \
                    Numpy arrays. They support embedding Python in PDAL pipelines \
                    with the readers.numpy and filters.python stages.

homepage            https://www.pdal.io

distname            [string map {- _} ${python.rootname}]-${version}

checksums           rmd160  acecaafe5847e2af10b69ccdd9094f6546ebd3ce \
                    sha256  aa868401f2595e739b420a902ac1f63dfc38f0e4da77fcfd088a7fb4c4e4e342 \
                    size    575594

python.versions     39 310 311 312 313

patchfiles          patch_pyproject_pybind11.diff

if {${name} ne ${subport}} {
    compiler.cxx_standard \
                    2017

    depends_build-append \
                    path:bin/cmake:cmake \
                    port:ninja \
                    port:py${python.version}-pybind11 \
                    port:py${python.version}-scikit-build-core

    depends_lib-append \
                    port:pdal \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pdal

    build.env-append \
                    pybind11_DIR=${python.pkgd}/pybind11/share/cmake/pybind11
    
    notes-append \
        "Add '${python.pkgd}/pdal' to the environmental variable PDAL_DRIVER_PATH\
        to enable PDAL to locate the plugins."
}