# -*- 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            nijel utidylib 0.8 v
github.tarball_from     archive
name                    py-${github.project}
revision                0

supported_archs         noarch
platforms               {darwin any}
license                 MIT
maintainers             amln.net:dima openmaintainer
description             Python interface to html tidy
long_description        Python interface to html tidy, the html and xml \
                        cleanup tool from the w3c.

homepage                https://www.berlios.de/software/utidylib/

python.versions         39

if {${name} ne ${subport}} {
    checksums           rmd160  37c195115b06524a15f811fdc6fada5bef6d2ef7 \
                        sha256  9342ae5c99b17c37d15850c2dbcdb9c1a991a12de7f0ec61f06c246d5688db68 \
                        size    15285

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

    post-patch {
        reinplace "s|__TIDYLIB__|${prefix}/lib/libtidy.dylib|g" \
            ${worksrcpath}/tidy/lib.py
    }
}