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

PortSystem          1.0

# TODO(pending): s-nail will be renamed to s-mailx in version 15
# https://lists.sdaoden.eu/pipermail/s-mailx/2019-September/001286.html
name                s-nail
version             14.9.24
revision            1
categories          mail
license             {BSD-old BSD}
maintainers         nomaintainer
description         Replacement for Berkeley Mail and System V mailx command
long_description \
    S-nail provides a simple and friendly environment for sending and \
    receiving mail. It is intended to provide the functionality of the POSIX \
    mailx(1) command, but is MIME capable and optionally offers extensions \
    for line editing, S/MIME, SMTP and POP3, among others.
homepage            https://www.sdaoden.eu/code.html#s-nail
platforms           darwin

master_sites        https://ftp.sdaoden.eu/
use_xz              yes
checksums           rmd160 de3d4f4be1c3b5ea58d6851097aa149407c9a000 \
                    sha256 2714d6b8fb2af3b363fc7c79b76d058753716345d1b6ebcd8870ecd0e4f7ef8c \
                    size 803100

depends_lib-append  port:kerberos5 \
                    port:libiconv \
                    port:libidn2 \
                    path:lib/libssl.dylib:openssl

use_configure       no

build.args          VAL_PREFIX=${prefix} \
                    VAL_MAIL=${prefix}/var/spool/mail \
                    VAL_SID= \
                    VAL_MAILX=mail \
                    VERBOSE=yes

post-destroot {
    ln -s mail ${destroot}${prefix}/bin/mailx
    ln -s mail.1.gz ${destroot}${prefix}/share/man/man1/mailx.1.gz
}

livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}
