# -*- 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/bmf-san/ggc 3.0.1
revision            0

description         \
    A modern Git CLI tool with both traditional command-line and interactive \
    incremental-search UI.

long_description    \
    ${name} is a Git tool written in Go, offering both traditional CLI \
    commands and an interactive interface with incremental search. You can \
    either run subcommands like ggc add directly, or launch the interactive \
    mode by simply typing ggc. Designed to be fast, user-friendly, and \
    extensible.

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

build.args-append   \
    -ldflags \" -X main.version=${version} \"

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
    # Check ${worksrcpath}/tools/completions/ for all supported shells
    set comp_path(bash) ${destroot}${prefix}/share/bash-completion/completions/${name}
    set comp_path(fish) ${destroot}${prefix}/share/fish/completions/${name}.fish
    set comp_path(zsh)  ${destroot}${prefix}/share/zsh/site-functions/_${name}
    foreach shell {bash fish zsh} {
        xinstall -d [file dirname $comp_path(${shell})]
        xinstall -m 0644 ${worksrcpath}/tools/completions/${name}.${shell} $comp_path(${shell})
    }
}

checksums           ${distname}${extract.suffix} \
                        rmd160  e253e35f482a2d31007665749bb03d28a6afe655 \
                        sha256  ce4a9770c271dda649e43472af6d1c5a11b828d4afd4355fd97a68c0a451eb7a \
                        size    1160379

go.vendors          gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/check.v1 \
                        lock    20d25e280405 \
                        rmd160  412aa0d109919182ff84259e9b5bbc9f24d78117 \
                        sha256  233f8faf427ce6701ac3427f85c28bc6b6ae7cdc97a303a52873c69999223325 \
                        size    30360 \
                    golang.org/x/term \
                        lock    v0.33.0 \
                        rmd160  25e305513a0d43f51740d6501a0e514f0d1a916c \
                        sha256  5783624041868cde100315d40c903cda505917c066ecda529dce0b34f42d8690 \
                        size    15453 \
                    golang.org/x/sys \
                        lock    v0.34.0 \
                        rmd160  a87df453351955262c3e67ec823f0176b317f87d \
                        sha256  6f5791e51a2e6926432b508bcf89141356307d1b378a5b3ca9663df4f462c7a6 \
                        size    1531356
