# -*- 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           github 1.0
PortGroup           legacysupport 1.1
PortGroup           openssl 1.0

# getline, strndup
legacysupport.newest_darwin_requires_legacy 10

name                iperf3
categories          net
license             BSD
maintainers         {gmail.com:allan.que @aque} openmaintainer
description         Measures the maximum achievable bandwidth on IP networks
long_description    ${name} is a tool for active measurements of the maximum \
                    achievable bandwidth on IP networks. It supports tuning \
                    of various parameters related to timing, protocols, and \
                    buffers. For each test it reports the bandwidth, loss, \
                    and other parameters.

test.run            yes
test.target         check

post-destroot {
    # install doc files
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} LICENSE RELNOTES.md README.md \
        ${destroot}${prefix}/share/doc/${name}
}

if {${subport} eq ${name}} {
    github.setup        esnet iperf 3.18
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision            0

    checksums           rmd160  473e2cec114263fdcc6b10b3fe6ee17ae1b25be5 \
                        sha256  50118ea11d814856fcc0b40ca6c30d62ca4d009e2f1e812016bbbe17bce277c8 \
                        size    690066

    compiler.c_standard 2011

    github.livecheck.regex {([0-9.]+)}
}

subport ${name}-devel {
    PortGroup           obsolete 1.0
    version             20231123
    revision            0

    # remove this subport after November 24, 2024
    replaced_by         ${name}
}
