# -*- 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
PortGroup           cmake           1.1
PortGroup           legacysupport   1.1

# LegacySupport is needed for strnlen before 10.7
legacysupport.newest_darwin_requires_legacy 10

github.setup        tsl0922 ttyd 1.7.7
github.tarball_from archive
revision            0

homepage            https://tsl0922.github.io/ttyd

description         Share your terminal over the web

long_description    ttyd is a simple command-line tool for sharing terminal over the web, inspired by GoTTY.

categories          net sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  b3c558ddc09ec04b272850e0daa905f90db8ef98 \
                    sha256  039dd995229377caee919898b7bd54484accec3bba49c118e2d5cd6ec51e3650 \
                    size    621347

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:json-c \
                    port:libwebsockets \
                    path:lib/libssl.dylib:openssl \
                    path:lib/pkgconfig/libuv.pc:libuv \
                    port:zlib

# If gcc-4.2 is used, build fails with undefined symbols from libwebsockets
compiler.blacklist-append *gcc-4.*

platform powerpc {
    # Without this, Rosetta pulls out Xcode clang
    compiler.blacklist-append clang
}
