# -*- 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 57749 2009-09-16 04:30:02Z ryandesign@macports.org $

PortSystem       1.0

name             lynx
set milestone    2.8.6
set release      5
version          ${milestone}rel.${release}
revision         1
categories       www
maintainers      nomaintainer
description      Text-based web browser
long_description \
    lynx is a program which allows a user to access World-Wide Web servers \
    and other information servers. It uses only ascii representation so \
    that it can be used from ascii-terminals and dial-in lines.

homepage         http://lynx.isc.org/

depends_lib      port:ncurses

use_bzip2        yes

distname         [strsed ${distname} {g/-//}]
worksrcdir       ${name}[strsed ${milestone} {g/\./-/}]

master_sites     http://lynx.isc.org/current/ \
                 ftp://lynx.isc.org/current/

checksums        md5 bd44c57d28fd3e4c9db1cd492d403600 \
                 sha1 019246b83fc7b6cb32bac0023f2ae6c5d330d18c \
                 rmd160 0ea800c3204d66c1470f63a0143fd71eca06e005

configure.args   --mandir=${prefix}/share/man \
                 --enable-ipv6
patchfiles       patch-LYCharSets.c

platforms        darwin

if {![variant_isset gnutls]} {
    default_variants +ssl
}

variant ssl conflicts gnutls description "Support for secure connections via OpenSSL" {
    configure.args-append   --with-ssl=${prefix}
    depends_lib-append      port:openssl
}

variant gnutls conflicts ssl description "Experimental support for secure connections via GnuTLS" {
    configure.args-append   --with-gnutls=${prefix}
    depends_lib-append      port:gnutls
}

livecheck.type  regex
livecheck.url   http://lynx.isc.org/current/
livecheck.regex "${name}(\\d+(?:\\.\\d+)*rel\\.\[0-9a-z\]*)${extract.suffix}"
