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

github.setup        worldveil photomosaic d24fb8599c97fec7cce11869be007ab7e31800f7
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             2020.06.03
revision            0
name                py-${github.project}
categories-append   graphics

license             public-domain
maintainers         nomaintainer
platforms           any
supported_archs     noarch

description         Creating fun photomosaics, GIFs, and murals from \
                    your family pictures using ML & similarity search

long_description    {*}${description}

checksums           rmd160  3c4ba6aa62d34befeac9a29349d9f70292cb284b \
                    sha256  a535bd251ba7a0a58ffbc54267dd3d216039444c27fe699a3780962c3b74854d \
                    size    206597225

python.versions     310

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools

    depends_run-append \
                    port:py${python.version}-beautifulsoup4 \
                    port:py${python.version}-boto3 \
                    port:py${python.version}-cython \
                    port:py${python.version}-dlib \
                    port:py${python.version}-faiss \
                    port:py${python.version}-imutils \
                    port:py${python.version}-ipdb \
                    port:py${python.version}-ipython \
                    port:py${python.version}-ipywidgets \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-moviepy \
                    port:py${python.version}-notebook \
                    port:py${python.version}-numpy \
                    port:py${python.version}-requests \
                    port:py${python.version}-scikit-image \
                    port:py${python.version}-scikit-learn \
                    port:py${python.version}-scipy \
                    port:py${python.version}-tqdm

    build {}

    destroot {
        set sharedir ${prefix}/share/${subport}
        xinstall -d ${destroot}${sharedir}
        xinstall -m 0644 {*}[glob ${worksrcpath}/*.py] ${destroot}${sharedir}
        foreach d { scripts } {
            copy ${worksrcpath}/${d} ${destroot}${sharedir}/${d}
        }
    }

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md \
            ${destroot}${docdir}
    }

    test.run        yes
}
