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

name                py-awscrt
# This is only used by awscli2. Bump when Amazon bumps
# their pinned version in awscli2's setup.cfg.
version             0.29.1
revision            0

categories-append   devel
maintainers         {gmail.com:davidgilman1 @dgilman} openmaintainer
license             Apache-2

description         A common runtime for AWS Python projects
long_description    {*}${description}

homepage            https://aws.amazon.com/cli/

checksums           rmd160  ddccdd444ebfa8999f73b6ef33fdaa01561136f8 \
                    sha256  8fc304af5f6f83e7e73096fb42eb51d4a85fa7a90456466ef22872095d4ca46f \
                    size    38008490

python.versions     310 311 312 313

if {${name} ne ${subport}} {
    if {${os.platform} eq "darwin" && ${os.major} <= 18} {
        known_fail      yes
        pre-fetch {
            ui_error "${name} @${version} requires macOS 10.15 or later."
            return -code error "incompatible macOS version"
        }
    }

    depends_build-append \
                        path:bin/cmake:cmake

    depends_lib-append  port:py${python.version}-setuptools

    build.env-append    AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1
}
