1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

Fix a problem with sa-learn when called with the --single option.

This commit is contained in:
Doug Barton 2003-02-28 07:41:03 +00:00
parent c168cc0473
commit d523550ac8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=76612
2 changed files with 31 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= Mail-SpamAssassin
PORTVERSION= 2.50
PORTREVISION= 1
CATEGORIES= mail perl5
MASTER_SITES= http://spamassassin.org/released/ \
${MASTER_SITE_PERL_CPAN}
@ -46,6 +47,9 @@ MAN1= spamd.1 spamassassin.1 spamc.1 sa-learn.1
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -delete
post-install:
@${STRIP_CMD} ${PREFIX}/bin/spamc
${INSTALL_SCRIPT} ${FILESDIR}/spamd.sh ${PREFIX}/etc/rc.d/spamd.sh-dist

View File

@ -0,0 +1,27 @@
--- lib/Mail/SpamAssassin/CmdLearn.pm.orig Tue Feb 18 17:29:45 2003
+++ lib/Mail/SpamAssassin/CmdLearn.pm Thu Feb 27 18:53:49 2003
@@ -24,7 +24,7 @@
%opt = ();
Getopt::Long::Configure(qw(bundling no_getopt_compat
- no_auto_abbrev no_ignore_case));
+ permute no_auto_abbrev no_ignore_case));
GetOptions(
'spam' => sub { $isspam = 1; },
@@ -56,12 +56,12 @@
'file' => sub { $opt{'format'} = 'file'; },
'mbox' => sub { $opt{'format'} = 'mbox'; },
- 'single' => sub {
- $opt{'format'} = 'file'; push (@ARGV, '-');
- },
+ 'single' => sub { $opt{'format'} = 'file'; },
'<>' => \&target,
) or usage(0, "Unknown option!");
+
+ if ($opt{'format'} eq 'file') { push (@ARGV, '-'); }
if (defined $opt{'help'}) { usage(0, "For more information read the manual page"); }
if (defined $opt{'version'}) {