# -*- 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

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}
}

# getline, strndup
legacysupport.newest_darwin_requires_legacy \
                    10

if {${subport} eq ${name}} {
    github.setup        esnet iperf 3.21
    github.tarball_from archive
    revision            0

    checksums           rmd160  02be890a2f2cc1701d509b24803a643e06809853 \
                        sha256  dd289b6700d3bc33eda7fa3ce6db217d6ca42239edbcb2e7f152bf7bf5c8a5aa \
                        size    711039

    compiler.c_standard 2011

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