aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2002-11-22 23:22:54 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2002-11-22 23:22:54 +0000
commit9ff80c131a36020216f474b63d0576af27d50a46 (patch)
treecb14f2f1d786948526f1e46fca8e99796397fa49 /mail
parentf0f6ca119459af618e21c6bbd8b947e63d23255f (diff)
downloadports-9ff80c131a36020216f474b63d0576af27d50a46.tar.gz
ports-9ff80c131a36020216f474b63d0576af27d50a46.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/bogofilter-current/Makefile2
-rw-r--r--mail/bogofilter-current/files/patch-z-stats57
-rw-r--r--mail/bogofilter/Makefile2
-rw-r--r--mail/bogofilter/files/patch-z-stats57
4 files changed, 116 insertions, 2 deletions
diff --git a/mail/bogofilter-current/Makefile b/mail/bogofilter-current/Makefile
index 9d01b0e3dc23..91de94427179 100644
--- a/mail/bogofilter-current/Makefile
+++ b/mail/bogofilter-current/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bogofilter
PORTVERSION= 0.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/mail/bogofilter-current/files/patch-z-stats b/mail/bogofilter-current/files/patch-z-stats
new file mode 100644
index 000000000000..a77ce837140c
--- /dev/null
+++ b/mail/bogofilter-current/files/patch-z-stats
@@ -0,0 +1,57 @@
+--- 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"
diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile
index 9d01b0e3dc23..91de94427179 100644
--- a/mail/bogofilter/Makefile
+++ b/mail/bogofilter/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bogofilter
PORTVERSION= 0.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/mail/bogofilter/files/patch-z-stats b/mail/bogofilter/files/patch-z-stats
new file mode 100644
index 000000000000..a77ce837140c
--- /dev/null
+++ b/mail/bogofilter/files/patch-z-stats
@@ -0,0 +1,57 @@
+--- 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"