# -*- 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$

PortSystem          1.0

name                nmh
version             1.4
categories          mail
platforms           darwin
maintainers         pobox.com:kenh
license             BSD

description         The nmh Mail Handling System

long_description    Nmh is an update to the classic Rand MH Mail Handling \
                    System. It is a suite of powerful command line \
                    utilities for reading and processing email.

homepage            http://www.nongnu.org/nmh/
master_sites        http://download.savannah.gnu.org/releases/nmh/

checksums           rmd160  bfcc38ad3924dc713880935ceb817eb14dec4d9b \
                    sha256  f38db482c8d6587eb50de2633a222cccac9e2aea0f0eacdff8eea8244d8290f2

depends_lib         port:libiconv \
                    port:ncurses

configure.args      --enable-pop

# error: h/mh.h: No such file or directory
# error: h/mts.h: No such file or directory
use_parallel_build  no

variant sasl description {Add support for SASL authentication in POP and SMTP} {
    depends_lib-append      port:cyrus-sasl2
    configure.args-append   --with-cyrus-sasl
}

variant tls description {Add support for TLS encryption in SMTP} {
    depends_lib-append      port:openssl
    configure.args-append   --with-tls
}

default_variants    +sasl +tls

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}