# -*- 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

name                gopls
categories          devel
license             BSD
maintainers         {ra1nb0w @ra1nb0w} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
description         gopls is the official language server for the Go language
long_description    {*}${description}

go.setup            golang.org/x/tools 0.23.0 gopls/v
go.offline_build    no
revision            0

checksums           rmd160  7e65aee84c35bf26228885d72ef1be3668eac30b \
                    sha256  1ba41875b918db73c6a409ad8f552b85f72dfeea43ffb541b798322ff6b4152b \
                    size    8538456

build.dir           ${worksrcpath}/${name}

test.run            yes
test.cmd            ${worksrcpath}/${name}/gopls version

github.livecheck.regex  {([0-9.]+)}

destroot {
    xinstall -m 0755 ${worksrcpath}/${name}/${name} \
        ${destroot}${prefix}/bin/${name}

    set dest_doc ${destroot}${prefix}/share/doc/${name}
    xinstall -d -m 0755 ${dest_doc}
    xinstall -m 0644 {*}[glob ${worksrcpath}/${name}/doc/*.md] ${dest_doc}
    copy ${worksrcpath}/${name}/doc/design ${dest_doc}
}
