From 54014030e25173e14c1f52035309dc5a5c328aca Mon Sep 17 00:00:00 2001
From: Renato Botelho <garga@FreeBSD.org>
Date: Wed, 5 Apr 2006 19:05:49 +0000
Subject: [PATCH] - Update to 2.4.0 - Substitute deprecated USE_RCORDER with
 USE_RC_SUBR - Add some dependency that are necessary according to the
 documentation

PR:		ports/95349
Submitted by:	maintainer
---
 security/amavisd-new/Makefile                | 18 ++++--------------
 security/amavisd-new/distinfo                |  5 ++---
 security/amavisd-new/files/patch-config.h.in | 14 +++++---------
 security/amavisd-new/pkg-plist               |  3 +++
 4 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile
index 115bff8268e6..cc9117099a19 100644
--- a/security/amavisd-new/Makefile
+++ b/security/amavisd-new/Makefile
@@ -7,8 +7,7 @@
 # Based on amavisd ports makefile.
 
 PORTNAME=	amavisd-new
-PORTVERSION=	2.3.3
-PORTREVISION=	1
+PORTVERSION=	2.4.0
 PORTEPOCH=	1
 CATEGORIES=	security
 MASTER_SITES=	http://www.ijs.si/software/amavisd/ \
@@ -21,11 +20,14 @@ COMMENT=	Performance-enhanced daemonized version of amavis-perl
 
 RUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \
 		${SITE_PERL}/MIME/Words.pm:${PORTSDIR}/mail/p5-MIME-Tools \
+		${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \
 		${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \
 		${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \
 		${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
 		${SITE_PERL}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar \
 		${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
+		${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
+		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
 		${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \
 		${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
 		${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB \
@@ -63,26 +65,14 @@ SUB_LIST=	AMAVISUSER=${AMAVISUSER} \
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 500037
-USE_RCORDER=	amavisd.sh
-RC_DIR=		/etc/rc.d
-RC_SUFX=
-.else
 USE_RC_SUBR+=	amavisd.sh
-RC_DIR=		${PREFIX}/etc/rc.d
-RC_SUFX=	.sh
-.endif
 
 .if !defined(WITH_MILTER) || (!exists(/usr/lib/libmilter.a) && !exists(${PREFIX}/lib/libmilter.a))
 AMAVIS_NOAMAVIS="@comment "
 .endif
 
 .if defined(WITH_MILTER) && !defined(AMAVIS_NOAMAVIS)
-.if ${OSVERSION} >= 500037
-USE_RCORDER+=	amavis-milter.sh
-.else
 USE_RC_SUBR+=	amavis-milter.sh
-.endif
 .else
 AMAVIS_NOMILTER="@comment "
 .endif
diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo
index b5f838a5a2c8..4d82863d32a9 100644
--- a/security/amavisd-new/distinfo
+++ b/security/amavisd-new/distinfo
@@ -1,3 +1,2 @@
-MD5 (amavisd-new-2.3.3.tar.gz) = 0b02df514c1a2bf8af346bc9c7e97111
-SHA256 (amavisd-new-2.3.3.tar.gz) = 8c6d78cc0a703f0aa36d52fdf833e074c6adca2d21bd334ef381f9e9c92b8f0b
-SIZE (amavisd-new-2.3.3.tar.gz) = 772280
+MD5 (amavisd-new-2.4.0.tar.gz) = d1a3ea3244a142d8dec6dcb3e3673044
+SIZE (amavisd-new-2.4.0.tar.gz) = 825490
diff --git a/security/amavisd-new/files/patch-config.h.in b/security/amavisd-new/files/patch-config.h.in
index 2f6641d9a4b5..63559836a5d2 100644
--- a/security/amavisd-new/files/patch-config.h.in
+++ b/security/amavisd-new/files/patch-config.h.in
@@ -1,15 +1,11 @@
---- helper-progs/config.h.in.orig	Fri Mar  7 22:56:50 2003
-+++ helper-progs/config.h.in	Tue Nov 11 22:54:33 2003
-@@ -14,10 +14,10 @@
- #define X_HEADER_LINE "by-amavisd-new-via-milter"
- 
- /* Define if you have the mkdtemp function, undefine otherwise */
--#undef HAVE_MKDTEMP
-+#define HAVE_MKDTEMP
+--- helper-progs/config.h.in.orig	Mon Mar  6 00:26:08 2006
++++ helper-progs/config.h.in		Tue Apr  4 08:21:29 2006
+@@ -17,7 +17,7 @@
+ #define HAVE_MKDTEMP
  
  /* Define if you have the mktemp function, undefine otherwise */
 -#define HAVE_MKTEMP
 +#undef HAVE_MKTEMP
  
  /* Define if we have the snprintf function, undefine otherwise */
- #undef HAVE_SNPRINTF
+ #define HAVE_SNPRINTF
diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist
index 0591ce43efd6..15de92ba55a8 100644
--- a/security/amavisd-new/pkg-plist
+++ b/security/amavisd-new/pkg-plist
@@ -15,6 +15,7 @@
 %%PORTDOCS%%%%DOCSDIR%%/README.exim_v4
 %%PORTDOCS%%%%DOCSDIR%%/README.exim_v4_app
 %%PORTDOCS%%%%DOCSDIR%%/README.exim_v4_app2
+%%PORTDOCS%%%%DOCSDIR%%/README.ldap
 %%PORTDOCS%%%%DOCSDIR%%/README.lookups
 %%PORTDOCS%%%%DOCSDIR%%/README.milter
 %%PORTDOCS%%%%DOCSDIR%%/README.old.scanners
@@ -24,9 +25,11 @@
 %%PORTDOCS%%%%DOCSDIR%%/README.protocol
 %%PORTDOCS%%%%DOCSDIR%%/README.sendmail
 %%PORTDOCS%%%%DOCSDIR%%/README.sendmail-dual
+%%PORTDOCS%%%%DOCSDIR%%/README.sendmail-dual.old
 %%PORTDOCS%%%%DOCSDIR%%/README.sql
 %%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
 %%PORTDOCS%%%%DOCSDIR%%/amavisd-new-docs.html
+%%PORTDOCS%%%%DOCSDIR%%/TODO-SNMP-AGENT
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 etc/amavisd.conf-default
 @unexec if cmp -s %D/etc/amavisd.conf %D/etc/amavisd.conf-dist; then rm -f %D/etc/amavisd.conf; fi