Upgrade to 0.9.1.2.

PR:		ports/46102
Submitted by:	maintainer
This commit is contained in:
Oliver Braun 2003-01-01 17:29:57 +00:00
parent 2fb05e9ec3
commit 8147072d6e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72058
22 changed files with 74 additions and 664 deletions

View File

@ -6,8 +6,8 @@
#
PORTNAME= bogofilter
PORTVERSION= 0.8.0
PORTREVISION= 2
PORTVERSION= 0.9.1.2
PORTREVISION= 0
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -22,18 +22,27 @@ GNU_CONFIGURE= yes
PATCH_STRIP= -p1
CONFIGURE_ENV= CPPFLAGS="-I${PREFIX}/include/db4" \
LDFLAGS="-L${PREFIX}/lib"
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc
MAN1= bogofilter.1 bogoutil.1 bogoupgrade.1 bogolexer.1
post-build:
cd ${WRKSRC} && make check SHELL=${SH}
do-install:
cd ${WRKSRC} && make install prefix=${PREFIX}
.if !defined(NOPORTDOCS)
post-install:
@${MKDIR} ${DOCSDIR}
.for i in AUTHORS COPYING INSTALL NEWS README TODO UPGRADE \
doc/integrating-with-qmail contrib/README.unbase64 \
README.freebsd README.hp-ux README.solaris
contrib/dot-qmail-bogofilter-default \
README.freebsd README.hp-ux README.dcdflib \
README.Robinson bogofilter-SA-2002-01 METHODS
${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.for i in bogo.R contrib/bogofilter-qfe contrib/unbase64
.for i in bogo.R contrib/bogofilter-qfe contrib/unbase64 \
contrib/bogopass
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

View File

@ -1 +1 @@
MD5 (bogofilter-0.8.0.tar.gz) = 447d6045f0268c0f6f36c59176c08137
MD5 (bogofilter-0.9.1.2.tar.gz) = af65cc2a1dae5597762bc2144344075a

View File

@ -1,84 +0,0 @@
--- bogofilter-0.8.0/Makefile.in Sat Nov 9 19:21:40 2002
+++ bogofilter-0.8.0.1/Makefile.in Mon Nov 11 02:07:42 2002
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.7 from Makefile.am.
+# Makefile.in generated by automake 1.7.1 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
@@ -119,7 +119,9 @@
man1_MANS = bogofilter.1 bogoutil.1 bogoupgrade.1 bogolexer.1
# what to build that from
-MYCOMMON = xmalloc.h xmalloc.c xstrdup.h xstrdup.c globals.h debug.h debug.c
+MYCOMMON = xmalloc.h xmalloc.c xstrdup.h xstrdup.c globals.h debug.h \
+debug.c find_home.c find_home.h
+
BUILT_SOURCES = version.h
@@ -164,7 +166,8 @@
check_PROGRAMS = debugtest$(EXEEXT) configtest$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
-am__objects_1 = xmalloc.$(OBJEXT) xstrdup.$(OBJEXT) debug.$(OBJEXT)
+am__objects_1 = xmalloc.$(OBJEXT) xstrdup.$(OBJEXT) debug.$(OBJEXT) \
+ find_home.$(OBJEXT)
am_bogofilter_OBJECTS = bogofilter.$(OBJEXT) main.$(OBJEXT) \
lexer.$(OBJEXT) datastore_db.$(OBJEXT) config.$(OBJEXT) \
rstats.$(OBJEXT) wordhash.$(OBJEXT) wordlists.$(OBJEXT) \
@@ -206,10 +209,11 @@
@AMDEP_TRUE@ ./$(DEPDIR)/bogolexer.Po ./$(DEPDIR)/bogoutil.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/config.Po ./$(DEPDIR)/configtest.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/datastore_db.Po ./$(DEPDIR)/debug.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/debug.main.Po ./$(DEPDIR)/lexer.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/rstats.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/wordhash.Po ./$(DEPDIR)/wordlists.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xstrdup.Po
+@AMDEP_TRUE@ ./$(DEPDIR)/debug.main.Po ./$(DEPDIR)/find_home.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/lexer.Po ./$(DEPDIR)/main.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/rstats.Po ./$(DEPDIR)/wordhash.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/wordlists.Po ./$(DEPDIR)/xmalloc.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/xstrdup.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -351,6 +355,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datastore_db.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_home.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rstats.Po@am__quote@
@@ -567,9 +572,11 @@
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/contrib $(distdir)/doc
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
@@ -628,7 +635,6 @@
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && $(mkinstalldirs) $$dc_destdir \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
@@ -641,7 +647,9 @@
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
- && ({ $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \

View File

@ -1,19 +0,0 @@
--- bogofilter-0.8.0/config.c Thu Oct 31 06:23:32 2002
+++ bogofilter-0.8.0.1/config.c Mon Nov 11 02:06:36 2002
@@ -21,6 +21,7 @@
#include "wordlists.h"
#include "xmalloc.h"
#include "xstrdup.h"
+#include "find_home.h"
#ifndef DEBUG_CONFIG
#define DEBUG_CONFIG(level) (verbose > level)
@@ -150,7 +151,7 @@
if ( *filename == '~' )
{
- char *home = getenv( "HOME" );
+ char *home = find_home(TRUE);
if ( home == NULL )
{
fprintf( stderr, "Can't find $HOME.\n" );

View File

@ -1,20 +0,0 @@
--- bogofilter-0.8.0/configure Sat Nov 9 19:21:44 2002
+++ bogofilter-0.8.0.1/configure Mon Nov 11 02:07:43 2002
@@ -1500,7 +1500,7 @@
# Define the identity of the package.
PACKAGE=bogofilter
- VERSION=0.8.0
+ VERSION=0.8.0.1
cat >>confdefs.h <<_ACEOF
@@ -2563,7 +2563,7 @@
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CC_dependencies_compiler_type=$depmode

View File

@ -1,59 +0,0 @@
--- bogofilter-0.8.0/find_home.c Thu Jan 1 01:00:00 1970
+++ bogofilter-0.8.0.1/find_home.c Mon Nov 11 02:05:44 2002
@@ -0,0 +1,56 @@
+/* find_home.c -- library function to figure out the home dir of current user */
+
+/* (C) 2002 by Matthias Andree <matthias.andree@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details, it is in the file named
+ * COPYING.
+ */
+
+/* $Id: find_home.c,v 1.5 2002/11/11 00:03:25 m-a Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+#include "find_home.h"
+#include "xmalloc.h"
+#include "xstrdup.h"
+
+/* This function will try to figure out the home directory of the user.
+ *
+ * If read_env is not zero, it will try to obtain the HOME environment
+ * variable and return if it is defined and not empty.
+ *
+ * Then, it will look up the password entry of the current effective
+ * user id and return the pw_dir field.
+ *
+ * This function returns NULL in case of failure.
+ */
+const char *find_home(int read_env) {
+ char *r;
+ uid_t u;
+ struct passwd *pw;
+
+ if (read_env) {
+ if ((r = getenv("HOME")) != NULL && *r != '\0')
+ return r;
+ }
+
+ u = geteuid();
+ pw = getpwuid(u);
+ if (pw != NULL) {
+ return pw -> pw_dir;
+ }
+ return NULL;
+}

View File

@ -1,36 +0,0 @@
--- bogofilter-0.8.0/find_home.h Thu Jan 1 01:00:00 1970
+++ bogofilter-0.8.0.1/find_home.h Mon Nov 11 02:05:44 2002
@@ -0,0 +1,33 @@
+/* $Id: find_home.h,v 1.7 2002/11/11 00:03:25 m-a Exp $ */
+
+/* find_home.h -- library function to figure out the home dir of current user */
+
+#ifndef FIND_HOME_H
+#define FIND_HOME_H
+
+/* (C) 2002 by Matthias Andree <matthias.andree@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details, it is in the file named
+ * COPYING.
+ */
+
+/*@null@*/ /*@observer@*/
+const char *
+find_home(int read_env) /*@globals errno@*/;
+
+/*@null@*/ /*@observer@*/
+const char *
+find_home_user(const char *username) /*@globals errno@*/;
+
+/*@only@*/
+char *
+tildeexpand(const char *filename) /*@globals errno@*/;
+
+#endif

View File

@ -1,29 +0,0 @@
--- bogofilter-0.8.0/main.c Wed Nov 6 01:07:59 2002
+++ bogofilter-0.8.0.1/main.c Mon Nov 11 02:28:08 2002
@@ -26,6 +26,9 @@
#include "version.h"
#include "common.h"
#include "bogofilter.h"
+#include "find_home.h"
+#include "xmalloc.h"
+#include "xstrdup.h"
#define BOGODIR ".bogofilter"
@@ -254,6 +257,16 @@
{
int exitcode;
+ if (NULL == getenv("HOME")) {
+ const char *t;
+ if ((t = find_home(FALSE)) != NULL) {
+ char *t2 = xmalloc(strlen(t) + 6);
+ strcpy(t2, "HOME=");
+ strcat(t2, t);
+ putenv(xstrdup(t2)); /* putenv may leak memory by copying again */
+ free(t2);
+ }
+ }
set_dir_from_env(directory, "HOME", BOGODIR);
set_dir_from_env(directory, "BOGOFILTER_DIR", NULL);

View File

@ -1,6 +0,0 @@
--- bogofilter-0.8.0/version.h Sat Nov 9 19:22:01 2002
+++ bogofilter-0.8.0.1/version.h Mon Nov 11 02:28:09 2002
@@ -1,2 +1,2 @@
#undef VERSION
-#define VERSION "0.8.0"
+#define VERSION "0.8.0.1"

View File

@ -1,57 +0,0 @@
--- bogofilter.c Thu Nov 7 07:05:58 2002
+++ bogofilter.c Fri Nov 22 12:51:33 2002
@@ -255,10 +255,14 @@
int compare_extrema(const void *id1, const void *id2)
{
+ double d;
const discrim_t *d1 = id1;
const discrim_t *d2 = id2;
- return ( (d1->prob > d2->prob) ||
- ((d1->prob == d2->prob) && (strcmp(d1->key, d2->key) > 0)));
+ d = d2->prob - d1->prob;
+ if (fabs(d) < EPS) return strcmp(d1->key, d2->key);
+ if (d1->prob > d2->prob) return 1;
+ if (d1->prob < d2->prob) return -1;
+ return 0;
}
void init_bogostats(bogostat_t *bogostats)
--- common.h Mon Oct 28 03:46:17 2002
+++ common.h Fri Nov 22 12:53:23 2002
@@ -9,6 +9,10 @@
#include <sys/param.h>
#endif
+#include <float.h>
+#define EPS (100.0 * DBL_EPSILON)
+
+
#include "debug.h"
#define GOODFILE "goodlist.db"
--- rstats.c Wed Nov 6 11:45:03 2002
+++ rstats.c Fri Nov 22 12:52:12 2002
@@ -84,10 +84,14 @@
int compare_rstats_t(const void *ir1, const void *ir2)
{
+ double d;
const rstats_t *r1 = *(rstats_t **)ir1;
const rstats_t *r2 = *(rstats_t **)ir2;
- return ( (r1->prob > r2->prob) ||
- ((r1->prob == r2->prob) && (strcmp(r1->token, r2->token) > 0)));
+ d = r1->prob - r2->prob;
+ if (fabs(d) < EPS) return strcmp(r1->token, r2->token);
+ if (r1->prob > r2->prob) return 1;
+ if (r1->prob < r2->prob) return -1;
+ return 0;
}
#define INTERVALS 10
--- version.h Fri Nov 22 12:55:52 2002
+++ version.h Fri Nov 22 12:55:13 2002
@@ -1,2 +1,2 @@
#undef VERSION
-#define VERSION "0.8.0.1"
+#define VERSION "0.8.0.freebsd2"

View File

@ -2,19 +2,25 @@ bin/bogofilter
bin/bogolexer
bin/bogoutil
bin/bogoupgrade
%%PORTDOCS%%share/doc/bogofilter/AUTHORS
%%PORTDOCS%%share/doc/bogofilter/COPYING
%%PORTDOCS%%share/doc/bogofilter/INSTALL
%%PORTDOCS%%share/doc/bogofilter/NEWS
%%PORTDOCS%%share/doc/bogofilter/README
%%PORTDOCS%%share/doc/bogofilter/README.freebsd
%%PORTDOCS%%share/doc/bogofilter/README.hp-ux
%%PORTDOCS%%share/doc/bogofilter/README.solaris
%%PORTDOCS%%share/doc/bogofilter/README.unbase64
%%PORTDOCS%%share/doc/bogofilter/TODO
%%PORTDOCS%%share/doc/bogofilter/UPGRADE
%%PORTDOCS%%share/doc/bogofilter/bogo.R
%%PORTDOCS%%share/doc/bogofilter/bogofilter-qfe
%%PORTDOCS%%share/doc/bogofilter/integrating-with-qmail
%%PORTDOCS%%share/doc/bogofilter/unbase64
%%PORTDOCS%%@dirrm share/doc/bogofilter
etc/bogofilter.cf.example
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/METHODS
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.Robinson
%%PORTDOCS%%%%DOCSDIR%%/README.dcdflib
%%PORTDOCS%%%%DOCSDIR%%/README.freebsd
%%PORTDOCS%%%%DOCSDIR%%/README.hp-ux
%%PORTDOCS%%%%DOCSDIR%%/README.unbase64
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/UPGRADE
%%PORTDOCS%%%%DOCSDIR%%/bogo.R
%%PORTDOCS%%%%DOCSDIR%%/bogofilter-SA-2002-01
%%PORTDOCS%%%%DOCSDIR%%/bogofilter-qfe
%%PORTDOCS%%%%DOCSDIR%%/bogopass
%%PORTDOCS%%%%DOCSDIR%%/dot-qmail-bogofilter-default
%%PORTDOCS%%%%DOCSDIR%%/integrating-with-qmail
%%PORTDOCS%%%%DOCSDIR%%/unbase64
%%PORTDOCS%%@dirrm %%DOCSDIR%%

View File

@ -6,8 +6,8 @@
#
PORTNAME= bogofilter
PORTVERSION= 0.8.0
PORTREVISION= 2
PORTVERSION= 0.9.1.2
PORTREVISION= 0
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -22,18 +22,27 @@ GNU_CONFIGURE= yes
PATCH_STRIP= -p1
CONFIGURE_ENV= CPPFLAGS="-I${PREFIX}/include/db4" \
LDFLAGS="-L${PREFIX}/lib"
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc
MAN1= bogofilter.1 bogoutil.1 bogoupgrade.1 bogolexer.1
post-build:
cd ${WRKSRC} && make check SHELL=${SH}
do-install:
cd ${WRKSRC} && make install prefix=${PREFIX}
.if !defined(NOPORTDOCS)
post-install:
@${MKDIR} ${DOCSDIR}
.for i in AUTHORS COPYING INSTALL NEWS README TODO UPGRADE \
doc/integrating-with-qmail contrib/README.unbase64 \
README.freebsd README.hp-ux README.solaris
contrib/dot-qmail-bogofilter-default \
README.freebsd README.hp-ux README.dcdflib \
README.Robinson bogofilter-SA-2002-01 METHODS
${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.for i in bogo.R contrib/bogofilter-qfe contrib/unbase64
.for i in bogo.R contrib/bogofilter-qfe contrib/unbase64 \
contrib/bogopass
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif

View File

@ -1 +1 @@
MD5 (bogofilter-0.8.0.tar.gz) = 447d6045f0268c0f6f36c59176c08137
MD5 (bogofilter-0.9.1.2.tar.gz) = af65cc2a1dae5597762bc2144344075a

View File

@ -1,84 +0,0 @@
--- bogofilter-0.8.0/Makefile.in Sat Nov 9 19:21:40 2002
+++ bogofilter-0.8.0.1/Makefile.in Mon Nov 11 02:07:42 2002
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.7 from Makefile.am.
+# Makefile.in generated by automake 1.7.1 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
@@ -119,7 +119,9 @@
man1_MANS = bogofilter.1 bogoutil.1 bogoupgrade.1 bogolexer.1
# what to build that from
-MYCOMMON = xmalloc.h xmalloc.c xstrdup.h xstrdup.c globals.h debug.h debug.c
+MYCOMMON = xmalloc.h xmalloc.c xstrdup.h xstrdup.c globals.h debug.h \
+debug.c find_home.c find_home.h
+
BUILT_SOURCES = version.h
@@ -164,7 +166,8 @@
check_PROGRAMS = debugtest$(EXEEXT) configtest$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
-am__objects_1 = xmalloc.$(OBJEXT) xstrdup.$(OBJEXT) debug.$(OBJEXT)
+am__objects_1 = xmalloc.$(OBJEXT) xstrdup.$(OBJEXT) debug.$(OBJEXT) \
+ find_home.$(OBJEXT)
am_bogofilter_OBJECTS = bogofilter.$(OBJEXT) main.$(OBJEXT) \
lexer.$(OBJEXT) datastore_db.$(OBJEXT) config.$(OBJEXT) \
rstats.$(OBJEXT) wordhash.$(OBJEXT) wordlists.$(OBJEXT) \
@@ -206,10 +209,11 @@
@AMDEP_TRUE@ ./$(DEPDIR)/bogolexer.Po ./$(DEPDIR)/bogoutil.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/config.Po ./$(DEPDIR)/configtest.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/datastore_db.Po ./$(DEPDIR)/debug.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/debug.main.Po ./$(DEPDIR)/lexer.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/rstats.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/wordhash.Po ./$(DEPDIR)/wordlists.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xstrdup.Po
+@AMDEP_TRUE@ ./$(DEPDIR)/debug.main.Po ./$(DEPDIR)/find_home.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/lexer.Po ./$(DEPDIR)/main.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/rstats.Po ./$(DEPDIR)/wordhash.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/wordlists.Po ./$(DEPDIR)/xmalloc.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/xstrdup.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -351,6 +355,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datastore_db.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_home.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rstats.Po@am__quote@
@@ -567,9 +572,11 @@
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/contrib $(distdir)/doc
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
@@ -628,7 +635,6 @@
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && $(mkinstalldirs) $$dc_destdir \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
@@ -641,7 +647,9 @@
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
- && ({ $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \

View File

@ -1,19 +0,0 @@
--- bogofilter-0.8.0/config.c Thu Oct 31 06:23:32 2002
+++ bogofilter-0.8.0.1/config.c Mon Nov 11 02:06:36 2002
@@ -21,6 +21,7 @@
#include "wordlists.h"
#include "xmalloc.h"
#include "xstrdup.h"
+#include "find_home.h"
#ifndef DEBUG_CONFIG
#define DEBUG_CONFIG(level) (verbose > level)
@@ -150,7 +151,7 @@
if ( *filename == '~' )
{
- char *home = getenv( "HOME" );
+ char *home = find_home(TRUE);
if ( home == NULL )
{
fprintf( stderr, "Can't find $HOME.\n" );

View File

@ -1,20 +0,0 @@
--- bogofilter-0.8.0/configure Sat Nov 9 19:21:44 2002
+++ bogofilter-0.8.0.1/configure Mon Nov 11 02:07:43 2002
@@ -1500,7 +1500,7 @@
# Define the identity of the package.
PACKAGE=bogofilter
- VERSION=0.8.0
+ VERSION=0.8.0.1
cat >>confdefs.h <<_ACEOF
@@ -2563,7 +2563,7 @@
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CC_dependencies_compiler_type=$depmode

View File

@ -1,59 +0,0 @@
--- bogofilter-0.8.0/find_home.c Thu Jan 1 01:00:00 1970
+++ bogofilter-0.8.0.1/find_home.c Mon Nov 11 02:05:44 2002
@@ -0,0 +1,56 @@
+/* find_home.c -- library function to figure out the home dir of current user */
+
+/* (C) 2002 by Matthias Andree <matthias.andree@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details, it is in the file named
+ * COPYING.
+ */
+
+/* $Id: find_home.c,v 1.5 2002/11/11 00:03:25 m-a Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+#include "find_home.h"
+#include "xmalloc.h"
+#include "xstrdup.h"
+
+/* This function will try to figure out the home directory of the user.
+ *
+ * If read_env is not zero, it will try to obtain the HOME environment
+ * variable and return if it is defined and not empty.
+ *
+ * Then, it will look up the password entry of the current effective
+ * user id and return the pw_dir field.
+ *
+ * This function returns NULL in case of failure.
+ */
+const char *find_home(int read_env) {
+ char *r;
+ uid_t u;
+ struct passwd *pw;
+
+ if (read_env) {
+ if ((r = getenv("HOME")) != NULL && *r != '\0')
+ return r;
+ }
+
+ u = geteuid();
+ pw = getpwuid(u);
+ if (pw != NULL) {
+ return pw -> pw_dir;
+ }
+ return NULL;
+}

View File

@ -1,36 +0,0 @@
--- bogofilter-0.8.0/find_home.h Thu Jan 1 01:00:00 1970
+++ bogofilter-0.8.0.1/find_home.h Mon Nov 11 02:05:44 2002
@@ -0,0 +1,33 @@
+/* $Id: find_home.h,v 1.7 2002/11/11 00:03:25 m-a Exp $ */
+
+/* find_home.h -- library function to figure out the home dir of current user */
+
+#ifndef FIND_HOME_H
+#define FIND_HOME_H
+
+/* (C) 2002 by Matthias Andree <matthias.andree@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details, it is in the file named
+ * COPYING.
+ */
+
+/*@null@*/ /*@observer@*/
+const char *
+find_home(int read_env) /*@globals errno@*/;
+
+/*@null@*/ /*@observer@*/
+const char *
+find_home_user(const char *username) /*@globals errno@*/;
+
+/*@only@*/
+char *
+tildeexpand(const char *filename) /*@globals errno@*/;
+
+#endif

View File

@ -1,29 +0,0 @@
--- bogofilter-0.8.0/main.c Wed Nov 6 01:07:59 2002
+++ bogofilter-0.8.0.1/main.c Mon Nov 11 02:28:08 2002
@@ -26,6 +26,9 @@
#include "version.h"
#include "common.h"
#include "bogofilter.h"
+#include "find_home.h"
+#include "xmalloc.h"
+#include "xstrdup.h"
#define BOGODIR ".bogofilter"
@@ -254,6 +257,16 @@
{
int exitcode;
+ if (NULL == getenv("HOME")) {
+ const char *t;
+ if ((t = find_home(FALSE)) != NULL) {
+ char *t2 = xmalloc(strlen(t) + 6);
+ strcpy(t2, "HOME=");
+ strcat(t2, t);
+ putenv(xstrdup(t2)); /* putenv may leak memory by copying again */
+ free(t2);
+ }
+ }
set_dir_from_env(directory, "HOME", BOGODIR);
set_dir_from_env(directory, "BOGOFILTER_DIR", NULL);

View File

@ -1,6 +0,0 @@
--- bogofilter-0.8.0/version.h Sat Nov 9 19:22:01 2002
+++ bogofilter-0.8.0.1/version.h Mon Nov 11 02:28:09 2002
@@ -1,2 +1,2 @@
#undef VERSION
-#define VERSION "0.8.0"
+#define VERSION "0.8.0.1"

View File

@ -1,57 +0,0 @@
--- bogofilter.c Thu Nov 7 07:05:58 2002
+++ bogofilter.c Fri Nov 22 12:51:33 2002
@@ -255,10 +255,14 @@
int compare_extrema(const void *id1, const void *id2)
{
+ double d;
const discrim_t *d1 = id1;
const discrim_t *d2 = id2;
- return ( (d1->prob > d2->prob) ||
- ((d1->prob == d2->prob) && (strcmp(d1->key, d2->key) > 0)));
+ d = d2->prob - d1->prob;
+ if (fabs(d) < EPS) return strcmp(d1->key, d2->key);
+ if (d1->prob > d2->prob) return 1;
+ if (d1->prob < d2->prob) return -1;
+ return 0;
}
void init_bogostats(bogostat_t *bogostats)
--- common.h Mon Oct 28 03:46:17 2002
+++ common.h Fri Nov 22 12:53:23 2002
@@ -9,6 +9,10 @@
#include <sys/param.h>
#endif
+#include <float.h>
+#define EPS (100.0 * DBL_EPSILON)
+
+
#include "debug.h"
#define GOODFILE "goodlist.db"
--- rstats.c Wed Nov 6 11:45:03 2002
+++ rstats.c Fri Nov 22 12:52:12 2002
@@ -84,10 +84,14 @@
int compare_rstats_t(const void *ir1, const void *ir2)
{
+ double d;
const rstats_t *r1 = *(rstats_t **)ir1;
const rstats_t *r2 = *(rstats_t **)ir2;
- return ( (r1->prob > r2->prob) ||
- ((r1->prob == r2->prob) && (strcmp(r1->token, r2->token) > 0)));
+ d = r1->prob - r2->prob;
+ if (fabs(d) < EPS) return strcmp(r1->token, r2->token);
+ if (r1->prob > r2->prob) return 1;
+ if (r1->prob < r2->prob) return -1;
+ return 0;
}
#define INTERVALS 10
--- version.h Fri Nov 22 12:55:52 2002
+++ version.h Fri Nov 22 12:55:13 2002
@@ -1,2 +1,2 @@
#undef VERSION
-#define VERSION "0.8.0.1"
+#define VERSION "0.8.0.freebsd2"

View File

@ -2,19 +2,25 @@ bin/bogofilter
bin/bogolexer
bin/bogoutil
bin/bogoupgrade
%%PORTDOCS%%share/doc/bogofilter/AUTHORS
%%PORTDOCS%%share/doc/bogofilter/COPYING
%%PORTDOCS%%share/doc/bogofilter/INSTALL
%%PORTDOCS%%share/doc/bogofilter/NEWS
%%PORTDOCS%%share/doc/bogofilter/README
%%PORTDOCS%%share/doc/bogofilter/README.freebsd
%%PORTDOCS%%share/doc/bogofilter/README.hp-ux
%%PORTDOCS%%share/doc/bogofilter/README.solaris
%%PORTDOCS%%share/doc/bogofilter/README.unbase64
%%PORTDOCS%%share/doc/bogofilter/TODO
%%PORTDOCS%%share/doc/bogofilter/UPGRADE
%%PORTDOCS%%share/doc/bogofilter/bogo.R
%%PORTDOCS%%share/doc/bogofilter/bogofilter-qfe
%%PORTDOCS%%share/doc/bogofilter/integrating-with-qmail
%%PORTDOCS%%share/doc/bogofilter/unbase64
%%PORTDOCS%%@dirrm share/doc/bogofilter
etc/bogofilter.cf.example
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/METHODS
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.Robinson
%%PORTDOCS%%%%DOCSDIR%%/README.dcdflib
%%PORTDOCS%%%%DOCSDIR%%/README.freebsd
%%PORTDOCS%%%%DOCSDIR%%/README.hp-ux
%%PORTDOCS%%%%DOCSDIR%%/README.unbase64
%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/UPGRADE
%%PORTDOCS%%%%DOCSDIR%%/bogo.R
%%PORTDOCS%%%%DOCSDIR%%/bogofilter-SA-2002-01
%%PORTDOCS%%%%DOCSDIR%%/bogofilter-qfe
%%PORTDOCS%%%%DOCSDIR%%/bogopass
%%PORTDOCS%%%%DOCSDIR%%/dot-qmail-bogofilter-default
%%PORTDOCS%%%%DOCSDIR%%/integrating-with-qmail
%%PORTDOCS%%%%DOCSDIR%%/unbase64
%%PORTDOCS%%@dirrm %%DOCSDIR%%