# -*- 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/traefik/yaegi 0.16.1 v
revision            0

description         \
    Yaegi is Another Elegant Go Interpreter

long_description    \
    Yaegi is Another Elegant Go Interpreter. It powers executable Go scripts \
    and plugins, in embedded interpreters or interactive shells, on top of \
    the Go runtime. It has complete support for the Go specification, is \
    written in Pure Go, and works everywhere Go works. All Go & runtime \
    resources accessible from script (with control), and for security, \
    "unsafe" and "syscall" packages are neither used nor exported by default.

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

checksums           rmd160  ff0bc3e4746731e87726dc59a2c848310ca3fe98 \
                    sha256  872ceac063a8abfa71ecdeb56b1b960ca02abd5e9b6c926ae1bd3eb097cad44b \
                    size    2265620

build.cmd           make
build.target        install

patch {
    # Explicitly embed the version into the build command in the Makefile,
    # instead of trying to dynamically determine it from the current git tag.
    # We are using a tarball, and not a checked-out git repository, so querying
    # for git tag will fail.
    reinplace -E "s|\\$\\$\\(git describe --tags\\)|v${version}|" \
        ${worksrcpath}/Makefile
}

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