# -*- 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-rstcheck
version             6.2.4
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         {reneeotten @reneeotten} openmaintainer

description         Checks syntax of reStructuredText and code blocks nested within it
long_description    {*}${description}

homepage            https://github.com/myint/rstcheck

checksums           rmd160  8330bc40e5e72a2c879a63abfd3c2eff61714dd9 \
                    sha256  384942563dfbfcc85903a587ecf050447217c46b51e266ed3fe51371bc599015 \
                    size    24520

python.versions     39 310 311 312 313

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

    depends_lib-append \
                    port:py${python.version}-colorama \
                    port:py${python.version}-docutils \
                    port:py${python.version}-rich \
                    port:py${python.version}-rstcheck-core \
                    port:py${python.version}-shellingham \
                    port:py${python.version}-typer \
                    port:py${python.version}-types-docutils \
                    port:py${python.version}-pydantic

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