diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/spamstats/Makefile | 2 | ||||
-rw-r--r-- | mail/spamstats/files/patch-bzip2 | 31 |
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 { + |