# -*- 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/containers/gvisor-tap-vsock 0.8.7 v
revision            0

categories          net
license             Apache-2
maintainers         {judaew @judaew} openmaintainer

description         A new network stack based on gVisor
long_description    \
    A replacement for libslirp and VPNKit, written in pure Go. It is based on \
    the network stack of gVisor. Compared to libslirp, gvisor-tap-vsock \
    brings a configurable DNS server and dynamic port forwarding.

checksums           rmd160  b8db798726f33e74324306f0ee5d5e00f5405f51 \
                    sha256  ef9765d24bc3339014dd4a8f2e2224f039823278c249fb9bd1416ba8bbab590b \
                    size    13233295

# FIXME: This port currently can't be built without allowing go mod to fetch
go.offline_build no

build.cmd           make
build.args          gvproxy

destroot {
    # `gvproxy` is a binary to forward ports for podman machine. It should not
    # be used as a normal user.
    #
    # https://github.com/containers/podman/issues/11960#issuecomment-943162546
    xinstall -m 0755 ${worksrcpath}/bin/gvproxy ${destroot}${prefix}/libexec
}

# Do not check the first tags v3 and v4.
github.livecheck.regex  {([0-2.]\.[0-9.]+)}
