# -*- 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-mcrypt
version             1.1
platforms           darwin
license             LGPL-2.1+
maintainers         nomaintainer

description         a comprehensive Python interface to the mcrypt library
long_description    ${name} is ${description}, which provides a \
                    uniform interface to several symmetric encryption \
                    algorithms. It is intended to have a simple \
                    interface to access encryption algorithms in ofb, \
                    cbc, cfb, ecb and stream modes. The algorithms it \
                    supports are DES, 3DES, RIJNDAEL, Twofish, IDEA, \
                    GOST, CAST-256, ARCFOUR, SERPENT, SAFER+, and more.
homepage            http://niemeyer.net/python-mcrypt

master_sites        http://niemeyer.net/download/python-mcrypt/
distname            python-mcrypt-${version}
checksums           sha1    a6bed6ef183ed042a1261e8da1edb462deadc891 \
                    rmd160  eb02c61e4ea11836716c442c24078da56cf4d1c1

python.versions     27

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

    patchfiles          patch-setup.py.diff
    post-patch {
        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${homepage}
    livecheck.regex     "python-mcrypt-(\\d+(?:\\.\\d+)*)"
}
