# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
# $Id: Portfile 55607 2009-08-14 17:26:26Z devans@macports.org $

PortSystem 1.0

name            gnutls
version         2.8.3
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     72b77092c5d1ae01306cd14c0f22d6e4 \
                sha1    c25fb354258777f9ee34b79b08eb87c024cada75 \
                rmd160  01763fad93e4b76e18dcfb1881c5f09011804dca

use_bzip2       yes

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

depends_build   port:pkgconfig

depends_lib     port:libgcrypt \
                port:libtasn1 \
                port:opencdk \
                port:lzo \
                port:zlib \
                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.check regex
livecheck.url   http://ftp.gnu.org/gnu/gnutls/
livecheck.regex ${name}-(\\d+\\.\[02468\]+(?:\\.\\d+)*)
