# -*- 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.55.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  cad047b9bfe2f9abca9dde95947328fab53e6e3a \
                    sha256  d402b3988cdaea74bc01763830a6e45b4a3f1ada40f8fcad7edb5b230c18f1eb \
                    size    7556513

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
}
