# -*- 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.28 5.30 5.32 5.34
perl5.default_branch    5.34
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.16
revision            0
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  2c688e3b3a7fb695ca4a0ca22ac21d7a6068b59f \
                    sha256  1b7cb8ab606856244adf8bd9ac4d27507c2e41687b3af1a226ce1db2f3fd5578 \
                    size    96151

# 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
platforms           {darwin any}
