Update clamav so that milter support is optional.

However currently milter support is disabled, as it requires strerror_r to
be available, which it isn't on -current.

Note this required the fixing of the milter tests in the configure.in file.
It seemed if you used --disable-milter and the .h file was in the include
path, eg on -current it's in /usr/include/libmilter it was found and used.

We now have a want_milter for the --enable/disable-milter, which will
trigger the tests to setup have_milter.

Once I've sorted out the strerror_r problem in -current I'll enable the
milter support (or if someone tells me it works with pth)

Bump PKGREVISION.
This commit is contained in:
chris 2003-09-28 23:39:24 +00:00
parent fe449dcf64
commit 4682c56056
5 changed files with 44 additions and 12 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.4 2003/09/20 01:27:17 chris Exp $
# $NetBSD: Makefile,v 1.5 2003/09/28 23:39:24 chris Exp $
DISTNAME= clamav-0.60
PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clamav/}
@ -20,13 +21,23 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-uid=${CLAMAV_USER}
CONFIGURE_ARGS+= --with-group=${CLAMAV_GROUP}
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP USE_MILTER
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}::Clamav\\ User
EGDIR= ${PREFIX}/share/examples/clamav
CONF_FILES= ${EGDIR}/clamav.conf ${PKG_SYSCONFDIR}/clamav.conf
PLIST_SRC= ${PKGDIR}/PLIST
.include "../../mk/bsd.prefs.mk"
.if defined(USE_MILTER) && ${USE_MILTER} == "YES"
#.include "../../mail/libmilter/buildlink2.mk"
#CONFIGURE_ARGS+= --enable-milter
#PLIST_SRC+= ${PKGDIR}/PLIST.milter
.else
CONFIGURE_ARGS+= --disable-milter
.endif
pre-configure:
cd ${WRKSRC}; \
@ -36,10 +47,9 @@ pre-configure:
# for freshclam to work it must own the share/clamav dir
post-install:
${CHOWN} -R ${CLAMAV_USER}:${CLAMAV_GROUP} ${PREFIX}/share/examples/clamav
${CHOWN} -R ${CLAMAV_USER}:${CLAMAV_GROUP} ${PREFIX}/share/clamav
.include "../../devel/zlib/buildlink2.mk"
.include "../../mail/libmilter/buildlink2.mk"
.include "../../archivers/bzip2/buildlink2.mk"
.include "../../mk/pthread.buildlink2.mk"
.include "../../mk/autoconf.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.3 2003/09/20 01:27:18 chris Exp $
@comment $NetBSD: PLIST,v 1.4 2003/09/28 23:39:24 chris Exp $
bin/clamdscan
bin/clamscan
bin/freshclam
@ -9,7 +9,6 @@ lib/libclamav.la
lib/libclamav.so
lib/libclamav.so.1
lib/libclamav.so.1.3
man/man1/clamav-milter.1
man/man1/clamdscan.1
man/man1/clamscan.1
man/man1/freshclam.1

2
mail/clamav/PLIST.milter Normal file
View file

@ -0,0 +1,2 @@
@comment $NetBSD: PLIST.milter,v 1.1 2003/09/28 23:39:24 chris Exp $
man/man1/clamav-milter.1

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.3 2003/09/20 01:27:18 chris Exp $
$NetBSD: distinfo,v 1.4 2003/09/28 23:39:24 chris Exp $
SHA1 (clamav-0.60.tar.gz) = d72547dc3027fcdd76ad9a4b6edd3aa655534e1c
Size (clamav-0.60.tar.gz) = 1018727 bytes
SHA1 (patch-aa) = 715de1a92ba5b148cebdd92c812d18cf9367c8bb
SHA1 (patch-aa) = d3694bbe8a53b47a92ca19a0f60cb479d9020980
SHA1 (patch-ab) = 0d1ef00c0c1c64642461e353f7e4ed7f81e3a042

View file

@ -1,8 +1,29 @@
$NetBSD: patch-aa,v 1.3 2003/09/20 01:27:19 chris Exp $
$NetBSD: patch-aa,v 1.4 2003/09/28 23:39:24 chris Exp $
--- configure.in.orig 2003-09-20 00:27:32.000000000 +0100
+++ configure.in 2003-09-20 00:32:19.000000000 +0100
@@ -255,8 +255,12 @@
--- configure.in.orig 2003-06-21 04:05:32.000000000 +0100
+++ configure.in 2003-09-28 23:35:17.000000000 +0100
@@ -74,12 +74,16 @@
AC_CHECK_LIB(bz2, bzReadOpen, AC_DEFINE(NOBZ2PREFIX),)
fi
-have_milter="no"
-AC_CHECK_HEADER(libmilter/mfapi.h,have_milter="yes",)
-
AC_ARG_ENABLE(milter,
[ --enable-milter Build clamav-milter (if milter library found)],
-,have_milter="no")
+want_milter=$enableval, want_milter=no)
+
+have_milter=no
+if test "$want_milter" = "yes"
+then
+ AC_CHECK_HEADER(libmilter/mfapi.h,[have_milter=yes],)
+fi
+
AC_CHECK_HEADER(syslog.h,AC_DEFINE(CLAMD_USE_SYSLOG),)
@@ -255,8 +259,12 @@
AC_DEFINE(C_BSD)
;;
netbsd*)