# $Id: Portfile 99844 2012-11-19 05:57:52Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-reportlab
version             2.6
license             BSD
maintainers         nomaintainer
platforms           darwin freebsd
description         python library for creating pdf files
long_description \
   ReportLab is a software library that lets you directly create documents \
   in Adobe's Portable Document Format (PDF) using the python programming \
   language.

python.versions     24 25 26 27

homepage            http://www.reportlab.com/software/opensource/rl-toolkit/
master_sites        http://www.reportlab.com/ftp/
distname            reportlab-${version}

checksums           rmd160  1128a37b6cf020a44fa3a1bac57cdebebd0dea59 \
                    sha256  76c3cda08f6eac9b0adf0e3c86202fe5e9cb075c00503bef5760cd9e75ec34ff

if {${name} != ${subport}} {
    depends_lib-append  port:py${python.version}-pil
    
    patchfiles      patch-src_reportlab_lib_testutils.py.diff
    
    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} README.txt CHANGES.txt LICENSE.txt \
            ${destroot}${docdir}
    }
    livecheck.type  none
} else {
    livecheck.type  regex
    livecheck.url   [lindex ${master_sites} 0]
    livecheck.regex reportlab-(\[0-9.\]+)${extract.suffix}
}
