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

go.setup            github.com/homeport/termshot 0.6.1 v
go.toolchain_min    1.24.0
revision            0

description         Creates screenshots based on terminal command output
long_description    {*}${description}

categories          graphics textproc
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  66c5bfe028bd9a4a480f365c17abaf4f831572e4 \
                    sha256  40abea3c9ae604f3c2cdc7e2a623bf6063c6b1c504a70c5e3a1b8457dbdd2fbc \
                    size    331988

go.offline_build no

# Upstream leaves the version to be injected at build time; without this it
# reports "(development)".
build.pre_args-append \
                    -ldflags \"-X ${go.package}/internal/cmd.version=${version}\"
build.args-append   ./cmd/${name}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
}
