# -*- 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         Razor2-Client-Agent 2.87 ../../authors/id/T/TO/TODDR
license             {Artistic-1 GPL}
categories-append   mail
maintainers         nomaintainer
description         Razor2::Client::Agent -- UI routines for razor agents
long_description    {*}${description}

checksums           rmd160  1e9e4f54579c52ac04bbaec2624aac13194f1a95 \
                    sha256  3ba2105529d28a9086020ed3edd646d09f51f46cc8c8c3f186c046daad9cd756 \
                    size    93390

if {${perl5.major} != ""} {
    depends_lib-append \
                    port:p${perl5.major}-digest-sha \
                    port:p${perl5.major}-getopt-long \
                    port:p${perl5.major}-io-socket-ip \
                    port:p${perl5.major}-time-hires \
                    port:p${perl5.major}-uri

    post-destroot {
        # move man files from a non-versioned directory to a versioned one
        # allows the subports to be installed in parallel without conflicts
        set man5_dir ${destroot}${prefix}/share/man/man5
        set versioned_man5_dir ${destroot}${prefix}/share/perl${perl5.major}/man/man5
        file mkdir ${versioned_man5_dir}
        foreach f [glob -tails -directory ${man5_dir} *] {
            move ${man5_dir}/$f ${versioned_man5_dir}/$f
        }
    }
}
