# -*- 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-scikit-image
python.rootname     scikit_image
version             0.26.0
revision            0

categories-append   science
license             BSD

python.versions     310 311 312 313 314
python.pep517_backend   meson

maintainers         {stromnov @stromnov} openmaintainer

description         Image processing algorithms for SciPy.

long_description    Image processing algorithms for SciPy, including IO, \
                    morphology, filtering, warping, color manipulation, \
                    object detection, etc.

homepage            https://scikit-image.org/

checksums           md5 ff00b2a521e4caa6cd03f204f0f8a899 \
                    rmd160 25178f23ca6daaf994add2b534ae6917e645fdd7 \
                    sha256 f5f970ab04efad85c24714321fcc91613fcb64ef2a892a13167df2f3e59199fa \
                    size   22729739

if {${name} ne ${subport}} {
    compiler.openmp_version 2.5

    depends_build-append \
                        path:bin/cython-${python.branch}:py${python.version}-cython \
                        port:py${python.version}-pythran

    depends_lib-append  port:py${python.version}-lazy_loader \
                        port:py${python.version}-numpy \
                        port:py${python.version}-packaging \
                        port:py${python.version}-scipy

    depends_run-append  port:py${python.version}-matplotlib \
                        port:py${python.version}-networkx \
                        port:py${python.version}-Pillow \
                        port:py${python.version}-imageio \
                        port:py${python.version}-pywavelets \
                        port:py${python.version}-tifffile

    post-patch {
        reinplace "s|#!/usr/bin/env python.*|#!${python.bin}|" \
            {*}[glob -directory ${worksrcpath}/src/skimage/_build_utils {[a-z]*.py}]
    }

    build.env-append        PATH=${python.prefix}/bin:$::env(PATH)
}
