# -*- 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
PortGroup       legacysupport 1.1

# _strndup
legacysupport.newest_darwin_requires_legacy 10

name            anubis
version         4.3
revision        0
categories      mail
license         GPL-3
maintainers     nomaintainer
description     GNU Anubis is an outgoing mail processor.
long_description \
            GNU Anubis goes between the MUA (Mail User Agent) and the MTA (Mail \
            Transport Agent), and can perform on the fly various sorts of processing \
            and conversion on the outgoing mail in accord with the sender's specified \
            rules, based on a highly configurable regular expressions system. It \
            operates as a proxy server, independently from mail user agents. 
homepage        https://www.gnu.org/software/anubis

master_sites    gnu

checksums       rmd160  4a061b3f809fd0277f88560618b0a47b85d97a13 \
                sha256  ff0af3337c462218e5ee244c7ef90188af9efdf095bc05b6333401cf9882af2c \
                size    1248000

depends_lib     port:gdbm \
                port:gettext \
                port:libgsasl \
                port:libiconv

# anustart.c:282: warning: implicit declaration of function ‘sigemptyset’
patchfiles-append \
                patch-anustart.c.diff
# mta.c:516: error: ‘u_char’ undeclared (first use in this function)
patchfiles-append \
                patch-mta.c.diff

configure.args  --infodir=${prefix}/share/info \
                --mandir=${prefix}/share/man \
                --without-guile \
                --without-gpgme \
                --without-gnutls \
                --without-pcre

platform darwin 8 powerpc {
    configure.compiler  gcc-3.3
}

variant gnutls description {Use GnuTLS} {
    depends_lib-append      path:lib/pkgconfig/gnutls.pc:gnutls

    configure.args-replace  --without-gnutls --with-gnutls
}

variant pcre description {Use Perl-style regular expressions} {
    depends_lib-append      port:pcre

    configure.args-replace  --without-pcre --with-pcre
}
