aboutsummaryrefslogtreecommitdiffstats
path: root/mail/spamstats
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2006-02-05 23:32:18 +0800
committerleeym <leeym@FreeBSD.org>2006-02-05 23:32:18 +0800
commitddbaf41a9b540cc97f55bf1425faa73a82e1ed43 (patch)
tree1b71294b49e0ecf6d0e32b418038ec14198d1027 /mail/spamstats
parentc1a42176bc104ae6d5174daee1e9eccddce85166 (diff)
downloadfreebsd-ports-gnome-ddbaf41a9b540cc97f55bf1425faa73a82e1ed43.tar.gz
freebsd-ports-gnome-ddbaf41a9b540cc97f55bf1425faa73a82e1ed43.tar.zst
freebsd-ports-gnome-ddbaf41a9b540cc97f55bf1425faa73a82e1ed43.zip
- add bzip2 support
- bump PORTREVISION
Diffstat (limited to 'mail/spamstats')
-rw-r--r--mail/spamstats/Makefile2
-rw-r--r--mail/spamstats/files/patch-bzip231
2 files changed, 33 insertions, 0 deletions
diff --git a/mail/spamstats/Makefile b/mail/spamstats/Makefile
index 34c416c3ced6..386c28f5c9a7 100644
--- a/mail/spamstats/Makefile
+++ b/mail/spamstats/Makefile
@@ -7,6 +7,7 @@
PORTNAME= spamstats
PORTVERSION= 0.6b
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.inl.fr/download/
@@ -14,6 +15,7 @@ MAINTAINER= leeym@FreeBSD.org
COMMENT= A tool to generate statistics for spamd of Mail::SpamAssassin
RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
+ ${SITE_PERL}/${PERL_ARCH}/Compress/Bzip2.pm:${PORTSDIR}/archivers/p5-Compress-Bzip2 \
${SITE_PERL}/Date/Manip.pm:${PORTSDIR}/devel/p5-Date-Manip
USE_PERL5= yes
diff --git a/mail/spamstats/files/patch-bzip2 b/mail/spamstats/files/patch-bzip2
new file mode 100644
index 000000000000..7a215418461c
--- /dev/null
+++ b/mail/spamstats/files/patch-bzip2
@@ -0,0 +1,31 @@
+--- spamstats0.6b.pl.orig Fri Feb 3 00:38:42 2006
++++ spamstats0.6b.pl Fri Feb 3 00:51:01 2006
+@@ -156,6 +156,7 @@
+ #use Data::Dumper;
+
+ use Compress::Zlib;
++use Compress::Bzip2 qw(&bzopen $bzerrno);
+
+ my %infile;
+ undef %infile;
+@@ -598,6 +599,7 @@
+ my $is_gz = 0;
+ my $gz;
+ my $gzerrno;
++my $bzerrno;
+
+ my %spam = ();
+ my %clean = ();
+@@ -634,6 +636,12 @@
+ #print BLUE "Opening $file\n".$Stag.$NewLinetag;
+ $gz = gzopen( $file, "r" ) or die "Cannot open $file : $gzerrno\n";
+ $is_gz = 1;
++ }
++ elsif ( $file =~ /\.bz2$/ ) #We have a bz2 file
++ {
++ #print BLUE "Opening $file\n".$Stag.$NewLinetag;
++ $gz = bzopen( $file, "r" ) or die "Cannot open $file : $bzerrno\n";
++ $is_gz = 2;
+ }
+ else {
+