# -*- 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.17.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  4aed69dbcc4fbb0e19153bd0bf142c0f7a5a17eb \
                    sha256  c4fbfe638e3d1d37c57adf8ce3ab1b2f47d7fa64387686320d7bbf9fea692be5 \
                    size    2874885

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