# -*- 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.0 v
github.tarball_from archive
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  d71a7df202108f49f97a668fb62182bf20baa8cf \
                    sha256  77f5e17b53796fe89dad92f016dee6599d95a2b985508263a711a772c4c9b9b2 \
                    size    2264022

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