# -*- 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.5
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  6722b8033b1800c85fbb178629b2a095aad8789f \
                    sha256  122b6d6b953fa1a09d7e7de42ac5d8938da291c6f68351ace6166bb50fc3bd6c \
                    size    25235

python.versions     310 311 312 313 314

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}
    }
}
