# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0
name            mailx
version         12.4
categories      mail
maintainers     toby
description     Heirloom mailx
long_description \
    Mailx is derived from Berkeley Mail and is intended provide the \
    functionality of the POSIX mailx command with additional support for MIME, \
    IMAP, POP3, SMTP, and S/MIME. It provides enhanced features for \
    interactive use, such as caching and disconnected operation for IMAP, \
    message threading, scoring, and filtering. It is also usable as a mail \
    batch language, both for sending and receiving mail.
homepage        http://heirloom.sourceforge.net/mailx.html
platforms       darwin

master_sites    sourceforge:heirloom
use_bzip2       yes
checksums       md5 0c93759e34200eb56a0e7c464680a54a \
                sha1 b1e105adf9d36269daf317dedf68b6e4cca404a7 \
                rmd160 8244d04d0a0058fdbe9867ca503c7cda8d580154

patchfiles      patch-Makefile \
                patch-junk.c \
                patch-maildir.c

configure {
    reinplace "s|__PREFIX__|${prefix}|" "${worksrcpath}/Makefile"
    reinplace "s|__DESTROOT__|${destroot}|" "${worksrcpath}/Makefile"
    reinplace "s|__CC__|${configure.cc}|" "${worksrcpath}/Makefile"
    reinplace "s|__CFLAGS__|${configure.cflags}|" "${worksrcpath}/Makefile"
    reinplace "s|__LDFLAGS__|${configure.ldflags}|" "${worksrcpath}/Makefile"
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex Release (\[^ \]+) \\(current\\)
