# -*- 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 90445 2012-03-05 22:08:09Z cal@macports.org $

PortSystem 1.0
PortGroup  archcheck 1.0
PortGroup  muniversal 1.0

name		  libssh2
version		  1.2.7
categories	  devel net
platforms	  darwin
maintainers	  pmq openmaintainer

description	  libssh2 is a library implementing the SSH2 protocol
long_description  libssh2 is a library implementing the SSH2 protocol as \
		  defined by Internet Drafts: SECSH-TRANS(22), \
		  SECSH-USERAUTH(25), SECSH-CONNECTION(23), SECSH-ARCH(20), \
		  SECSH-FILEXFER(06), SECSH-DHGEX(04), and SECSH-NUMBERS(10).

license		  BSD

homepage	  http://www.libssh2.org/
master_sites	  ${homepage}download/

checksums     md5     a5d78344886f1282e4008c09bf568076 \
              sha1    271dd411015cd3656886541c6650a4471458669e \
              rmd160  cb438958a77df0e194ac83499dfdd78ff4524b0b

depends_lib	  port:openssl port:zlib

archcheck.files \
    lib/libcrypto.dylib \
    lib/libz.dylib

variant debug description {Enable debug mode including tracing support} {
    configure.args-append \
            --enable-debug
}

post-build {
    if {[variant_isset universal]} {
        foreach arch ${universal_archs_to_use} {
            reinplace "s|[muniversal_get_arch_flag ${arch}]||" \
                ${worksrcpath}-${arch}/libssh2.pc
        }
    }
}

livecheck.type  freecode
