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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Test-Future-IO-Impl 0.15
revision            0
license             {Artistic-1 GPL}
maintainers         {devans @dbevans} openmaintainer
description         Test::Future::IO::Impl - acceptance tests for Future::IO implementations
long_description    {*}${description}

platforms           {darwin any}
supported_archs     noarch

checksums           rmd160  d83d4c7d59e02c7778905d6c49ee02a626c2384b \
                    sha256  466bfe5833256e6ff8c93e73a82c2b47fc11654651d5713ea78a0013d28dc442 \
                    size    14658

if {${perl5.major} != ""} {
    depends_lib-append \
                    port:p${perl5.major}-test-simple \
                    port:p${perl5.major}-time-hires

    # Before version 0.14 this port was part of p5-future-io but is now
    # packaged separately. Deactivate p${perl5.major}-future-io if the
    # installed version is less than 0.14 to avoid any activation conflict
    pre-activate {
        set pname p${perl5.major}-future-io
        if {![catch {set installed [lindex [registry_active $pname] 0]}]} {
            set _installed [lindex $installed 1]
            set _desired [join {0 140 0} "."]
            if {[vercmp ${_installed} ${_desired}] < 0} {
                registry_deactivate_composite $pname "" [list ports_nodepcheck 1]
            }
        }
    }

    perl5.use_module_build
}
