# -*- 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-docutils
version             0.14
categories-append   textproc
license             public-domain BSD PSF-2.1.1
maintainers         {jmr @jmroot} alexnicksay.com:alex openmaintainer
description         A set of tools for processing plaintext documentation
long_description    Docutils is a set of tools for processing plaintext \
                    documentation into useful formats, such as HTML, XML, \
                    and LaTeX. Includes reStructuredText, the easy to read, \
                    easy to use, what-you-see-is-what-you-get plaintext \
                    markup language.
platforms           darwin
supported_archs     noarch

homepage            http://docutils.sourceforge.net/
master_sites        sourceforge:project/docutils/docutils/${version}/
distname            docutils-${version}

checksums           md5    c53768d63db3873b7d452833553469de \
                    sha1   32cefb69ac3dab5b04c4d150776f35419cc4c863 \
                    rmd160 3331c1b684d377a0a2cb5c1e7431b019b8793840

python.versions     26 27 33 34 35 36 37

if {$subport ne $name} {
    depends_run         port:py${python.version}-roman
    
    # we want e.g. *-2.7.py not *.py-2.7
    python.link_binaries no
    post-destroot {
        foreach f {rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml rstpep2html rst2xetex} {
            ln -s ${python.prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-${python.branch}.py
        }
    }
    livecheck.type  none
}