# -*- 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-pyx
python.rootname     PyX
version             0.16
revision            0

categories-append   tex
supported_archs     noarch
platforms           {darwin any}
license             GPL-2+
maintainers         nomaintainer

description         Python package for the creation of PostScript, PDF, and SVG files
long_description    PyX is a ${description}. It combines an abstraction of the PostScript \
                    drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d \
                    plots in publication-ready quality are built out of these primitives.

homepage            https://pyx-project.org/

checksums           rmd160  f744331f506969deb31a529cdaccda8f2809d63d \
                    sha256  4d8e3e471cd3e9a9bd13d5086cdf7c0af1b0c3f3e195e74f5f63318dc40a66d8 \
                    size    626703

# Note: py27-scapy depends on py27-pyx
python.versions     27 310 311 312

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     0.12.1
        revision    1
        checksums   rmd160  ca48a8e85c9fcd24c9050d7938ec952d410b099a \
                    sha256  e837b26a8b1c27524cf3f3dd6c0d563451249159edaa2e366d87e7143a867e8e \
                    size    561989

        livecheck.type  none
    }

    depends_lib-append \
                    bin:tex:texlive

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}

        if {${python.version} == 27} {
            xinstall -m 0644 -W ${worksrcpath} \
                INSTALL CHANGES README AUTHORS LICENSE \
                ${destroot}${docdir}
        } else {
            xinstall -m 0644 -W ${worksrcpath} \
                INSTALL.md CHANGES README.md AUTHORS LICENSE \
                ${destroot}${docdir}
        }
    }
}
