# -*- 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.28.4
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  6692388b4ac1c6337591c8969c8352df2600f211 \
                    sha256  d2835094e92d0a3d1722d03afd54983115b2172d57581a664ad6a2af3d33c12c \
                    size    37902030

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
}
