# -*- 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.9 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  8c7c495f3d519ce84247ffd10cf83fb8609d9400 \
                    sha256  6cbcb7959a5d90b59253ea6d8bdf0285e2cfbc3b301398704b41e3069293f4fb \
                    size    13744646

# 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.]+)}
