# -*- 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/cue-lang/cue 0.15.0 v
go.offline_build    no
go.package          cuelang.org/go
revision            0

homepage            https://cuelang.org

description         Open-source data constraint language which aims to \
                    simplify tasks involving defining and using data.

long_description    CUE is an {*}${description} It is a superset of JSON, \
                    allowing users familiar with JSON to get started quickly.

categories          devel lang
installs_libs       no
license             Apache-2
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  003fc4aab99100089134ad8b8ab5c53496c46271 \
                    sha256  3c42513fc6aea1cb911d274901d026c3263cf8f6011cb3015de5d0a04f3cc2ab \
                    size    2559541

build.pre_args-append \
    -ldflags=\"-X ${go.package}/cmd/cue/cmd.version=${version}\" \
    -o ./_dist/${name}
build.args          ./cmd/${name}

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

pre-build {
    file mkdir ${worksrcpath}/_dist
}

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