# -*- 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.35.0
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  6ad9f4f249f491c4a47c8f2cc4144cebc4e7b740 \
                    sha256  761ae0dda17fd9dfaff4bbb2a376e28e44dfd77dc6410b7bc408297a1fd5600e \
                    size    37016406

python.versions     310 311 312 313 314

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
}
