# -*- 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.6
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  5a1d74c1bcb65b60ac381853202c8d48aa29b7d8 \
                    sha256  0c8bf4c6d8b5bd663772b743972717ebaf06fb4788a6366311e264e634f085f4 \
                    size    295804

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."
}
