# -*- 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           github 1.0

github.setup        tmate-io tmate 2.4.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            3

checksums           rmd160  8c4e3c305e19914932b79a91e2e266ae59647505 \
                    sha256  4e99b367f54baade14250d8c146aa019741b3f8eaee99ee80ca0d468fe6b650a \
                    size    614295

maintainers         {ijackson @JacksonIsaac} openmaintainer
categories          sysutils

license             BSD
description         Instant terminal sharing.
long_description    {*}${description}

patchfiles-append   patch-configure.ac

# https://github.com/tmate-io/tmate/issues/302
if {[string match *gcc* ${configure.compiler}]} {
    # cc1: error: unrecognized command line option "-Wno-null-pointer-arithmetic"
    post-patch {
        reinplace "s|-Wno-null-pointer-arithmetic||" ${worksrcpath}/Makefile.am
    }
}

depends_build       port:pkgconfig

depends_lib         port:libevent \
                    port:ncurses \
                    port:msgpack \
                    port:libssh

use_autoreconf      yes

compiler.c_standard 1999
