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

github.setup        sphinx-gallery sphinx-gallery 0.8.2 v
github.tarball_from archive
revision            0
name                py-sphinx-gallery

platforms           darwin
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Extension for automatic generation of an example gallery
long_description    ${description}

checksums           rmd160  6e828a3b277febe63d107622ba930893fc27d0c2 \
                    sha256  6f7fd5244ad6bbde0a0ffce6bb4e056630be051859c9fa7c4be8fa431a9585d9 \
                    size    674902

python.versions     27 36 37 38 39

if {${subport} ne ${name}} {
    if {${python.version} eq 27} {
        github.setup    sphinx-gallery sphinx-gallery 0.4.0 v
        revision        0
        checksums       rmd160  dfc05aaa3695cadaf45c4592374256ef152e03f5 \
                        sha256  56a370df236defee839f6e37e0d8d1553e412bf1f8d844dcba51a14f802f4fe6 \
                        size    392841
    }

    depends_build-append \
                    port:py${python.version}-setuptools

    depends_lib-append \
                    port:py${python.version}-sphinx

    post-destroot {
        set DOCDIR ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${DOCDIR}
        xinstall -m 0644 -W ${worksrcpath} LICENSE README.rst \
            CHANGES.rst ${destroot}${DOCDIR}
    }

    livecheck.type  none
}
