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

name                py-pynacl
python.rootname     PyNaCl
version             1.5.0
revision            1
categories-append   devel
license             Apache-2

python.versions     27 36 37 38 39 310 311

maintainers         {stromnov @stromnov} openmaintainer

description         Python binding to the Networking and Cryptography (NaCl) library
long_description    {*}${description}

homepage            https://github.com/pyca/pynacl/

checksums           rmd160  204894c8e68c9cc3026a353012e05d5480ea76d9 \
                    sha256  8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba \
                    size    3392854

platform darwin 11 {
    # default clang version cannot build this port, see https://trac.macports.org/ticket/54407
    # llvm-gcc does build it, but this is undesirable due to standard library issues
    # the following leads to a build with clang-3.4, which succeeds
    compiler.blacklist-append clang *gcc*
}

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version             1.4.0
        epoch               1
        checksums           rmd160  d93981462dc0c6aa0282c792b9070583d752f3da \
                            sha256  54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505 \
                            size    3416950

        depends_build-append    port:py${python.version}-wheel
    }

    depends_build-append \
                        port:py${python.version}-setuptools
    depends_lib-append  port:py${python.version}-cffi \
                        port:py${python.version}-six \
                        port:libsodium

    build.env-append    SODIUM_INSTALL=system
    destroot.env-append \
                        SODIUM_INSTALL=system

    livecheck.type      none
}
