aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Herrmann <dhn@FreeBSD.org>2011-02-14 21:38:40 +0000
committerDennis Herrmann <dhn@FreeBSD.org>2011-02-14 21:38:40 +0000
commit899eaa08bc042c56ebd56b2b235588976bde76ef (patch)
tree973e0cfe2fea80a547d38f38da40fcc55657b92d
parent8a33d34ac40a2ff7cc38fad6c323ad6a5d5746df (diff)
downloadports-899eaa08bc042c56ebd56b2b235588976bde76ef.tar.gz
ports-899eaa08bc042c56ebd56b2b235588976bde76ef.zip
Notes
-rw-r--r--mail/anubis/Makefile184
-rw-r--r--mail/anubis/distinfo5
-rw-r--r--mail/anubis/files/anubis.in31
-rw-r--r--mail/anubis/files/anubis.sh15
-rw-r--r--mail/anubis/files/patch-config.h.in23
-rw-r--r--mail/anubis/files/patch-configure28
-rw-r--r--mail/anubis/files/patch-configure.ac92
-rw-r--r--mail/anubis/files/patch-src__env.c11
-rw-r--r--mail/anubis/files/patch-src__gpg.c11
-rw-r--r--mail/anubis/files/patch-src__headers.h27
-rw-r--r--mail/anubis/files/patch-src_auth.c114
-rw-r--r--mail/anubis/files/patch-src_errs.c14
-rw-r--r--mail/anubis/files/patch-src_log.c14
-rw-r--r--mail/anubis/files/patch-src_net.c22
-rw-r--r--mail/anubis/files/patch-src_ssl.c14
-rw-r--r--mail/anubis/files/patch-src_tunnel.c20
-rw-r--r--mail/anubis/pkg-plist37
17 files changed, 319 insertions, 343 deletions
diff --git a/mail/anubis/Makefile b/mail/anubis/Makefile
index c1f8361e4183..d98a5897f887 100644
--- a/mail/anubis/Makefile
+++ b/mail/anubis/Makefile
@@ -1,131 +1,149 @@
-# ex:ts=8
# Ports collection makefile for: anubis
# Date created: Jul 31, 2002
# Whom: ijliao
#
# $FreeBSD$
#
-###########################################################################
-#
-# Following compile-time options are available:
-#
-# WITH_GNUTLS=yes Enable GnuTLS API instead of default OpenSSL API
-# WITHOUT_OPENSSL=yes Disable the OpenSSL support; unless WITH_GNUTLS
-# is specified, this will disables TLS/SSL suport
-# WITHOUT_GPGME=yes Disable the GnuPG (GPGME library) support
-# WITH_PCRE=yes Enable the PCRE library support
-#
-###########################################################################
-PORTNAME= anubis
-PORTVERSION= 3.6.2
-PORTREVISION= 10
-CATEGORIES= mail
-MASTER_SITES= ${MASTER_SITE_GNU}
+PORTNAME= anubis
+PORTVERSION= 4.1.1
+CATEGORIES= mail
+MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Outgoing SMTP mail processor
+MAINTAINER= bsdkaffee@gmail.com
+COMMENT= Outgoing SMTP mail processor
+
+USE_RC_SUBR= anubis
+USE_AUTOTOOLS= aclocal autoheader autoconf automake
+ACLOCAL_ARGS= -I m4 -I am
+AUTOMAKE_ARGS= --force
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+MAN1= anubis.1
+INFO= anubis
+PORTEXAMPLES= 1anubisrc 2anubisrc
-GNU_CONFIGURE= yes
-CONFIGURE_ENV= MAKEINFO="makeinfo --no-split" LDFLAGS="${LDFLAGS}" \
- CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}"
-LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \
+ CPPFLAGS="-I${LOCALBASE}/include"
+MAKE_JOBS_UNSAFE= yes
+
+OPTIONS= NLS "Native language support" on \
+ GUILE "Guile support" on \
+ GPGME "GPG support via gpgme" on \
+ GNUTLS "GNU TLS support" on \
+ GSASL "GSASL support (required for databases)" on \
+ GDBM "GDBM database support" off \
+ MYSQL "MySQL database support" off \
+ PGSQL "PostgreSQL database support" off \
+ PCRE "Perl-style regular expressions" off \
+ PAM "PAM support" off \
+ SOCKS "SOCKS proxy support" off \
+ TCPWRAP "TCP wrappers" off
+
+.include <bsd.port.options.mk>
+
+# Default requirement for anubis rc script
+_REQUIRE= mail
.if defined(WITHOUT_NLS)
-CONFIGURE_ARGS+= --disable-nls
-PLIST_SUB+= NLS="@comment "
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB+= NLS="@comment "
.else
-USE_ICONV= yes
-USE_GETTEXT= yes
-PLIST_SUB+= NLS=""
+USE_ICONV= yes
+USE_GETTEXT= yes
+PLIST_SUB+= NLS=""
.endif
-# Select TLS/SSL API: either OpenSSL (default), GnuTLS, or none
-.if defined(WITH_GNUTLS)
-LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
-.elif !defined(WITHOUT_OPENSSL)
-USE_OPENSSL= yes
-CONFIGURE_ARGS+= --with-openssl
+.if defined(WITHOUT_GUILE)
+CONFIGURE_ARGS+=--without-guile
+PLIST_SUB+= GUILE="@comment "
.else
-CONFIGURE_ARGS+= --without-gnutls
+LIB_DEPENDS+= guile:${PORTSDIR}/lang/guile
+PORTEXAMPLES+= anubis.scm anubisrc.guile
+PLIST_SUB+= GUILE=""
.endif
-# GPGME
.if defined(WITHOUT_GPGME)
-CONFIGURE_ARGS+= --without-gpgme
+CONFIGURE_ARGS+=--without-gpgme
.else
-LIB_DEPENDS+= gpgme03.9:${PORTSDIR}/security/gpgme03
-CFLAGS+= -I${LOCALBASE}/include/gpgme03
+LIB_DEPENDS+= gpgme.18:${PORTSDIR}/security/gpgme
.endif
-# PCRE
-.if defined(WITH_PCRE)
-LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
-CONFIGURE_ARGS+= --with-pcre
+.if defined(WITHOUT_GNUTLS)
+CONFIGURE_ARGS+=--without-gnutls
+.else
+LIB_DEPENDS+= gnutls.40:${PORTSDIR}/security/gnutls
.endif
-# PAM
-.if exists(/usr/lib/libpam.so)
-WITH_PAM= yes
-CONFIGURE_ARGS+= --with-pam
-PLIST_SUB+= PAM=""
-.else
-PLIST_SUB+= PAM="@comment "
+.if defined(WITH_GDBM)
+.undef WITHOUT_GSASL
+WITH_GSASL= yes
+LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm
+CONFIGURE_ARGS+=--with-gdbm
.endif
-# TCP Wrappers
-.if exists(/usr/include/tcpd.h)
-WITH_TCP_WRAPPERS= yes
-CONFIGURE_ARGS+= --with-tcp-wrappers
+.if defined(WITH_MYSQL)
+.undef WITHOUT_GSASL
+WITH_GSASL= yes
+USE_MYSQL= yes
+CONFIGURE_ARGS+=--with-mysql
+_REQUIRE+= mysql
.endif
-MAN1= anubis.1
-INFO= anubis
-DOCS= AUTHORS INSTALL NEWS README THANKS TODO
+.if defined(WITH_PGSQL)
+.undef WITHOUT_GSASL
+WITH_GSASL= yes
+USE_PGSQL= yes
+CONFIGURE_ARGS+=--with-postgres
+_REQUIRE+= postgresql
+.endif
-pre-configure:
- @${ECHO_MSG} ""
-.if defined(WITH_GNUTLS)
- @${ECHO_MSG} "Using GnuTLS as TLS/SSL API"
-.elif !defined(WITHOUT_OPENSSL)
- @${ECHO_MSG} "Using OpenSSL as TLS/SSL API"
+.if defined(WITHOUT_GSASL)
+CONFIGURE_ARGS+=--without-gsasl
+PLIST_SUB+= GSASL="@comment "
.else
- @${ECHO_MSG} "Disabling TLS/SSL support"
-.endif
-.if defined(WITHOUT_GPGME)
- @${ECHO_MSG} "Disabling GnuPG (GPGME) support"
+LIB_DEPENDS+= gsasl.14:${PORTSDIR}/security/gsasl
+PLIST_SUB+= GSASL=""
.endif
+
.if defined(WITH_PCRE)
- @${ECHO_MSG} "Enabling PCRE support"
-.else
- @${ECHO_MSG} "You could define WITH_PCRE to enable PCRE support"
+LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
+CONFIGURE_ARGS+=--with-pcre
.endif
-.if defined(WITH_PAM)
- @${ECHO_MSG} "Enabling PAM support"
+
+.if defined(WITH_PAM) && exists(/usr/lib/libpam.so)
+CONFIGURE_ARGS+=--with-pam
+PORTEXAMPLES+= pam
+.endif
+
+.if defined(WITH_TCPWRAP) && exists(/usr/include/tcpd.h)
+CONFIGURE_ARGS+=--with-tcp-wrappers
.endif
-.if defined(WITH_TCP_WRAPPERS)
- @${ECHO_MSG} "Enabling TCP wrappers support"
+
+.if defined(WITH_SOCKS)
+CONFIGURE_ARGS+=--with-socks-proxy
.endif
- @${ECHO_MSG} ""
- @${RM} -f ${WRKSRC}/doc/anubis.info*
+
+SUB_LIST+= REQUIRE="${_REQUIRE}"
post-patch:
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h
- @${SED} -e "s|%%PREFIX%%|${PREFIX}|g" ${FILESDIR}/anubis.sh > \
- ${WRKSRC}/anubis.sh
+.if !defined(NOPORTEXAMPLES)
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/anubis.sh ${PREFIX}/etc/rc.d/anubis.sh.sample
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR}
+.if defined(WITH_GUILE)
+ cd ${WRKSRC}/examples && \
+ ${INSTALL_DATA} anubis.scm anubisrc.guile ${EXAMPLESDIR}
+.endif
.if defined(WITH_PAM)
@${MKDIR} ${EXAMPLESDIR}/pam
- ${INSTALL_DATA} ${WRKSRC}/examples/pam/* ${EXAMPLESDIR}/pam
+ ${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${EXAMPLESDIR}/pam
.endif
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/mail/anubis/distinfo b/mail/anubis/distinfo
index 70e06efd277d..5a21c9d0aa2b 100644
--- a/mail/anubis/distinfo
+++ b/mail/anubis/distinfo
@@ -1,3 +1,2 @@
-MD5 (anubis-3.6.2.tar.gz) = 9e705e38cafe4a57025a6ad89fd73226
-SHA256 (anubis-3.6.2.tar.gz) = bb821f1e45a9cba2c6e3b9328b94e7327e3b69317a0a46d0ccdf0d27b1bb465e
-SIZE (anubis-3.6.2.tar.gz) = 419210
+SHA256 (anubis-4.1.1.tar.gz) = 93ef7a2d8bc3b50cd2e228cfe27e296ee14accadf8533bad9b2beee88a96e8fa
+SIZE (anubis-4.1.1.tar.gz) = 1104272
diff --git a/mail/anubis/files/anubis.in b/mail/anubis/files/anubis.in
new file mode 100644
index 000000000000..99b5e85f2429
--- /dev/null
+++ b/mail/anubis/files/anubis.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: anubis
+# REQUIRE: %%REQUIRE%%
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable anubis:
+#
+# anubis_enable (bool): Set to "YES" to enable anubis.
+# Default is "NO".
+# anubis_conf (file): Set location of anubisrc.
+# Default is "%%PREFIX%%/etc/anubisrc"
+#
+
+. /etc/rc.subr
+
+name="anubis"
+rcvar=`set_rcvar`
+
+load_rc_config ${name}
+
+: ${anubis_enable="NO"}
+: ${anubis_conf="%%PREFIX%%/etc/anubisrc"}
+
+required_files="${anubis_conf}"
+command="%%PREFIX%%/sbin/${name}"
+run_rc_command "$1"
diff --git a/mail/anubis/files/anubis.sh b/mail/anubis/files/anubis.sh
deleted file mode 100644
index 4404db4cf427..000000000000
--- a/mail/anubis/files/anubis.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-case "$1" in
-start)
- [ -x %%PREFIX%%/sbin/anubis ] && %%PREFIX%%/sbin/anubis > /dev/null && echo -n ' anubis'
- ;;
-stop)
- killall anubis
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0
diff --git a/mail/anubis/files/patch-config.h.in b/mail/anubis/files/patch-config.h.in
new file mode 100644
index 000000000000..246471ac1b43
--- /dev/null
+++ b/mail/anubis/files/patch-config.h.in
@@ -0,0 +1,23 @@
+--- ./config.h.in.orig 2008-12-19 13:30:37.000000000 -0500
++++ ./config.h.in 2011-02-09 20:52:34.000000000 -0500
+@@ -180,9 +180,6 @@
+ /* Define to 1 if you have the `pam' library (-lpam). */
+ #undef HAVE_LIBPAM
+
+-/* Define to 1 if you have the `pam_misc' library (-lpam_misc). */
+-#undef HAVE_LIBPAM_MISC
+-
+ /* Define to 1 if you have the `pcre' library (-lpcre). */
+ #undef HAVE_LIBPCRE
+
+@@ -252,8 +249,8 @@
+ /* Define to 1 if you have the <security/pam_appl.h> header file. */
+ #undef HAVE_SECURITY_PAM_APPL_H
+
+-/* Define to 1 if you have the <security/pam_misc.h> header file. */
+-#undef HAVE_SECURITY_PAM_MISC_H
++/* Define to 1 if you have the <security/openpam.h> header file. */
++#undef HAVE_SECURITY_OPENPAM_H
+
+ /* Define to 1 if you have the `setegid' function. */
+ #undef HAVE_SETEGID
diff --git a/mail/anubis/files/patch-configure b/mail/anubis/files/patch-configure
deleted file mode 100644
index 641761441f7b..000000000000
--- a/mail/anubis/files/patch-configure
+++ /dev/null
@@ -1,28 +0,0 @@
---- configure.orig Mon Dec 20 20:32:43 2004
-+++ configure Mon Dec 20 20:34:13 2004
-@@ -8603,13 +8603,13 @@
-
- else
-
--echo "$as_me:$LINENO: checking for main in -lgpgme" >&5
--echo $ECHO_N "checking for main in -lgpgme... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for main in -lgpgme03" >&5
-+echo $ECHO_N "checking for main in -lgpgme03... $ECHO_C" >&6
- if test "${ac_cv_lib_gpgme_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lgpgme $LIBS"
-+LIBS="-lgpgme03 $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
- /* confdefs.h. */
-@@ -8656,7 +8656,7 @@
- #define HAVE_LIBGPGME 1
- _ACEOF
-
-- LIBS="-lgpgme $LIBS"
-+ LIBS="-lgpgme03 $LIBS"
-
- else
- with_gpgme=no
diff --git a/mail/anubis/files/patch-configure.ac b/mail/anubis/files/patch-configure.ac
new file mode 100644
index 000000000000..0c40e5fe4e4d
--- /dev/null
+++ b/mail/anubis/files/patch-configure.ac
@@ -0,0 +1,92 @@
+--- ./configure.ac.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./configure.ac 2011-02-09 20:52:34.000000000 -0500
+@@ -77,7 +77,6 @@
+ ])
+
+ AC_CHECK_LIB(socket, socket)
+-AC_CHECK_LIB(nsl, gethostbyaddr)
+
+ AC_SUBST(INCLUDES)
+ case $build in
+@@ -143,10 +142,10 @@
+ else
+ AC_PATH_PROG(GPG, gpg)
+ findgpgmedir() { :
+- if test -f "$1/include/gpgme.h"; then
++ if test -f "$1/include/gpgme/gpgme.h"; then
+ gpgmedir=1
+ INCLUDES="$INCLUDES -I$1/include"
+- AC_MSG_CHECKING(for $1/include/gpgme.h)
++ AC_MSG_CHECKING(for $1/include/gpgme/gpgme.h)
+ AC_MSG_RESULT([yes])
+ return 0
+ fi
+@@ -158,7 +157,7 @@
+ if test $gpgmedir; then
+ AC_DEFINE(HAVE_GPGME_H, 1, [Define to 1 if HAVE_GPGME_H is requested.])
+ else
+- AC_CHECK_HEADERS(gpgme.h)
++ AC_CHECK_HEADERS(gpgme/gpgme.h)
+ fi
+ ANUBIS_GPGFILES='$(GPGFILES)'
+ M4_DEFS="$M4_DEFS -DWITH_GPG"
+@@ -189,6 +188,7 @@
+ WITH_MYSQL=no
+ WITH_POSTGRES=no
+ WITH_GDBM=no
++WITH_GSASL=no
+
+ dnl Use option --with-gsasl to compile GSASL library support.
+ MU_CHECK_GSASL(0.2.3, [
+@@ -199,11 +199,21 @@
+ ANUBIS_BIN_ADM='$(adm_bin_programs)'
+ M4_DEFS="$M4_DEFS -DWITH_GSASL"
+
++ AC_ARG_WITH(gdbm,
++ AC_HELP_STRING([--with-gdbm],
++ [Configure to work with GDBM]),
++ [with_gdbm=${withval}],
++ [with_gdbm=no])
++ if test "$with_gdbm" = "yes"; then
+ AC_CHECK_LIB(gdbm, gdbm_open,
+ [WITH_GDBM=yes
+ LIBS="$LIBS -lgdbm"
+ AC_DEFINE(HAVE_LIBGDBM,1,[Define if you have libgdbm])],
+- [AC_MSG_RESULT([Disabling GDBM support...])])
++ with_gdbm=no)
++ fi
++ if test "$with_gdbm" = "yes"; then
++ AC_MSG_RESULT([Enabling GDBM support...])
++ fi
+
+ AC_ARG_WITH(mysql,
+ AC_HELP_STRING([--with-mysql],
+@@ -277,7 +287,8 @@
+ if test $with_gnutls = yes; then
+ AC_CHECK_HEADERS(gnutls/gnutls.h)
+ if test $ac_cv_header_gnutls_gnutls_h != no; then
+- AM_PATH_LIBGNUTLS("1.0.0",
++ PKG_CHECK_MODULES([LIBGNUTLS],
++ [gnutls >= 1.0.0],
+ [M4_DEFS="$M4_DEFS -DWITH_SSL -DWITH_GNUTLS"
+ AC_DEFINE(USE_GNUTLS, 1,
+ [Define to 1 if USE_GNUTLS is requested.])],
+@@ -327,8 +338,8 @@
+ [with_pam=no])
+ if test "$with_pam" = "yes"; then
+ AC_CHECK_LIB(pam, main,, with_pam=no)
+- AC_CHECK_LIB(pam_misc, main,, with_pam=no)
+- AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h,, with_pam=no)
++ AC_CHECK_HEADER(security/pam_appl.h,, with_pam=no)
++ AC_CHECK_HEADER(security/openpam.h,, with_pam=no, [ #include <security/pam_appl.h> ])
+ fi
+ if test "$with_pam" = "yes"; then
+ AC_MSG_RESULT([Enabling PAM support...])
+@@ -342,7 +353,6 @@
+ [with_tcp_wrappers=no])
+ if test "$with_tcp_wrappers" = "yes"; then
+ AC_CHECK_LIB(wrap, main,, with_tcp_wrappers=no)
+- AC_CHECK_LIB(nsl, main,, with_tcp_wrappers=no)
+ AC_CHECK_HEADERS(tcpd.h,, with_tcp_wrappers=no)
+ fi
+ if test "$with_tcp_wrappers" = "yes"; then
diff --git a/mail/anubis/files/patch-src__env.c b/mail/anubis/files/patch-src__env.c
new file mode 100644
index 000000000000..db2608efdf04
--- /dev/null
+++ b/mail/anubis/files/patch-src__env.c
@@ -0,0 +1,11 @@
+--- ./src/env.c.orig 2008-12-16 16:44:38.000000000 -0500
++++ ./src/env.c 2011-02-09 20:52:34.000000000 -0500
+@@ -32,7 +32,7 @@
+ #ifdef HAVE_PAM
+ pam_handle_t *pamh;
+ static struct pam_conv conv = {
+- misc_conv,
++ openpam_ttyconv,
+ NULL
+ };
+ #endif /* HAVE_PAM */
diff --git a/mail/anubis/files/patch-src__gpg.c b/mail/anubis/files/patch-src__gpg.c
new file mode 100644
index 000000000000..0e8cfd792e21
--- /dev/null
+++ b/mail/anubis/files/patch-src__gpg.c
@@ -0,0 +1,11 @@
+--- ./src/gpg.c.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./src/gpg.c 2011-02-09 20:52:34.000000000 -0500
+@@ -23,7 +23,7 @@
+ #include "rcfile.h"
+
+ #ifdef HAVE_GPG
+-#include <gpgme.h>
++#include <gpgme/gpgme.h>
+ #define obstack_chunk_alloc malloc
+ #define obstack_chunk_free free
+ #include <obstack.h>
diff --git a/mail/anubis/files/patch-src__headers.h b/mail/anubis/files/patch-src__headers.h
new file mode 100644
index 000000000000..3e835d0ce897
--- /dev/null
+++ b/mail/anubis/files/patch-src__headers.h
@@ -0,0 +1,27 @@
+--- ./src/headers.h.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./src/headers.h 2011-02-09 20:52:34.000000000 -0500
+@@ -51,11 +51,11 @@
+ # else
+ # error POSIX Regular Expressions are required!
+ # endif /* HAVE_REGEX_H and HAVE_REGCOMP */
+-# if defined(HAVE_LIBPAM) && defined(HAVE_LIBPAM_MISC)
+-# if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
++# if defined(HAVE_LIBPAM)
++# if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_OPENPAM_H)
+ # define HAVE_PAM
+-# endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_PAM_MISC_H */
+-# endif /* HAVE_LIBPAM and HAVE_LIBPAM_MISC */
++# endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_OPENPAM_H */
++# endif /* HAVE_LIBPAM */
+ # if defined(HAVE_LIBWRAP) && defined(HAVE_TCPD_H)
+ # define USE_LIBWRAP
+ # endif /* HAVE_LIBWRAP and HAVE_TCPD_H */
+@@ -121,7 +121,7 @@
+
+ #ifdef HAVE_PAM
+ # include <security/pam_appl.h>
+-# include <security/pam_misc.h>
++# include <security/openpam.h>
+ #endif /* HAVE_PAM */
+
+ #if defined(WITH_GSASL)
diff --git a/mail/anubis/files/patch-src_auth.c b/mail/anubis/files/patch-src_auth.c
deleted file mode 100644
index f4e4209b1c52..000000000000
--- a/mail/anubis/files/patch-src_auth.c
+++ /dev/null
@@ -1,114 +0,0 @@
-
-$FreeBSD$
-
---- src/auth.c.orig Wed Dec 4 22:43:34 2002
-+++ src/auth.c Sun Mar 7 15:10:48 2004
-@@ -42,6 +42,66 @@
- IDENT protocol support
- ************************/
-
-+#define USERNAME_C "USERID :"
-+
-+/* If the reply matches sscanf expression
-+
-+ "%*[^:]: USERID :%*[^:]:%s"
-+
-+ and the length of "%s" part does not exceed size-1 bytes,
-+ copies this part to USERNAME and returns 0. Otherwise,
-+ returns 1 */
-+
-+static int
-+ident_extract_username(char *reply, char *username, size_t size)
-+{
-+ char *p;
-+
-+ p = strchr (reply, ':');
-+ if (!p)
-+ return 1;
-+ if (p[1] != ' '
-+ || strncmp (p + 2, USERNAME_C, sizeof (USERNAME_C) - 1))
-+ return 1;
-+ p += 2 + sizeof (USERNAME_C) - 1;
-+ p = strchr (p, ':');
-+ if (!p)
-+ return 1;
-+ p++;
-+ if (strlen (p) >= size)
-+ return 1;
-+ strcpy(username, p);
-+ return 0;
-+}
-+
-+/* If the reply matches sscanf expression
-+
-+ "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s"
-+
-+ and the length of "%s" part does not exceed size-1 bytes,
-+ copies this part to USERNAME and returns 0. Otherwise,
-+ returns 1 */
-+
-+static int
-+crypt_extract_username(char *reply, char *username, size_t size)
-+{
-+ int i;
-+ char *p = reply;
-+#define skip_word(c) while (*c && (*c) != ' ') c++
-+
-+ /* Skip five words */
-+ for (i = 0; i < 5; i++) {
-+ skip_word(p);
-+ if (!*p++)
-+ return 1;
-+ }
-+
-+ if (strlen (p) >= size)
-+ return 1;
-+ strcpy(username, p);
-+ return 0;
-+}
-+
- int
- auth_ident(struct sockaddr_in *addr, char *user, int size)
- {
-@@ -51,7 +111,8 @@
- int sd = 0;
-
- if ((sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-- anubis_error(SOFT, _("IDENT: socket() failed: %s."), strerror(errno));
-+ anubis_error(SOFT, _("IDENT: socket() failed: %s."),
-+ strerror(errno));
- return 0;
- }
- memcpy(&ident, addr, sizeof(ident));
-@@ -69,11 +130,7 @@
- info(VERBOSE, _("IDENT: connected to %s:%u"),
- inet_ntoa(ident.sin_addr), ntohs(ident.sin_port));
-
-- #ifdef HAVE_SNPRINTF
- snprintf(buf, LINEBUFFER,
-- #else
-- sprintf(buf,
-- #endif /* HAVE_SNPRINTF */
- "%u , %u"CRLF, ntohs(addr->sin_port), session.tunnel_port);
-
- if (send(sd, buf, strlen(buf), 0) == -1) {
-@@ -89,7 +146,8 @@
- close_socket(sd);
- memset(user, 0, size);
-
-- if (sscanf(buf, "%*[^:]: USERID :%*[^:]:%s", user) != 1) {
-+ remcrlf (buf);
-+ if (ident_extract_username(buf, user, size)) {
- info(VERBOSE, _("IDENT: incorrect data."));
- return 0;
- }
-@@ -105,7 +163,8 @@
- if (rs == -1)
- return 0;
-
-- if (sscanf(buf, "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s", user) != 1) {
-+ remcrlf (buf);
-+ if (crypt_extract_username(buf, user, size)) {
- info(VERBOSE, _("IDENT: incorrect data (DES deciphered)."));
- return 0;
- }
diff --git a/mail/anubis/files/patch-src_errs.c b/mail/anubis/files/patch-src_errs.c
deleted file mode 100644
index 5fc5f5ab0485..000000000000
--- a/mail/anubis/files/patch-src_errs.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/errs.c.orig Wed Dec 4 22:42:02 2002
-+++ src/errs.c Sun Mar 7 15:10:48 2004
-@@ -51,7 +51,7 @@
- if (options.slogfile)
- filelog(options.slogfile, txt);
- else
-- syslog(LOG_ERR | LOG_MAIL, txt);
-+ syslog(LOG_ERR | LOG_MAIL, "%s", txt);
-
- if (options.ulogfile && options.uloglevel >= FAILS)
- filelog(options.ulogfile, txt);
diff --git a/mail/anubis/files/patch-src_log.c b/mail/anubis/files/patch-src_log.c
deleted file mode 100644
index 6ec3bdd268be..000000000000
--- a/mail/anubis/files/patch-src_log.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/log.c.orig Wed Dec 4 22:42:26 2002
-+++ src/log.c Sun Mar 7 15:10:48 2004
-@@ -70,7 +70,7 @@
- if (options.slogfile)
- filelog(options.slogfile, txt);
- else
-- syslog(LOG_INFO | LOG_MAIL, txt);
-+ syslog(LOG_INFO | LOG_MAIL, "%s", txt);
-
- if (options.ulogfile && options.uloglevel >= ALL)
- filelog(options.ulogfile, txt);
diff --git a/mail/anubis/files/patch-src_net.c b/mail/anubis/files/patch-src_net.c
deleted file mode 100644
index 9fbbfea08c9a..000000000000
--- a/mail/anubis/files/patch-src_net.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/net.c.orig Wed Dec 11 15:37:56 2002
-+++ src/net.c Sun Mar 7 14:55:10 2004
-@@ -122,6 +122,7 @@
- int sd = 0;
- unsigned long inaddr;
- struct sockaddr_in addr;
-+ int true = 1;
-
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
-@@ -152,6 +153,8 @@
- }
- else
- addr.sin_addr.s_addr = htonl(INADDR_ANY);
-+
-+ setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
-
- if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)))
- anubis_error(HARD, _("bind() failed: %s."), strerror(errno));
diff --git a/mail/anubis/files/patch-src_ssl.c b/mail/anubis/files/patch-src_ssl.c
deleted file mode 100644
index 6e91d35a01ae..000000000000
--- a/mail/anubis/files/patch-src_ssl.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/ssl.c.orig Wed Dec 4 22:40:45 2002
-+++ src/ssl.c Sun Mar 7 15:10:48 2004
-@@ -64,7 +64,7 @@
- if (options.termlevel != SILENT) {
- #ifdef HAVE_SYSLOG
- if ((topt & T_DAEMON) && !(topt & T_FOREGROUND))
-- syslog(LOG_ERR | LOG_MAIL, string_error);
-+ syslog(LOG_ERR | LOG_MAIL, "%s", string_error);
- else
- #endif /* HAVE_SYSLOG */
- mprintf(">>%s", string_error);
diff --git a/mail/anubis/files/patch-src_tunnel.c b/mail/anubis/files/patch-src_tunnel.c
deleted file mode 100644
index 76b4f17d31f2..000000000000
--- a/mail/anubis/files/patch-src_tunnel.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-$FreeBSD$
-
---- src/tunnel.c.orig Sun Dec 8 19:04:51 2002
-+++ src/tunnel.c Sun Mar 7 14:55:10 2004
-@@ -554,9 +554,11 @@
- ptr1 = strstr(boundary_buf, "boundary=");
- if (ptr1 == 0) {
- plist = plist->next;
-- safe_strcpy(boundary_buf, plist->line);
-- change_to_lower(boundary_buf);
-- ptr1 = strstr(boundary_buf, "boundary=");
-+ if (plist) {
-+ safe_strcpy(boundary_buf, plist->line);
-+ change_to_lower(boundary_buf);
-+ ptr1 = strstr(boundary_buf, "boundary=");
-+ }
- }
-
- if (ptr1) {
diff --git a/mail/anubis/pkg-plist b/mail/anubis/pkg-plist
index dcc66686487c..90aa6fbd1953 100644
--- a/mail/anubis/pkg-plist
+++ b/mail/anubis/pkg-plist
@@ -1,19 +1,24 @@
-@comment $FreeBSD$
+@stopdaemon anubis
+%%GSASL%%bin/anubisusr
+bin/msg2smtp.pl
sbin/anubis
-etc/rc.d/anubis.sh.sample
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/NEWS
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/THANKS
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%EXAMPLESDIR%%/1anubisrc
-%%EXAMPLESDIR%%/2anubisrc
-%%PAM%%%%EXAMPLESDIR%%/pam/anubis
-%%PAM%%%%EXAMPLESDIR%%/pam/anubis.allow
-%%PAM%%%%EXAMPLESDIR%%/pam/anubis.deny
-%%PAM%%@dirrm %%EXAMPLESDIR%%/pam
-@dirrm %%EXAMPLESDIR%%
+%%GSASL%%sbin/anubisadm
+%%GUILE%%share/anubis/entire-msg.scm
+%%GUILE%%share/anubis/remailer.scm
+%%GUILE%%share/anubis/rot-13.scm
+%%NLS%%share/locale/da/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/de/LC_MESSAGES/anubis.mo
%%NLS%%share/locale/fr/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/id/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/it/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/ms/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/anubis.mo
%%NLS%%share/locale/tr/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/anubis.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/anubis.mo
+@dirrm share/anubis