# -*- 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        html5lib html5lib-python 1.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                py-html5lib
revision            0

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

description         Library for working with HTML documents
long_description    A Python implementation of a HTML parser based on the \
                    WHATWG HTML5 specification for maximum compatibility \
                    with major desktop web browsers.

checksums           rmd160  11c51e956d700383e5e57e401d76f8ceb98b07e8 \
                    sha256  2a57d32c2061305c1fa8de9a228d3659ff75126ccd91f31e21bebd7124a5de4c \
                    size    257986

python.versions     27 39 310 311 312 313

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

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