# -*- 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           muniversal 1.0
PortGroup           legacysupport 1.1
PortGroup           codeberg 1.0

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

codeberg.setup      a-j-wood pv 1.10.5 v

revision            0
categories          sysutils
maintainers         {eborisch @eborisch} openmaintainer
license             GPL-3+

description         monitor the progress of data through a pipe

long_description    pv - Pipe Viewer - is a terminal-based tool for monitoring \
                    the progress of data through a pipeline. It can be \
                    inserted into any normal pipeline between two processes to \
                    give a visual indication of how quickly data is passing \
                    through, how long it has taken, how near to completion it \
                    is, and an estimate of how long it will be until completion.

homepage            https://www.ivarch.com/programs/pv.shtml
master_sites        ${codeberg.homepage}/releases/download/v${version}

distname            ${name}-${version}
checksums           rmd160  d8ac435f8ff85d40febf3290532388a72ec70942 \
                    sha256  ab21b4f8662280646b6a02e1b9f096790918f89c952bbe0d06fef75d3b52fb15 \
                    size    439611

patch.pre_args-replace  -p0 -p1
patchfiles          fix-modifiers-direct-io-test.diff

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

depends_build-append \
                    port:gettext
depends_lib-append  port:gettext-runtime

test.run            yes
