# -*- 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/terraform-docs/terraform-docs 0.17.0 v
go.offline_build    no
revision            0

description         Generate Terraform modules documentation in various formats.
long_description    A utility to generate documentation from Terraform modules in \
                    various output formats.
homepage            https://terraform-docs.io/

categories          devel
license             MIT

maintainers         @asobrien \
                    openmaintainer

checksums           rmd160  c8546464942d25e611f889484dfff9f5ce826f33 \
                    sha256  698537c9cc170f8760cda862d560bfeaa24f2a705bbc70c22a8facbf05a829e0 \
                    size    257926

build.cmd           make
build.target        build

# Do not build on macOS 10.11 and earlier
if {${os.platform} eq "darwin" && ${os.major} < 16} {
    known_fail yes

    pre-fetch {
        ui_error "${name} does not build on macOS 10.11 and earlier"
        return -code error "unsupported platform version"
    }
}

destroot {
    xinstall -m 0755 {*}[glob ${worksrcpath}/bin/${os.platform}-*/${name}] \
        ${destroot}${prefix}/bin/
}
