# -*- 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
# $Id: Portfile 92372 2012-04-26 19:47:36Z ryandesign@macports.org $

PortSystem              1.0

name                    mosh
version                 1.2
categories              net
license                 GPL-3+
platforms               darwin
maintainers             mit.edu:quentin
description             Mobile Shell
long_description        Mosh is a replacement for ssh that better handles \
                        high-latency, high-packet-loss, dynamically-addressed \
                        network links
homepage                http://mosh.mit.edu/
master_sites            https://github.com/downloads/keithw/mosh/

checksums               rmd160  2b8bd9eaddf0e5a3749e414444ffa20251ed2da5 \
                        sha256  8b2d346a2f0d560ceb2ca91ff396fa859f81bb321ebd8c26fc564db8b335433a

depends_build           port:pkgconfig

depends_lib             port:ncurses \
                        port:p5.12-io-tty \
                        port:protobuf-cpp \
                        port:zlib

post-patch {
    reinplace "s|#!/usr/bin/env perl|#!${prefix}/bin/perl5.12|" ${worksrcpath}/scripts/mosh
}

livecheck.type          regex
livecheck.url           https://github.com/keithw/mosh/downloads
livecheck.regex         "${name}-(\[0-9a-z.\]*)${extract.suffix}"
