# -*- 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-Simple 1.302215 ../../authors/id/E/EX/EXODIST
revision            0
license             {Artistic-1 GPL}
maintainers         nomaintainer
description         Test::Simple - Basic utilities for writing tests.
long_description    {*}${description}

platforms           {darwin any}
supported_archs     noarch

checksums           rmd160  696eec306e085caf0c390dc00d85754c3ba595cc \
                    sha256  69fcba16318d5658f39e2f117a89b5f4db62c827e70dbf0d9c3eea392e937c44 \
                    size    567999

if {${perl5.major} != ""} {
    depends_build-append \
                    port:p${perl5.major}-json-maybexs

    depends_lib-append \
                    port:p${perl5.major}-data-dumper \
                    port:p${perl5.major}-term-table \
                    port:p${perl5.major}-time-hires

    # https://trac.macports.org/ticket/70547
    # depends_lib-append \
    #               port:p${perl5.major}-module-pluggable

    notes-append    "$subport can optionally use\
                    p${perl5.major}-module-pluggable,\
                    but does not depend on it to avoid a dependency cycle."

    # As of version 1.302200, Test2::Suite is merged into Test::Simple.
    # Deactivate obsolete port p${perl5.major}-test2-suite, if active,
    # to avoid activation conflicts.
    pre-activate {
        set pname p${perl5.major}-test2-suite
        if {![catch {set installed [lindex [registry_active $pname] 0]}]} {
            registry_deactivate_composite $pname "" [list ports_nodepcheck 1]
        }
    }
}
