# -*- 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-crypto
version             2.6.1
revision            1

categories-append   security
platforms           darwin freebsd
license             public-domain PSF
maintainers         nomaintainer

description         Collection of cryptographic algorithms and protocols
long_description    Collection of cryptographic algorithms and protocols, \
                    implemented for use from python. Among are MD2, MD4, \
                    RIPEMD, AES, ARC2, Blowfish, CAST, DES, Triple-DES, \
                    IDEA, RC5, ARC4, simple XOR, RSA, DSA, ElGamal, qNEW.

homepage            https://www.dlitz.net/software/pycrypto/
master_sites        https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
distname            pycrypto-${version}

checksums           rmd160  ac0db079e5e4be9daf739e094c10e96291dbc009 \
                    sha256  f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c \
                    size    446240

python.versions     27 35 36 37

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

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} \
                ACKS ChangeLog COPYRIGHT README TODO \
                ${destroot}${prefix}/share/doc/${subport}
    }

    test.run            yes
    test.target         test

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${homepage}
    livecheck.regex     pycrypto-(\[0-9\.\]+).tar.gz
}