diff options
author | anders <anders@FreeBSD.org> | 2011-03-08 21:49:50 +0800 |
---|---|---|
committer | anders <anders@FreeBSD.org> | 2011-03-08 21:49:50 +0800 |
commit | 0edab189d02d6df09f97193e13de8b4725079a61 (patch) | |
tree | eabd260988d5fc037492970e487a48ec2f723d74 /mail | |
parent | 810fdc04e069d9c4ea483ecb9d7e34375018c69c (diff) | |
download | freebsd-ports-gnome-0edab189d02d6df09f97193e13de8b4725079a61.tar.gz freebsd-ports-gnome-0edab189d02d6df09f97193e13de8b4725079a61.tar.zst freebsd-ports-gnome-0edab189d02d6df09f97193e13de8b4725079a61.zip |
Update to work with newer Perl versions.
Obtained from: NetBSD pkgsrc
Diffstat (limited to 'mail')
-rw-r--r-- | mail/majordomo/Makefile | 2 | ||||
-rw-r--r-- | mail/majordomo/files/patch-bj | 55 | ||||
-rw-r--r-- | mail/majordomo/files/patch-majordomo.pl | 47 |
3 files changed, 101 insertions, 3 deletions
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile index 4dc9b0393b1e..1b05d4299905 100644 --- a/mail/majordomo/Makefile +++ b/mail/majordomo/Makefile @@ -7,7 +7,7 @@ PORTNAME= majordomo PORTVERSION= 1.94.5 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= mail MASTER_SITES= ftp://ftp.nuug.no/pub/anders/distfiles/ \ ftp://ftp.sgi.com/other/majordomo/1.94.5/ \ diff --git a/mail/majordomo/files/patch-bj b/mail/majordomo/files/patch-bj index c9f0bf6e78bd..31733f74a053 100644 --- a/mail/majordomo/files/patch-bj +++ b/mail/majordomo/files/patch-bj @@ -1,5 +1,5 @@ ---- approve.orig Sun Apr 6 04:18:36 1997 -+++ approve Wed Sep 10 00:57:40 1997 +--- approve.orig 2011-03-08 14:31:12.422976680 +0100 ++++ approve 2011-03-08 14:31:06.810610862 +0100 @@ -63,7 +63,7 @@ # # $Locker: $ @@ -9,3 +9,54 @@ $MAILER = '/usr/sbin/sendmail' if -x '/usr/sbin/sendmail'; die "Couldn't find a sendmail to invoke, please define!" +@@ -137,6 +137,7 @@ + + sub process_approve { + local($FILE) = shift; ++ my @words; + while (<$FILE>) { + if ((/^\tsubscribe\s/) || (/^\tunsubscribe\s/)) { + if (!defined($reply_to)) { +@@ -144,8 +145,8 @@ + exit(1); + } + s/^\t//; +- split; +- $list = $_[1]; ++ @words = split; ++ $list = $words[1]; + $list =~ tr/A-Z/a-z/; + $passwd = $passwd{"$list\@$reply_to"}; + if (! $passwd) { +@@ -214,6 +215,11 @@ + $from_skipped = 1; + next; + } ++ if (/^delivered-to: $post_to/i) { ++ # Remove Delivered-To: lines that point to the list, since they ++ # will cause postfix to think that the message is looping. ++ next; ++ } + s/^~/~~/; + print MAIL $_; + } +@@ -231,12 +237,13 @@ + s/\n$//; + s/#.*//; + if (/^$/) { next; } +- split; +- $l = $_[0]; $l =~ tr/A-Z/a-z/; # list +- $p = $_[1]; # password +- $m = $_[2]; $m =~ tr/A-Z/a-z/; # majordomo@site +- split(/\@/, $m); +- $s = $_[1]; $s =~ tr/A-Z/a-z/; # site ++ my @words = split; ++ ++ $l = $words[0]; $l =~ tr/A-Z/a-z/; # list ++ $p = $words[1]; # password ++ $m = $words[2]; $m =~ tr/A-Z/a-z/; # majordomo@site ++ @words = split(/\@/, $m); ++ $s = $words[1]; $s =~ tr/A-Z/a-z/; # site + + $passwd{$l} = $p; + $passwd{"$l\@$m"} = $p; diff --git a/mail/majordomo/files/patch-majordomo.pl b/mail/majordomo/files/patch-majordomo.pl new file mode 100644 index 000000000000..e621377bacbf --- /dev/null +++ b/mail/majordomo/files/patch-majordomo.pl @@ -0,0 +1,47 @@ +--- majordomo.pl.orig 2011-03-08 14:26:57.730103144 +0100 ++++ majordomo.pl 2011-03-08 14:27:45.390265818 +0100 +@@ -44,7 +44,7 @@ + + sub main'ParseMailHeader ## Public + { +- local($save1, $save2) = ($*, $/); ++ local($save) = ($/); + local($FH, *array) = @_; + local ($keyw, $val); + +@@ -54,7 +54,7 @@ + local($package) = caller; + $FH =~ s/^[^':]+$/$package'$&/; + +- ($*, $/) = (1, ''); ++ $/ = ''; + $array = $_ = <$FH>; + s/\n\s+/ /g; + +@@ -69,7 +69,7 @@ + $array{$keyw} = $val; + } + } +- ($*, $/) = ($save1, $save2); ++ $/ = $save; + } + + +@@ -95,14 +95,14 @@ + local($_) = shift; + 1 while s/\([^\(\)]*\)//g; # strip comments + 1 while s/"[^"]*"\s//g; # strip comments" +- split(/,/); # split into parts +- foreach (@_) { ++ my @parts = split(/,/); # split into parts ++ foreach (@parts) { + 1 while s/.*<(.*)>.*/$1/; + s/^\s+//; + s/\s+$//; + } + +- @_; ++ @parts; + } + + # Check to see if a list is valid. If it is, return the validated list |