# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
# $Id: Portfile 65416 2010-03-26 01:35:21Z rmsfisher@macports.org $

PortSystem 1.0

name            gnutls
version         2.8.6
categories      devel security
maintainers     sfiera openmaintainer
description     GNU Transport Layer Security Library
homepage        http://www.gnutls.org/
platforms       darwin

long_description \
    GnuTLS is a portable ANSI C based library which implements the TLS 1.0 and \
    SSL 3.0 protocols. The library does not include any patented algorithms \
    and is available under the GNU Lesser General Public License (LGPL).

master_sites    gnu

checksums           md5     eb0a6d7d3cb9ac684d971c14f9f6d3ba \
                    sha1    bff911d4fd7389aa6698a644b3748eb2d23715bc \
                    rmd160  1cfda29a60df3b032b8b611e4341c2e834bb26b2

use_bzip2       yes

post-patch {
    reinplace -E /libtasn1_config_version=/s/--version/--modversion/ \
        $worksrcpath/configure
}

depends_build   port:pkgconfig

depends_lib     port:libtasn1 \
                port:opencdk \
                port:lzo \
                port:readline

configure.args  --with-lzo \
                --disable-guile \
                ac_cv_path_LIBTASN1_CONFIG="pkg-config libtasn1"

use_parallel_build  yes

test.run        yes
test.target     check

platform darwin 8 {
    depends_build-append   port:texinfo
}

livecheck.type  regex
livecheck.url   http://ftp.gnu.org/gnu/gnutls/
livecheck.regex ${name}-(\\d+\\.\[02468\]+(?:\\.\\d+)*)
