Update to version 2.30, which has numerous bug fixes, better RBL

support, better language support, and other improvements.

The PR provided the new dependency, however the port needed
some portlint and other cleanup:

* Whitespace (spaces -> tabs)
* Wonky commands/paths/etc. replaced by ${VARIABLES} where appropriate
* Added some more files to PORTSDOCS, and tightened it up a bit
with a for loop
* Sorted the plist

It was also necessary to add a patch that provides the user with an
option as to whether or not to use dccproc. We have no port for it,
and porting it doesn't look fun. If the SA authors don't intend to
add this option to the base, I'll fix the (fairly simple) patch
to follow proper "one patch per file" rules.

PR:		ports/39319
Submitted by:	Alex Vasylenko <lxv@a-send-pr.sink.omut.org>
This commit is contained in:
Doug Barton 2002-06-15 09:56:34 +00:00
parent 515147d6b6
commit 474d18267c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61312
4 changed files with 135 additions and 30 deletions

View File

@ -6,19 +6,20 @@
#
PORTNAME= Mail-SpamAssassin
PORTVERSION= 2.20
PORTVERSION= 2.30
CATEGORIES= mail perl5
MASTER_SITES= http://spamassassin.org/released/ \
MASTER_SITES= http://spamassassin.org/released/ \
${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Mail
PKGNAMEPREFIX= p5-
MAINTAINER= ports@FreeBSD.org
BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/DNS.pm:${PORTSDIR}/net/p5-Net-DNS \
BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/DNS.pm:${PORTSDIR}/net/p5-Net-DNS \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools
RUN_DEPENDS= ${BUILD_DEPENDS} \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Pod/Usage.pm:${PORTSDIR}/textproc/p5-PodParser \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Razor/Client.pm:${PORTSDIR}/mail/razor-agents
PERL_CONFIGURE= yes
@ -28,25 +29,23 @@ MAN3= Mail::SpamAssassin.3 Mail::SpamAssassin::PerMsgStatus.3 \
Mail::SpamAssassin::PersistentAddrList.3 \
Mail::SpamAssassin::SMTP::SmartHost.3
MAN1PREFIX= ${PREFIX}
MAN1= spamd.1 spamassassin.1 spamc.1 spamproxyd.1
MAN1= spamd.1 spamassassin.1 spamc.1 spamproxyd.1
post-patch:
@find ${WRKSRC} -type f -name "*.orig" -exec rm -f "{}" ";"
@${FIND} ${WRKSRC} -name \*.orig -exec ${RM} {} \;
post-install:
strip ${PREFIX}/bin/spamc
cd ${FILESDIR}; \
${INSTALL_DATA} spamd.sh \
${PREFIX}/etc/rc.d/spamd.sh-dist
@strip ${PREFIX}/bin/spamc
${INSTALL_DATA} ${FILESDIR}/spamd.sh ${PREFIX}/etc/rc.d/spamd.sh-dist
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/sample-nonspam.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/sample-spam.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/spamd/README.spamd ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/spamproxy/README ${DOCSDIR}/README.spamproxy
${INSTALL_DATA} ${WRKSRC}/sql/README ${DOCSDIR}/README.sql
${INSTALL_DATA} ${WRKSRC}/sql/spamassassin.sql ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/spamproxy/README ${DOCSDIR}/README.spamproxy
.for file in Changes README TODO TRADEMARK procmailrc.example sample* \
spamd/README* spamproxy/README.SmartHost sql/spamassassin.sql
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.mk>

View File

@ -1 +1 @@
MD5 (Mail-SpamAssassin-2.20.tar.gz) = 6d1ce17ca848c3528e14f588873d1164
MD5 (Mail-SpamAssassin-2.30.tar.gz) = 10bc688385ea6a3d64e91d1f7199d41c

View File

@ -0,0 +1,94 @@
diff -ur /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Conf.pm ./lib/Mail/SpamAssassin/Conf.pm
--- /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Conf.pm Mon Jun 10 00:59:38 2002
+++ ./lib/Mail/SpamAssassin/Conf.pm Sat Jun 15 01:35:42 2002
@@ -135,6 +135,8 @@
$self->{allow_user_rules} = 0;
$self->{user_rules_to_compile} = 0;
+ $self->{use_dcc} = 1;
+
$self->{dcc_body_max} = 999999;
$self->{dcc_fuz1_max} = 999999;
$self->{dcc_fuz2_max} = 999999;
@@ -613,6 +615,16 @@
if (/^rbl[-_]timeout\s+(\d+)$/) {
$self->{rbl_timeout} = $1+0; next;
+ }
+
+=item use_dcc { 0 | 1 } (default: 1)
+
+Should we use dccproc, or not.
+
+=cut
+
+ if (/^use[-_]dcc\s+(\d+)$/) {
+ $self->{use_dcc} = $1+0; next;
}
=item ok_locales xx [ yy zz ... ] (default: en)
diff -ur /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Dns.pm ./lib/Mail/SpamAssassin/Dns.pm
--- /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Dns.pm Wed Jun 12 02:10:43 2002
+++ ./lib/Mail/SpamAssassin/Dns.pm Sat Jun 15 01:37:22 2002
@@ -301,6 +301,10 @@
sub is_dcc_available {
my ($self) = @_;
+
+ # Added by FreeBSD ports
+ return 0 unless $self->{conf}->{use_dcc};
+
my (@resp);
if ($self->{main}->{local_tests_only}) {
@@ -324,6 +328,10 @@
sub dcc_lookup {
my ($self, $fulltext) = @_;
+
+ # Added by FreeBSD ports
+ return 0 unless $self->{conf}->{use_dcc};
+
my $response = undef;
my %count;
my $left;
diff -ur /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/EvalTests.pm ./lib/Mail/SpamAssassin/EvalTests.pm
--- /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/EvalTests.pm Fri Jun 14 10:21:47 2002
+++ ./lib/Mail/SpamAssassin/EvalTests.pm Sat Jun 15 01:37:34 2002
@@ -1430,6 +1430,9 @@
sub check_dcc {
my ($self, $fulltext) = @_;
+ # Added by FreeBSD ports
+ return 0 unless $self->{conf}->{use_dcc};
+
return 0 unless ($self->is_dcc_available());
return 0 if ($self->{already_checked_dcc});
diff -ur /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Reporter.pm ./lib/Mail/SpamAssassin/Reporter.pm
--- /usr/local/home/doug/Mail-SpamAssassin-2.30/lib/Mail/SpamAssassin/Reporter.pm Fri Jun 14 11:52:17 2002
+++ ./lib/Mail/SpamAssassin/Reporter.pm Sat Jun 15 00:56:39 2002
@@ -147,6 +147,10 @@
sub is_dcc_available {
my ($self) = @_;
+
+ # Added by FreeBSD ports
+ return 0 unless $self->{conf}->{use_dcc};
+
my (@resp);
if ($self->{main}->{local_tests_only}) {
diff -ur /usr/local/home/doug/Mail-SpamAssassin-2.30/rules/10_misc.cf ./rules/10_misc.cf
--- /usr/local/home/doug/Mail-SpamAssassin-2.30/rules/10_misc.cf Thu May 30 19:12:10 2002
+++ ./rules/10_misc.cf Sat Jun 15 00:56:39 2002
@@ -102,6 +102,9 @@
# test, so it is set to "all" so the test will not be used by default.
ok_languages all
+# Added by FreeBSD ports
+use_dcc 0
+
# Some common prefs settings can be set here, to take effect site-wide
# unless the user override them. See the .prefs file for explanations.

View File

@ -3,55 +3,67 @@ bin/spamc
bin/spamd
bin/spamproxyd
etc/rc.d/spamd.sh-dist
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin/.packlist
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/SMTP/SmartHost.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/EvalTests.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/DBBasedAddrList.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/AuditMessage.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/AutoWhitelist.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Conf.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/ConfSourceSQL.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/DBBasedAddrList.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Dns.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/EncappedMessage.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/EvalTests.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/ExposedMessage.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Locales.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Message.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/PhraseFreqs.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/NoMailAudit.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/PerMsgStatus.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/PersistentAddrList.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/PhraseFreqs.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Replier.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/Reporter.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/PersistentAddrList.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/AutoWhitelist.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/NoMailAudit.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/SMTP/SmartHost.pm
lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/TextCat.pm
lib/perl5/site_perl/%%PERL_VER%%/auto/Mail/SpamAssassin/SMTP/SmartHost/autosplit.ix
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin/.packlist
%%PORTDOCS%%share/doc/Mail-SpamAssassin/Changes
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.SmartHost
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.spamd
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.spamd-vpopmail
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.spamproxy
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.sql
%%PORTDOCS%%share/doc/Mail-SpamAssassin/TODO
%%PORTDOCS%%share/doc/Mail-SpamAssassin/TRADEMARK
%%PORTDOCS%%share/doc/Mail-SpamAssassin/procmailrc.example
%%PORTDOCS%%share/doc/Mail-SpamAssassin/sample-nonspam.txt
%%PORTDOCS%%share/doc/Mail-SpamAssassin/sample-spam.txt
%%PORTDOCS%%share/doc/Mail-SpamAssassin/spamassassin.sql
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.spamd
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.spamproxy
%%PORTDOCS%%share/doc/Mail-SpamAssassin/README.sql
share/spamassassin/10_misc.cf
share/spamassassin/20_body_tests.cf
share/spamassassin/20_head_tests.cf
share/spamassassin/20_uri_tests.cf
share/spamassassin/25_body_tests_es.cf
share/spamassassin/25_body_tests_pl.cf
share/spamassassin/25_head_tests_es.cf
share/spamassassin/25_head_tests_pl.cf
share/spamassassin/30_text_de.cf
share/spamassassin/30_text_es.cf
share/spamassassin/30_text_fr.cf
share/spamassassin/30_text_pl.cf
share/spamassassin/40_spam_phrases.cf
share/spamassassin/50_scores.cf
share/spamassassin/60_whitelist.cf
share/spamassassin/languages
share/spamassassin/triplets.txt
share/spamassassin/user_prefs.template
@dirrm share/spamassassin
%%PORTDOCS%%@dirrm share/doc/Mail-SpamAssassin
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin
@dirrm lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin/SMTP
@dirrm lib/perl5/site_perl/%%PERL_VER%%/Mail/SpamAssassin
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Mail/SpamAssassin
@dirrm lib/perl5/site_perl/%%PERL_VER%%/auto/Mail/SpamAssassin/SMTP/SmartHost
@dirrm lib/perl5/site_perl/%%PERL_VER%%/auto/Mail/SpamAssassin/SMTP
@dirrm lib/perl5/site_perl/%%PERL_VER%%/auto/Mail/SpamAssassin
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Mail 2>/dev/null || true
@dirrm share/spamassassin
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Mail 2>/dev/null || true
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Mail 2>/dev/null || true
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/auto/Mail 2>/dev/null || true