# -*- 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.5
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  c82a283a5152796c07328c943c04ad132984e1ad \
                    sha256  30c5031552cd59f620ac0c8211dac45b345d3b2df310e7721879e4f46ef9c601 \
                    size    101386

python.versions     310 311 312 313 314

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

    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}
    }
}
