# -*- 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/go-delve/delve 1.27.1 v
go.offline_build    no
go.toolchain_min    1.25.0
revision            0

description         \
    Delve is a debugger for the Go programming language.

long_description    \
    {*}${description} The goal of the project is to provide a simple, full \
    featured debugging tool for Go. Delve should be easy to invoke and easy \
    to use. Chances are if you\'re using a debugger, things aren\'t going \
    your way. With that in mind, Delve should stay out of your way as much as \
    possible.

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

checksums           rmd160  3cd7e4d4a6bbc4465a3b91a2ac4362dec84e9fa3 \
                    sha256  dca9ec6f2c392a00449ad748b3a229e92ba4efa67f4e7582f2cc45974429928f \
                    size    9521825

post-extract {
    reinplace -E s|@go|@${go.bin}| ${worksrcpath}/Makefile
}

build.cmd           make
build.target        build

notes               "delve is installed as dlv"

destroot {
    set delve_doc_dir ${prefix}/share/doc/${name}

    xinstall -m 0755 ${worksrcpath}/dlv ${destroot}${prefix}/bin/
    xinstall -d ${destroot}${delve_doc_dir}
    copy {*}[glob ${worksrcpath}/Documentation/*] ${destroot}${delve_doc_dir}/
}
