ports/154641: [UPDATE] mail/anubis: Update to version 4.1.1, maintain

Jason E. Hale bsdkaffee at gmail.com
Thu Feb 10 07:50:09 UTC 2011


>Number:         154641
>Category:       ports
>Synopsis:       [UPDATE] mail/anubis: Update to version 4.1.1, maintain
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 10 07:50:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jason E. Hale
>Release:        FreeBSD 8.1-RELEASE-p1 i386
>Organization:
none 
>Environment:
System: FreeBSD mocha.verizon.net 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #0: Wed Oct 6 21:42:52 EDT 2010 root at mocha.verizon.net:/usr/obj/usr/src/sys/MOCHA8 i386


	
>Description:
- Update mail/anubis to 4.1.1
- Take maintainership
- Makefile overhaul
- OPTIONify
- Add LICENSE
- Mark MAKE_JOBS_UNSAFE
- Update rc script
	
>How-To-Repeat:
Use attached diff.

Removed files:
files/anubis.sh             (replaced by anubis.in)
files/patch-configure       (configure.ac is now patched)
files/patch-src_auth.c      (no longer relavent)
files/patch-src_errs.c      (applied upstream)
files/patch-src_log.c       (applied upstream)
files/patch-src_net.c       (applied upstream)
files/patch-src_ssl.c       (no longer relavent)
files/patch-src_tunnel.c    (applied upstream)

Added files:
files/anubis.in             (new rc script)
files/patch-config.h.in     (PAM fix, misc_conv -> openpam_ttyconv)
files/patch-configure.ac    (fixes for PAM, gpgme, gnutls, etc.) 
files/patch-src__env.c      (PAM fix, misc_conv -> openpam_ttyconv)
files/patch-src__gpg.c      (fixes gpgme location)
files/patch-src__headers.h  (PAM fix, misc_conv -> openpam_ttyconv)
	
>Fix:

	

--- 2011-02-09-anubis.diff begins here ---
diff -ruN anubis.orig/Makefile anubis/Makefile
--- anubis.orig/Makefile	2010-06-07 03:44:19.000000000 -0400
+++ anubis/Makefile	2011-02-09 23:11:27.000000000 -0500
@@ -1,131 +1,149 @@
-# ex:ts=8
 # Ports collection makefile for:	anubis
 # Date created:			Jul 31, 2002
 # Whom:				ijliao
 #
 # $FreeBSD: ports/mail/anubis/Makefile,v 1.36 2010/05/31 01:59:35 ade Exp $
 #
-###########################################################################
-#
-# 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 at FreeBSD.org
-COMMENT=		Outgoing SMTP mail processor
+MAINTAINER=	bsdkaffee at 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
+
+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>
 
-GNU_CONFIGURE=		yes
-CONFIGURE_ENV=		MAKEINFO="makeinfo --no-split" LDFLAGS="${LDFLAGS}" \
-			CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}"
-LDFLAGS+=		-L${LOCALBASE}/lib
+# 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_TCP_WRAPPERS)
-	@${ECHO_MSG} "Enabling TCP wrappers support"
+
+.if defined(WITH_TCPWRAP) && exists(/usr/include/tcpd.h)
+CONFIGURE_ARGS+=--with-tcp-wrappers
+.endif
+
+.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 -ruN anubis.orig/distinfo anubis/distinfo
--- anubis.orig/distinfo	2005-11-25 09:05:28.000000000 -0500
+++ anubis/distinfo	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/anubis.in anubis/files/anubis.in
--- anubis.orig/files/anubis.in	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/anubis.in	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/anubis.sh anubis/files/anubis.sh
--- anubis.orig/files/anubis.sh	2002-07-31 14:52:14.000000000 -0400
+++ anubis/files/anubis.sh	1969-12-31 19:00:00.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-config.h.in anubis/files/patch-config.h.in
--- anubis.orig/files/patch-config.h.in	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/patch-config.h.in	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-configure anubis/files/patch-configure
--- anubis.orig/files/patch-configure	2004-12-21 03:59:40.000000000 -0500
+++ anubis/files/patch-configure	1969-12-31 19:00:00.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-configure.ac anubis/files/patch-configure.ac
--- anubis.orig/files/patch-configure.ac	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/patch-configure.ac	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-src__env.c anubis/files/patch-src__env.c
--- anubis.orig/files/patch-src__env.c	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/patch-src__env.c	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-src__gpg.c anubis/files/patch-src__gpg.c
--- anubis.orig/files/patch-src__gpg.c	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/patch-src__gpg.c	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-src__headers.h anubis/files/patch-src__headers.h
--- anubis.orig/files/patch-src__headers.h	1969-12-31 19:00:00.000000000 -0500
+++ anubis/files/patch-src__headers.h	2011-02-09 23:11:27.000000000 -0500
@@ -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 -ruN anubis.orig/files/patch-src_auth.c anubis/files/patch-src_auth.c
--- anubis.orig/files/patch-src_auth.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_auth.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,114 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_auth.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/files/patch-src_errs.c anubis/files/patch-src_errs.c
--- anubis.orig/files/patch-src_errs.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_errs.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_errs.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/files/patch-src_log.c anubis/files/patch-src_log.c
--- anubis.orig/files/patch-src_log.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_log.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_log.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/files/patch-src_net.c anubis/files/patch-src_net.c
--- anubis.orig/files/patch-src_net.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_net.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,22 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_net.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/files/patch-src_ssl.c anubis/files/patch-src_ssl.c
--- anubis.orig/files/patch-src_ssl.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_ssl.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_ssl.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/files/patch-src_tunnel.c anubis/files/patch-src_tunnel.c
--- anubis.orig/files/patch-src_tunnel.c	2004-03-07 15:49:32.000000000 -0500
+++ anubis/files/patch-src_tunnel.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,20 +0,0 @@
-
-$FreeBSD: ports/mail/anubis/files/patch-src_tunnel.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
-
---- 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 -ruN anubis.orig/pkg-plist anubis/pkg-plist
--- anubis.orig/pkg-plist	2004-10-13 08:34:06.000000000 -0400
+++ anubis/pkg-plist	2011-02-09 23:11:27.000000000 -0500
@@ -1,19 +1,24 @@
- at comment $FreeBSD: ports/mail/anubis/pkg-plist,v 1.7 2004/10/13 12:34:06 sergei Exp $
+ at 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
- at 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
+ at dirrm share/anubis
--- 2011-02-09-anubis.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list