# -*- 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/anchore/syft 1.51.0 v
go.offline_build    no
go.toolchain_min    1.26.3
revision            0

description         \
    A CLI tool and library for generating a Software Bill of \
    Materials (SBOM) from container images and filesystems

long_description    \
    {*}${description}. Syft supports dozens of packaging \
    ecosystems, multiple image sources, and output formats \
    including CycloneDX, SPDX, and Syft JSON. Exceptional for \
    vulnerability detection when used with a scanner like Grype.

categories          security sysutils
installs_libs       no
license             Apache-2
maintainers         {sub-pop.net:link @subpop} \
                    openmaintainer

checksums           rmd160  99a90d929f6d76e9e8b5c61fdcc8e299f6774d58 \
                    sha256  d48bca3091ec4862f5041af6cbdeedb3f2322ae7a059199a22d99e099cabd4ae \
                    size    7271534

build.args-append   -ldflags \"-X main.version=${version} \
                               -X main.gitCommit=macports-release \
                               -X main.buildDate=${source_date_epoch}\" \
                    -o ./dist/${name}

build.post_args-append \
                    ./cmd/${name}

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