# -*- 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           deprecated 1.0

name                py-tre
version             0.8.0
revision            1
categories-append   devel
platforms           darwin
maintainers         nomaintainer
license             BSD

description         Python bindings for libtre
long_description    Python bindings for libtre, a lightweight, \
                    POSIX-compliant regular expressions library that supports \
                    approximate text matches.

homepage            http://laurikari.net/tre/
master_sites        ${homepage}/download
distname            tre-${version}
dist_subdir         tre
worksrcdir          ${distname}/python
patchfiles          patch-setup.py.diff
use_bzip2           yes

checksums           rmd160  8031cc0c421dd0f473b4c98f49aef9805fa65b64 \
                    sha256  8dc642c2cde02b2dac6802cdbe2cda201daf79c4ebcbb3ea133915edf1636658

deprecated.upstream_support no
python.versions     27

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:tre

    post-patch {
        reinplace "s|@@MP_INCLUDE_DIR@@|${prefix}/include|g" ${worksrcpath}/setup.py
    }

    post-destroot {
        xinstall -m 0644 -W ${workpath}/${distname} ChangeLog LICENSE README \
            ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type  none
} else {
    livecheck.regex tre-(\[0-9.\]+)${extract.suffix}
}
