# -*- 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           perl5 1.0

name                p5-cgi
perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         CGI 4.70 ../../authors/id/L/LE/LEEJO
revision            0
license             Artistic-2
maintainers         nomaintainer
description         CGI - Handle Common Gateway Interface requests and responses
long_description    {*}${description}

platforms           {darwin any}
supported_archs     noarch

checksums           rmd160  7be25bd5019035659fe4d89ac2fbc7bce2af35e6 \
                    sha256  538ad19c40402e3bbbe00e6d374c3ce2966feb391096dac883ac5104c2083bc9 \
                    size    207646

if {${perl5.major} != ""} {
    depends_build-append \
                    port:p${perl5.major}-test-nowarnings \
                    port:p${perl5.major}-test-warn

    depends_lib-append \
                    port:p${perl5.major}-html-parser \
                    port:p${perl5.major}-uri

    # https://github.com/leejo/CGI.pm/issues/264
    if {${os.platform} eq "darwin" && ${os.major} <= 18} {
        depends_extract port:libarchive
        extract.post_args | ${prefix}/bin/bsdtar -xf -
    }
}

notes {
    CGI is considered to be a legacy module and
    is in maintenance mode for critical issues only.
}

livecheck.type      regex
livecheck.url       https://cpan.metacpan.org/authors/id/L/LE/LEEJO
livecheck.regex     "CGI-(\\d+(?:\\.\\d+)*)"
