# -*- 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-aiohttp
version             3.14.3
revision            0
categories-append   devel
license             Apache-2

python.versions     310 311 312 313 314

maintainers         {ipglider.org:miguel @ipglider} openmaintainer

description         Async http client/server framework
long_description    aiohttp key futures are the support for both client and \
                    server side of HTTP protocol, support for both client and \
                    server Web-Sockets out-of-the-box without the Callback Hell \
                    and Web-server's middlewares and pluggable routing.

homepage            https://github.com/aio-libs/aiohttp

checksums           rmd160  4ddd1b02a29521aba6fc14d25ddf05b639c831e0 \
                    sha256  9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc \
                    size    7971213

if {${subport} ne ${name}} {
    depends_build-append    port:py${python.version}-pkgconfig

    depends_lib-append      port:py${python.version}-aiodns \
                            port:py${python.version}-aiohappyeyeballs \
                            port:py${python.version}-aiosignal \
                            port:py${python.version}-attrs \
                            port:py${python.version}-brotli \
                            port:py${python.version}-frozenlist \
                            port:py${python.version}-multidict \
                            port:py${python.version}-propcache \
                            port:py${python.version}-yarl

    if {${python.version} < 313} {
        depends_lib-append  port:py${python.version}-typing_extensions
    }

    # mask.c:3137: error: ‘for’ loop initial declaration used outside C99 mode
    if {${python.version} < 312} {
        compiler.c_standard 1999
        configure.cflags-append \
                            -std=c99
    } else {
        compiler.c_standard 2011
    }

    if {${python.version} < 311} {
        depends_lib-append  port:py${python.version}-async-timeout
    }
}
