View | Details | Raw Unified | Return to bug 88654
Collapse All | Expand All

(-)/usr/home/emma/ports/mail/bogofilter/Makefile (-16 / +9 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	bogofilter
8
PORTNAME=	bogofilter
9
PORTVERSION=	0.96.3
9
PORTVERSION=	0.96.5
10
PORTREVISION?=	2
10
PORTREVISION?=	0
11
CATEGORIES?=	mail
11
CATEGORIES?=	mail
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 54-66 Link Here
54
post-patch:
54
post-patch:
55
	${REINPLACE_CMD} -e 's|^#!.*perl|#! ${PERL}|' \
55
	${REINPLACE_CMD} -e 's|^#!.*perl|#! ${PERL}|' \
56
		${WRKSRC}/src/tests/unsort.pl \
56
		${WRKSRC}/src/tests/unsort.pl \
57
		${WRKSRC}/contrib/bfproxy \
57
		${WRKSRC}/contrib/*.pl
58
		${WRKSRC}/contrib/bogofilter-milter.pl \
59
		${WRKSRC}/contrib/bogominitrain.pl \
60
		${WRKSRC}/contrib/mime.get.rfc822 \
61
		${WRKSRC}/contrib/printmaildir.pl \
62
		${WRKSRC}/contrib/spamitarium \
63
		${WRKSRC}/contrib/stripsearch
64
	${REINPLACE_CMD} -e 's/INTEGRITY_TESTS = t.lock1 t.lock3 t.valgrind/INTEGRITY_TESTS = t.lock1 t.lock3/' \
58
	${REINPLACE_CMD} -e 's/INTEGRITY_TESTS = t.lock1 t.lock3 t.valgrind/INTEGRITY_TESTS = t.lock1 t.lock3/' \
65
		${WRKSRC}/src/tests/Makefile.in
59
		${WRKSRC}/src/tests/Makefile.in
66
60
Lines 81-91 Link Here
81
	@${MKDIR} ${DOCSDIR}/${i}
75
	@${MKDIR} ${DOCSDIR}/${i}
82
.endfor
76
.endfor
83
.for i in AUTHORS COPYING INSTALL NEWS README README.cvs \
77
.for i in AUTHORS COPYING INSTALL NEWS README README.cvs \
84
	doc/README.validation TODO \
78
	doc/README.validation TODO GETTING.STARTED \
85
	RELEASE.NOTES doc/README.db doc/README.sqlite \
79
	RELEASE.NOTES doc/README.db doc/README.sqlite \
86
	doc/integrating-with-postfix doc/integrating-with-qmail \
80
	doc/integrating-with-postfix doc/integrating-with-qmail \
87
	doc/bogofilter-tuning.HOWTO.html doc/bogofilter-SA-2002-01 \
81
	doc/bogofilter-tuning.HOWTO.html doc/bogofilter-SA-* \
88
	doc/bogofilter-SA-2004-01 GETTING.STARTED \
89
	doc/bogofilter-faq.html doc/bogofilter-faq-fr.html
82
	doc/bogofilter-faq.html doc/bogofilter-faq-fr.html
90
	  ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
83
	  ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
91
.endfor
84
.endfor
Lines 97-107 Link Here
97
	${INSTALL_DATA} ${WRKSRC}/doc/*.xml ${DOCSDIR}/xml
90
	${INSTALL_DATA} ${WRKSRC}/doc/*.xml ${DOCSDIR}/xml
98
	${INSTALL_DATA} ${WRKSRC}/doc/programmer/README.freebsd ${DOCSDIR}/programmer
91
	${INSTALL_DATA} ${WRKSRC}/doc/programmer/README.freebsd ${DOCSDIR}/programmer
99
.endif
92
.endif
100
	${INSTALL_PROGRAM} ${WRKSRC}/contrib/bogogrep ${PREFIX}/bin/
93
	${INSTALL_PROGRAM} ${WRKSRC}/bogogrep ${PREFIX}/bin/
101
.for i in bfproxy bogofilter-milter.pl bogo.R bogofilter-qfe \
94
.for i in bfproxy.pl bogofilter-milter.pl bogo.R bogofilter-qfe.sh \
102
		mime.get.rfc822 parmtest.sh printmaildir.pl \
95
		mime.get.rfc822.pl parmtest.sh printmaildir.pl \
103
		bogominitrain.pl \
96
		bogominitrain.pl \
104
		randomtrain scramble spamitarium stripsearch trainbogo.sh
97
		randomtrain.sh scramble.sh spamitarium.pl stripsearch.pl trainbogo.sh
105
	  ${INSTALL_SCRIPT} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/${i}
98
	  ${INSTALL_SCRIPT} ${WRKSRC}/contrib/${i} ${DOCSDIR}/contrib/${i}
106
.endfor
99
.endfor
107
.for i in dot-qmail-bogofilter-default \
100
.for i in dot-qmail-bogofilter-default \
(-)/usr/home/emma/ports/mail/bogofilter/distinfo (-2 / +1 lines)
Lines 1-2 Link Here
1
MD5 (bogofilter-0.96.3.tar.bz2) = eeb9a0374fbfa10cd22907b44bcb0711
1
MD5 (bogofilter-0.96.5.tar.bz2) = 77ec9fc84f51a183800a615b59c97da8
2
SIZE (bogofilter-0.96.3.tar.bz2) = 740218
(-)/usr/home/emma/ports/mail/bogofilter/files/patch-bashisms (-79 lines)
Lines 1-79 Link Here
1
--- ./contrib/randomtrain~	2005/10/26 22:05:55	1.1
2
+++ ./contrib/randomtrain	2005/10/27 07:54:15	1.2
3
@@ -4,15 +4,17 @@
4
 #
5
 #  randomtrain -- bogofilter messages from files in random order
6
 #                 and train if the result is wrong or uncertain
7
-#  needs:    bash basename rm grep awk wc perl dd bogofilter
8
+#  needs:    POSIX compliant sh, basename rm grep awk wc perl dd bogofilter
9
 #  usage:    see function usage() of this file
10
 #
11
 #  original author: 	Greg Louis <glouis@dynamicro.on.ca>
12
 #  modified by: 	David Relson <relson@osagesoftware.com>
13
 
14
+# Note: on Solaris, use /usr/xpg4/bin/sh -- /bin/sh will not work.
15
+
16
 BOGOFILTER="bogofilter"
17
 
18
-function usage() {
19
+usage() {
20
     name=$(basename $0)
21
     echo "Usage: $name [-d bogodir] [-p pid] [-c cfg] [-]n|s filename [-]n|s filename [...]"
22
     echo "       Messages contained in the files are fed to bogofilter"
23
@@ -34,7 +36,7 @@
24
     exit 1
25
 }
26
 
27
-function train_mbox() {
28
+train_mbox() {
29
     # go through the list, extract the messages, eval with bogofilter
30
     # and train if bogofilter is wrong or uncertain
31
     cnt=0; nspam=0; ngood=0; rspam=0; rgood=0;
32
@@ -63,7 +65,7 @@
33
     printf "\r%5d%5d  %5d%5d\n" $nspam $rspam $ngood $rgood
34
 }
35
 
36
-function train_maildir() {
37
+train_maildir() {
38
     # go through the list, extract the messages, eval with bogofilter
39
     # and train if bogofilter is wrong or uncertain
40
     cnt=0; nspam=0; ngood=0; rspam=0; rgood=0;
41
@@ -103,9 +105,9 @@
42
 mdir=2		# maildir mode
43
 
44
 while [ ${#*} -gt 1 ]; do
45
-    indic=${1:0-1:1} ; shift
46
+    indic=$1 ; shift
47
     case "$indic" in
48
-	s | n )
49
+	s|-s|n|-n)
50
 	    path=$1 ; shift
51
 	    cmd="$cmd -c $indic $path"
52
 	    if [ ! -r $path ]; then echo "file '$path' not found"; usage; fi
53
@@ -118,22 +120,22 @@
54
 		fi
55
 	    fi
56
 	    ;;
57
-	c ) 
58
+	c|-c)
59
 	    file=$1 ; shift
60
 	    cfg="-c $file"
61
 	    if [ ! -r $file ]; then echo "file '$file' not found"; usage; fi
62
 	    ;;
63
-	p )
64
+	p|-p)
65
 	    pid=$1; shift;
66
 	    ;;
67
-	d )
68
+	d|-d)
69
 	    [ -n "$bogodir" ] && usage
70
 	    bogodir=$1 ; shift
71
 	    if [ ! -d $bogodir ]; then echo "directory '$bogodir' not found"; usage; fi
72
 	    [ ! -f $bogodir/spamlist.db ] && $BOGOFILTER -d $bogodir -s -C < /dev/null
73
 	    [ ! -f $bogodir/goodlist.db ] && $BOGOFILTER -d $bogodir -n -C < /dev/null
74
 	    ;;
75
-	* )
76
+	*)
77
 	    usage
78
     esac
79
 done
(-)/usr/home/emma/ports/mail/bogofilter/files/patch-mimetypes (-11 lines)
Lines 1-11 Link Here
1
--- ./src/mime.c.orig	Wed Oct 26 10:24:05 2005
2
+++ ./src/mime.c	Wed Oct 26 10:24:09 2005
3
@@ -48,7 +48,7 @@
4
     { MIME_APPLICATION,	 "application/", 12 },
5
     { MIME_MESSAGE,	 "message/",	  8 },
6
     { MIME_MULTIPART,	 "multipart/",	 10 },
7
-    { MIME_IMAGE,	 "image/bmp",	  9 },
8
+    { MIME_IMAGE,	 "image/",	  6 },
9
     { MIME_AUDIO,	 "audio/",	  6 },
10
     { MIME_VIDEO,	 "video/",	  6 },
11
 };
(-)/usr/home/emma/ports/mail/bogofilter/pkg-plist (-7 / +7 lines)
Lines 8-28 Link Here
8
bin/bogoutil
8
bin/bogoutil
9
bin/bogoupgrade
9
bin/bogoupgrade
10
etc/bogofilter.cf.example
10
etc/bogofilter.cf.example
11
%%CONTRIB%%%%DOCSDIR%%/contrib/bfproxy
11
%%CONTRIB%%%%DOCSDIR%%/contrib/bfproxy.pl
12
%%CONTRIB%%%%DOCSDIR%%/contrib/bogo.R
12
%%CONTRIB%%%%DOCSDIR%%/contrib/bogo.R
13
%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-milter.pl
13
%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-milter.pl
14
%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-qfe
14
%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-qfe.sh
15
%%CONTRIB%%%%DOCSDIR%%/contrib/bogominitrain.pl
15
%%CONTRIB%%%%DOCSDIR%%/contrib/bogominitrain.pl
16
%%CONTRIB%%%%DOCSDIR%%/contrib/dot-qmail-bogofilter-default
16
%%CONTRIB%%%%DOCSDIR%%/contrib/dot-qmail-bogofilter-default
17
%%CONTRIB%%%%DOCSDIR%%/contrib/mailfilter.example
17
%%CONTRIB%%%%DOCSDIR%%/contrib/mailfilter.example
18
%%CONTRIB%%%%DOCSDIR%%/contrib/mime.get.rfc822
18
%%CONTRIB%%%%DOCSDIR%%/contrib/mime.get.rfc822.pl
19
%%CONTRIB%%%%DOCSDIR%%/contrib/parmtest.sh
19
%%CONTRIB%%%%DOCSDIR%%/contrib/parmtest.sh
20
%%CONTRIB%%%%DOCSDIR%%/contrib/printmaildir.pl
20
%%CONTRIB%%%%DOCSDIR%%/contrib/printmaildir.pl
21
%%CONTRIB%%%%DOCSDIR%%/contrib/procmailrc.example
21
%%CONTRIB%%%%DOCSDIR%%/contrib/procmailrc.example
22
%%CONTRIB%%%%DOCSDIR%%/contrib/randomtrain
22
%%CONTRIB%%%%DOCSDIR%%/contrib/randomtrain.sh
23
%%CONTRIB%%%%DOCSDIR%%/contrib/scramble
23
%%CONTRIB%%%%DOCSDIR%%/contrib/scramble.sh
24
%%CONTRIB%%%%DOCSDIR%%/contrib/spamitarium
24
%%CONTRIB%%%%DOCSDIR%%/contrib/spamitarium.pl
25
%%CONTRIB%%%%DOCSDIR%%/contrib/stripsearch
25
%%CONTRIB%%%%DOCSDIR%%/contrib/stripsearch.pl
26
%%CONTRIB%%%%DOCSDIR%%/contrib/trainbogo.sh
26
%%CONTRIB%%%%DOCSDIR%%/contrib/trainbogo.sh
27
%%CONTRIB%%@dirrm %%DOCSDIR%%/contrib
27
%%CONTRIB%%@dirrm %%DOCSDIR%%/contrib
28
%%CONTRIB%%@dirrm %%DOCSDIR%%
28
%%CONTRIB%%@dirrm %%DOCSDIR%%

Return to bug 88654