# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           perl5 1.0

perl5.require_variant   yes
perl5.conflict_variants yes
perl5.branches          5.26 5.28
perl5.create_variants   ${perl5.branches}

# since variants are set to conflict (only one can be installed at a time)
# omit version suffixes on linked binaries
perl5.link_binaries_suffix

name                clusterssh
perl5.setup         App-ClusterSSH 4.14
revision            1
platforms           darwin
categories          sysutils
license             {Artistic-1 GPL}
maintainers         nomaintainer

description         Cluster Admin via SSH

long_description    ClusterSSH controls a number of xterm windows via a \
                    single graphical console window to allow commands to \
                    be interactively run on multiple servers over an ssh \
                    connection.

checksums           rmd160  e8b64c6f08e35f9aeb9d34b2aedb79ffe41fd387 \
                    sha256  b132a1b4280f8df20e9c79e6f2a79488b2307b83275394375d0794443b121708 \
                    size    95114

# don't overwrite portgroup defined dependencies
depends_build-append \
                    port:p${perl5.major}-file-which \
                    port:p${perl5.major}-readonly \
                    port:p${perl5.major}-test-differences \
                    port:p${perl5.major}-test-trap

depends_lib         port:p${perl5.major}-exception-class \
                    port:p${perl5.major}-getopt-long \
                    port:p${perl5.major}-html-parser \
                    port:p${perl5.major}-pathtools \
                    port:p${perl5.major}-pod-simple \
                    port:p${perl5.major}-sort-naturally \
                    port:p${perl5.major}-tk \
                    port:p${perl5.major}-try-tiny \
                    port:p${perl5.major}-x11-protocol \
                    port:p${perl5.major}-x11-protocol-other \
                    port:p${perl5.major}-xml-simple \
                    port:p${perl5.major}-xsloader \
                    port:xterm

# fixup shebangs in installed perl scripts
post-patch {
    foreach script [glob ${worksrcpath}/bin_PL/*] {
        reinplace "s|^#!.*|#!${perl5.bin}|" $script
    }
}

perl5.use_module_build
supported_archs     noarch