# -*- 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.13.2 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  cd0704a95d82069f5aca87014910e5f79a98a1db \
                    sha256  3ed53c0b32e44491b3871fd22dd0cf2577a6b2ee9036c76801c261b75c4e44ee \
                    size    2758970

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/
}
