# -*- 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-imagecodecs
epoch               1
version             2023.9.4
revision            0

categories-append   graphics
license             BSD
maintainers         {mps @Schamschula} openmaintainer

description         Image transformation, compression, and decompression codecs
long_description    {*}${description}

homepage            https://www.lfd.uci.edu/~gohlke/

checksums           rmd160  3e651f0ab2ae65a58b4d3c23eb73f7c27bd9ca7b \
                    sha256  1f09a2f9df6f6e29abbe2a20a1e7f5990edd1bd2c02dcb0611c841ffc5b8b178 \
                    size    9444396

python.versions     37 38 39 310 311

platforms {darwin >= 17}

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

     depends_lib-append \
                    port:blosc \
                    port:brotli \
                    port:brunsli \
                    port:bzip2 \
                    port:cfitsio \
                    port:charls \
                    port:giflib5 \
                    port:libaec \
                    port:libjpeg-turbo \
                    port:libjxl \
                    port:openjpeg \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pyobjc \
                    port:snappy \
                    port:tiff \
                    port:webp \
                    port:zopfli \
                    port:zstd

    post-patch {
        reinplace "s|%PREFIX%|${prefix}|g" \
            ${worksrcpath}/setup.py
    }
}
