# -*- 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-flask-cors
python.rootname     flask_cors
version             6.0.0
revision            0

categories-append   www
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         nomaintainer

description         Cross Origin Resource Sharing (CORS) support for Flask
long_description    A Flask extension for handling Cross Origin Resource \
                    Sharing (CORS), making cross-origin AJAX \
                    possible. This package has a simple philosophy, \
                    when you want to enable CORS, you wish to enable \
                    it for all use cases on a domain. This means no \
                    mucking around with different allowed headers, \
                    methods, etc. By default, submission of cookies \
                    across domains is disabled due to the security \
                    implications, please see the documentation for how \
                    to enable credential'ed requests, and please make \
                    sure you add some sort of CSRF protection before \
                    doing so!

homepage            https://flask-cors.corydolphin.com/

checksums           rmd160  7afc406f5ebed636af01ac71400317304c7a74df \
                    sha256  4592c1570246bf7beee96b74bc0adbbfcb1b0318f6ba05c412e8909eceec3393 \
                    size    11875

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-flask \
                    port:py${python.version}-werkzeug

    depends_test-append \
                    port:py${python.version}-packaging

    test.run        yes

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst \
            ${destroot}${docdir}
    }
}
