# -*- 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-xhtml2pdf
version             0.2.19
revision            0

categories-append   textproc
license             Apache-2
maintainers         nomaintainer
description         HTML/CSS to PDF converter based on Python
long_description    {*}${description}
homepage            https://github.com/xhtml2pdf/xhtml2pdf

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  5db9043d961805e1d139829f4f22eb0a43e293c7 \
                    sha256  8dd55579b225dc1b7db8893a9550a1087ab45d7260590a3f50eb5e71a24def6c \
                    size    251135

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-arabic-reshaper \
                    port:py${python.version}-bidi \
                    port:py${python.version}-html5lib \
                    port:py${python.version}-hanko \
                    port:py${python.version}-Pillow \
                    port:py${python.version}-pypdf \
                    port:py${python.version}-reportlab \
                    port:py${python.version}-svglib

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