# -*- 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-latexcodec
version             3.0.1
revision            0

categories-append   textproc
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         A lexer and codec to work with LaTeX code in Python.
long_description    {*}${description}

homepage            https://github.com/mcmtroffaes/latexcodec

checksums           rmd160  0fbc659f82b6e65583777fd1d40c548fd1a6b2f1 \
                    sha256  e78a6911cd72f9dec35031c6ec23584de6842bfbc4610a9678868d14cdfb0357 \
                    size    31222

python.versions     27 39 310 311 312 313

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     2.0.1

        checksums   rmd160  1377a011dec78d845135ca83f2444e8ffb2fcc0b \
                    sha256  2aa2551c373261cefe2ad3a8953a6d6533e68238d180eb4bb91d7964adb3fe9a \
                    size    30131

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

    test.run        yes

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