# -*- 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
PortGroup           compiler_wrapper 1.0

name                py-rasterio
version             1.3.8
revision            2
categories-append   gis
license             BSD

python.versions     38 39 310 311
python.pep517       yes

maintainers         {stromnov @stromnov} openmaintainer

description         Rasterio reads and writes geospatial raster data.
long_description    {*}${description}

homepage            https://github.com/rasterio/rasterio

checksums           rmd160  6dc0cfed98de8e9c1ad736df8527c03cf97aa21e \
                    sha256  ffdd18e78efdf8ad5861065fd812a66dd34264293317ff6540a078ea891cdef8 \
                    size    412381

if {${name} ne ${subport}} {
    depends_build-append \
                        path:bin/cython-${python.branch}:py${python.version}-cython

    depends_lib-append  port:py${python.version}-affine \
                        port:py${python.version}-attrs \
                        port:py${python.version}-certifi \
                        port:py${python.version}-click \
                        port:py${python.version}-cligj \
                        port:py${python.version}-numpy \
                        port:py${python.version}-snuggs \
                        port:py${python.version}-click-plugins \
                        port:py${python.version}-setuptools \
                        port:gdal

    post-patch {
        reinplace "s|oldest-supported-numpy|numpy|g" ${worksrcpath}/pyproject.toml
    }
}
