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

name                gtime
version             1.10
categories          sysutils
license             GPL-2+
maintainers         {gmail.com:davidgilman1 @dgilman} openmaintainer

description         GNU implementation of time(1)

long_description    The 'time' command runs another program, then displays \
                    information about the resources used by that program, \
                    collected by the system while the program was running. \
                    You can select which information is reported and the \
                    format in which it is shown, or have 'time' save the \
                    information in a file instead of displaying it on the \
                    screen.

homepage            https://www.gnu.org/software/time/
master_sites        gnu:time
distname            time-${version}

checksums           sha256  e8c29fb4ab599d8478e41e8618f50db8aede9c90af27d0d2ef28ae50d5de09c3 \
                    rmd160  a0ccdc41cf7c4d3e3f40da193c2dcc1d1058e909 \
                    size    851192

configure.args      --program-prefix=g

destroot.destdir    prefix=${destroot}${prefix} \
                    infodir=${destroot}${prefix}/share/info

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
    }
}

notes "
    GNU time is installed as 'gtime' by default.

    If you want to use the GNU tools by default, add this directory to the front of your PATH environment variable:
        ${prefix}/libexec/gnubin/
"
