Hi ports@, the attached patch updates mail/spamprobe to 1.4c and, among a couple of other things, adds support for PBL databases. Since the update might require some user interaction (see the UPDATING entry that is also attached), I'm exposing the patch to the public in advance so users can shout at me before I commit it. ;)
If you use mail/spamprobe and/or notice something looking wrong with this patch, let me know. Stefan
Index: Makefile
===================================================================
RCS file: /storage/cvs/FreeBSD/ports/mail/spamprobe/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile 1 Jan 2007 18:12:15 -0000 1.18
+++ Makefile 5 Jan 2007 18:55:52 -0000
@@ -4,9 +4,15 @@
#
# $FreeBSD: ports/mail/spamprobe/Makefile,v 1.18 2007/01/01 18:12:15 stefan Exp $
#
+# Available options for this port:
+# WITHOUT_PBL - disable support for PBL database storage
+# WITHOUT_BDB - disable support for BDB database storage
+# WITHOUT_UNGIF - disable analysis of image attachments using libungif
+# (currently only possible if PBL support is disabled, too)
+#
PORTNAME= spamprobe
-PORTVERSION= 1.4b
+PORTVERSION= 1.4c
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -14,26 +20,40 @@
MAINTAINER= [EMAIL PROTECTED]
COMMENT= Spam detector using Bayesian analysis of word counts
-USE_BDB= 3+
-INVALID_BDB_VER=2
-
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-CONFIGURE_ARGS= --enable-default-8bit --enable-cdb
-CPPFLAGS= -I${BDB_INCLUDE_DIR}
-LDFLAGS= -L${LOCALBASE}/lib -l${BDB_LIB_NAME}
+CONFIGURE_ARGS= --enable-default-8bit
MAN1= spamprobe.1
PLIST_FILES= bin/spamprobe
-OPTIONS= UNGIF "Enable tokenization of GIF attachments with libungif" off
+# PBL support
+.if !defined(WITHOUT_PBL)
+BUILD_DEPENDS+= ${LOCALBASE}/include/pbl.h:${PORTSDIR}/databases/libpbl
+CONFIGURE_ARGS+= --with-pbl=${LOCALBASE}
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lpbl
+.endif
-.include <bsd.port.pre.mk>
+# BerkleyDB support
+.if !defined(WITHOUT_BDB)
+USE_BDB= 3+
+INVALID_BDB_VER=2
+CONFIGURE_ARGS+= --enable-cdb
+CPPFLAGS+= -I${BDB_INCLUDE_DIR} -DUSE_DB=1
+LDFLAGS+= -L${LOCALBASE}/lib -l${BDB_LIB_NAME}
+.endif
-.if defined(WITH_UNGIF)
+# libungif support
+.if !defined(WITHOUT_UNGIF)
LIB_DEPENDS+= ungif.5:${PORTSDIR}/graphics/libungif
CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+.else
+.if !defined(WITHOUT_PBL)
+BROKEN= WITHOUT_UNGIF currently does not work if WITHOUT_PBL is not given, too
+.endif
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /storage/cvs/FreeBSD/ports/mail/spamprobe/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo 18 Feb 2006 21:16:19 -0000 1.13
+++ distinfo 5 Jan 2007 18:55:52 -0000
@@ -1,3 +1,3 @@
-MD5 (spamprobe-1.4b.tar.gz) = 735a5ef084ca09a39fb88a0334fcc68e
-SHA256 (spamprobe-1.4b.tar.gz) = fe6e5e69c4902850acabbb5ff81fc48c31b8450834d378875be522d51d91e21e
-SIZE (spamprobe-1.4b.tar.gz) = 255023
+MD5 (spamprobe-1.4c.tar.gz) = 665b1c6ca1a9a1100b40a3f2aa34c9b6
+SHA256 (spamprobe-1.4c.tar.gz) = 36ba0ecff13c23553ad5b78380ca456c5dd29a34fb23ee8046a36203855c3baf
+SIZE (spamprobe-1.4c.tar.gz) = 250313
Index: UPDATING =================================================================== RCS file: /storage/cvs/FreeBSD/ports/UPDATING,v retrieving revision 1.444 diff -u -r1.444 UPDATING --- UPDATING 5 Jan 2007 08:22:18 -0000 1.444 +++ UPDATING 5 Jan 2007 18:56:31 -0000 @@ -6,6 +6,38 @@ time you update your ports collection, before attempting any port upgrades. +20070105: + AFFECTS: users of mail/spamprobe + AUTHOR: [EMAIL PROTECTED] + + With the update to version 1.4c, the SpamProbe port doesn't use the OPTIONS + framework any more to allow part of the changes below. That means that + options selected for this port won't be saved/used automatically any more + and you have to set the appropriate variables in /etc/make.conf or on the + command line again to change the port's behaviour; the variables are + documented at the top of the port's Makefile. + + The port now has support for the PBL database backend; unless built with + WITHOUT_PBL set, SpamProbe will use PBL as the default even if you have an + existing BerkleyDB or hash database; in that case, use the parameter "-d" to + specify the type of the existing database on the command line, e.g. + + spamprobe -d bdb:$HOME/.spamprobe receive + + or + + spamprobe -d hash:$HOME/.spamprobe receive + + Using PBL instead of BerkleyDB might be a good idea, though, as the former + seems to perform better. You can convert your existing database to PBL using + the following commands (assuming you didn't disable PBL support): + + cd ~ + mkdir spamprobe.new + spamprobe -d bdb:.spamprobe export | spamprobe -d spamprobe.new import + mv .spamprobe spamprobe.old + mv spamprobe.new .spamprobe + 20070104: AFFECTS: users of www/phpsurveyor AUTHOR: [EMAIL PROTECTED]
pgpQHpPRqUEBR.pgp
Description: PGP signature
