diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2003-10-28 08:55:25 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2003-10-28 08:55:25 +0800 |
commit | e74ab39c59b38125c2e982fc440a39b82d3775c6 (patch) | |
tree | eca7e1533001137a19c68fc9619a94e89ec30c59 | |
parent | 775f0ed13bcaf8cb6e5eb20e61fe9fbe1731b518 (diff) | |
download | freebsd-ports-gnome-e74ab39c59b38125c2e982fc440a39b82d3775c6.tar.gz freebsd-ports-gnome-e74ab39c59b38125c2e982fc440a39b82d3775c6.tar.zst freebsd-ports-gnome-e74ab39c59b38125c2e982fc440a39b82d3775c6.zip |
Back out previous upgrade because of incompatibility.
Requested by: many
-rw-r--r-- | mail/p5-MIME-Tools/Makefile | 42 | ||||
-rw-r--r-- | mail/p5-MIME-Tools/distinfo | 2 | ||||
-rw-r--r-- | mail/p5-MIME-Tools/files/patch-ParamVal.pm | 114 | ||||
-rw-r--r-- | mail/p5-MIME-Tools/files/patch-Words.pm | 11 | ||||
-rw-r--r-- | mail/p5-MIME-Tools/pkg-plist | 28 |
5 files changed, 139 insertions, 58 deletions
diff --git a/mail/p5-MIME-Tools/Makefile b/mail/p5-MIME-Tools/Makefile index 494c9ab90e15..ff207c99cb08 100644 --- a/mail/p5-MIME-Tools/Makefile +++ b/mail/p5-MIME-Tools/Makefile @@ -6,22 +6,23 @@ # PORTNAME= p5-MIME-Tools -PORTVERSION= 6.200.02 +PORTVERSION= 5.411a +PORTREVISION= 2 +PORTEPOCH= 1 CATEGORIES= mail perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} -MASTER_SITE_SUBDIR= ../../authors/id/E/ER/ERYQ -DISTNAME= MIME-tools-${PORTVERSION:R}_${PORTVERSION:E} +MASTER_SITE_SUBDIR= MIME +DISTNAME= MIME-tools-${PORTVERSION} MAINTAINER= kuriyama@FreeBSD.org COMMENT= A set of perl5 modules for MIME BUILD_DEPENDS= ${SITE_PERL}/Mail/Header.pm:${PORTSDIR}/mail/p5-Mail-Tools \ - ${SITE_PERL}/IO/Wrap.pm:${PORTSDIR}/devel/p5-IO-stringy \ - ${SITE_PERL}/${PERL_ARCH}/Unicode/Map.pm:${PORTSDIR}/converters/p5-Unicode-Map \ - ${SITE_PERL}/${PERL_ARCH}/Unicode/String.pm:${PORTSDIR}/converters/p5-Unicode-String + ${SITE_PERL}/IO/Wrap.pm:${PORTSDIR}/devel/p5-IO-stringy RUN_DEPENDS= ${BUILD_DEPENDS} PERL_CONFIGURE= YES +WRKSRC= ${WRKDIR}/MIME-tools-5.411 MAN3= MIME::Body.3 \ MIME::Decoder.3 \ @@ -38,32 +39,10 @@ MAN3= MIME::Body.3 \ MIME::Field::ParamVal.3 \ MIME::Head.3 \ MIME::Parser.3 \ - MIME::Parser::AbstractFiler.3 \ MIME::Parser::Filer.3 \ - MIME::Parser::FlatFiler.3 \ MIME::Parser::Reader.3 \ - MIME::Parser::Redoer.3 \ MIME::Parser::Results.3 \ - MIME::Parser::TreeFiler.3 \ - MIME::Parser::UURedoer.3 \ MIME::Tools.3 \ - MIME::Tools::IndentingLogger.3 \ - MIME::Tools::Logger.3 \ - MIME::Tools::MailFieldParserForRFC2045.3 \ - MIME::Tools::MailFieldTokenizerForRFC2045.3 \ - MIME::Tools::NullLogger.3 \ - MIME::Tools::PrefixingLogger.3 \ - MIME::Tools::ToolkitLogger.3 \ - MIME::Tools::Utils.3 \ - MIME::Tools::changes.3 \ - MIME::Tools::config.3 \ - MIME::Tools::diag.3 \ - MIME::Tools::faq.3 \ - MIME::Tools::overview.3 \ - MIME::Tools::primer.3 \ - MIME::Tools::tips.3 \ - MIME::Tools::traps.3 \ - MIME::Tools::tricks.3 \ MIME::WordDecoder.3 \ MIME::Words.3 @@ -72,8 +51,9 @@ MAN3= MIME::Body.3 \ .if ${PERL_LEVEL} < 500800 BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 .endif -.if ${PERL_LEVEL} < 500600 -IGNORE= 5.005 is not supported -.endif + +post-patch: + @${RM} -f ${WRKSRC}/lib/MIME/Field/ParamVal.pm.orig \ + ${WRKSRC}/lib/MIME/Words.pm.orig .include <bsd.port.post.mk> diff --git a/mail/p5-MIME-Tools/distinfo b/mail/p5-MIME-Tools/distinfo index 2a9c2a632a87..2734274cf463 100644 --- a/mail/p5-MIME-Tools/distinfo +++ b/mail/p5-MIME-Tools/distinfo @@ -1 +1 @@ -MD5 (MIME-tools-6.200_02.tar.gz) = 3d0b48a8b52e27618a899e0475d1c003 +MD5 (MIME-tools-5.411a.tar.gz) = e7cb1f8e146171103640e3a5516afb1a diff --git a/mail/p5-MIME-Tools/files/patch-ParamVal.pm b/mail/p5-MIME-Tools/files/patch-ParamVal.pm new file mode 100644 index 000000000000..afc85edda148 --- /dev/null +++ b/mail/p5-MIME-Tools/files/patch-ParamVal.pm @@ -0,0 +1,114 @@ +--- lib/MIME/Field/ParamVal.pm.orig Sun Nov 5 04:54:49 2000 ++++ lib/MIME/Field/ParamVal.pm Thu Jun 6 10:15:15 2002 +@@ -100,6 +100,9 @@ + # token = 1*<any (ASCII) CHAR except SPACE, CTLs, or tspecials> + # + my $TSPECIAL = '()<>@,;:\</[]?="'; ++ ++#" Fix emacs highlighting... ++ + my $TOKEN = '[^ \x00-\x1f\x80-\xff' . "\Q$TSPECIAL\E" . ']+'; + + # Encoded token: +@@ -108,6 +111,9 @@ + # Pattern to match spaces or comments: + my $SPCZ = '(?:\s|\([^\)]*\))*'; + ++# Pattern to match non-semicolon as fallback for broken MIME ++# produced by some viruses ++my $BADTOKEN = '[^;]+'; + + #------------------------------ + # +@@ -181,10 +187,40 @@ + + =cut + ++sub rfc2231decode { ++ my($val) = @_; ++ my($enc, $lang, $rest); ++ ++ if ($val =~ m/^([^\']*)\'([^\']*)\'(.*)$/) { ++ # SHOULD REALLY DO SOMETHING MORE INTELLIGENT WITH ENCODING!!! ++ $enc = $1; ++ $lang = $2; ++ $rest = $3; ++ $rest = rfc2231percent($rest); ++ } elsif ($val =~ m/^([^\']*)\'([^\']*)$/) { ++ $enc = $1; ++ $rest = $2; ++ $rest = rfc2231percent($rest); ++ } else { ++ $rest = rfc2231percent($val); ++ } ++ return $rest; ++} ++ ++sub rfc2231percent { ++ # Do percent-subsitution ++ my($str) = @_; ++ $str =~ s/%([0-9a-fA-F]{2})/pack("c", hex($1))/ge; ++ return $str; ++} ++ + sub parse_params { + my ($self, $raw) = @_; + my %params = (); ++ my %rfc2231params = (); + my $param; ++ my $val; ++ my $part; + + # Get raw field, and unfold it: + defined($raw) or $raw = ''; +@@ -200,9 +236,47 @@ + $raw =~ m/\G$SPCZ\;$SPCZ/og or last; # skip leading separator + $raw =~ m/\G($PARAMNAME)\s*=\s*/og or last; # give up if not a param + $param = lc($1); +- $raw =~ m/\G(\"([^\"]+)\")|\G($TOKEN)|\G($ENCTOKEN)/g or last; # give up if no value +- my ($qstr, $str, $token, $enctoken) = ($1, $2, $3, $4); +- $params{$param} = defined($qstr) ? $str : (defined($token) ? $token : $enctoken); ++ $raw =~ m/\G(\"([^\"]+)\")|\G($ENCTOKEN)|\G($BADTOKEN)|\G($TOKEN)/g or last; # give up if no value" ++ my ($qstr, $str, $enctoken, $badtoken, $token) = ($1, $2, $3, $4, $5); ++ if (defined($badtoken)) { ++ # Strip leading/trailing whitespace from badtoken ++ $badtoken =~ s/^\s*//; ++ $badtoken =~ s/\s*$//; ++ } ++ $val = defined($qstr) ? $str : ++ (defined($enctoken) ? $enctoken : ++ (defined($badtoken) ? $badtoken : $token)); ++ ++ # Do RFC 2231 processing ++ if ($param =~ /\*/) { ++ my($name, $num); ++ # Pick out the parts of the parameter ++ if ($param =~ m/^([^*]+)\*([^*]+)\*?$/) { ++ # We have param*number* or param*number ++ $name = $1; ++ $num = $2; ++ } else { ++ # Fake a part of zero... not sure how to handle this properly ++ $param =~ s/\*//g; ++ $name = $param; ++ $num = 0; ++ } ++ # Decode the value unless it was a quoted string ++ if (!defined($qstr)) { ++ $val = rfc2231decode($val); ++ } ++ $rfc2231params{$name}{$num} .= $val; ++ } else { ++ # Make a fake "part zero" for non-RFC2231 params ++ $rfc2231params{$param}{"0"} = $val; ++ } ++ } ++ ++ # Extract reconstructed parameters ++ foreach $param (keys %rfc2231params) { ++ foreach $part (sort { $a <=> $b } keys %{$rfc2231params{$param}}) { ++ $params{$param} .= $rfc2231params{$param}{$part}; ++ } + debug " field param <$param> = <$params{$param}>"; + } + diff --git a/mail/p5-MIME-Tools/files/patch-Words.pm b/mail/p5-MIME-Tools/files/patch-Words.pm new file mode 100644 index 000000000000..d1fb41ea9759 --- /dev/null +++ b/mail/p5-MIME-Tools/files/patch-Words.pm @@ -0,0 +1,11 @@ +--- lib/MIME/Words.pm.orig Sat Nov 11 01:45:12 2000 ++++ lib/MIME/Words.pm Thu Jun 6 10:15:15 2002 +@@ -186,7 +186,7 @@ + $@ = ''; ### error-return + + ### Collapse boundaries between adjacent encoded words: +- $encstr =~ s{(\?\=)\r?\n[ \t](\=\?)}{$1$2}gs; ++ $encstr =~ s{(\?\=)\s*(\=\?)}{$1$2}gs; + pos($encstr) = 0; + ### print STDOUT "ENC = [", $encstr, "]\n"; + diff --git a/mail/p5-MIME-Tools/pkg-plist b/mail/p5-MIME-Tools/pkg-plist index b166bc6d55d3..5722ecd9136b 100644 --- a/mail/p5-MIME-Tools/pkg-plist +++ b/mail/p5-MIME-Tools/pkg-plist @@ -1,45 +1,22 @@ %%SITE_PERL%%/MIME/Body.pm +%%SITE_PERL%%/MIME/Entity.pm %%SITE_PERL%%/MIME/Decoder.pm +%%SITE_PERL%%/MIME/Decoder/QuotedPrint.pm %%SITE_PERL%%/MIME/Decoder/Base64.pm %%SITE_PERL%%/MIME/Decoder/Binary.pm %%SITE_PERL%%/MIME/Decoder/Gzip64.pm %%SITE_PERL%%/MIME/Decoder/NBit.pm -%%SITE_PERL%%/MIME/Decoder/QuotedPrint.pm %%SITE_PERL%%/MIME/Decoder/UU.pm -%%SITE_PERL%%/MIME/Entity.pm %%SITE_PERL%%/MIME/Field/ConTraEnc.pm %%SITE_PERL%%/MIME/Field/ContDisp.pm %%SITE_PERL%%/MIME/Field/ContType.pm %%SITE_PERL%%/MIME/Field/ParamVal.pm %%SITE_PERL%%/MIME/Head.pm %%SITE_PERL%%/MIME/Parser.pm -%%SITE_PERL%%/MIME/Parser/AbstractFiler.pm %%SITE_PERL%%/MIME/Parser/Filer.pm -%%SITE_PERL%%/MIME/Parser/FlatFiler.pm %%SITE_PERL%%/MIME/Parser/Reader.pm -%%SITE_PERL%%/MIME/Parser/Redoer.pm %%SITE_PERL%%/MIME/Parser/Results.pm -%%SITE_PERL%%/MIME/Parser/TreeFiler.pm -%%SITE_PERL%%/MIME/Parser/UURedoer.pm %%SITE_PERL%%/MIME/Tools.pm -%%SITE_PERL%%/MIME/Tools/IndentingLogger.pm -%%SITE_PERL%%/MIME/Tools/Logger.pm -%%SITE_PERL%%/MIME/Tools/MailFieldParserForRFC2045.pm -%%SITE_PERL%%/MIME/Tools/MailFieldTokenizerForRFC2045.pm -%%SITE_PERL%%/MIME/Tools/MailFieldTokenizerForRFC822.pm -%%SITE_PERL%%/MIME/Tools/NullLogger.pm -%%SITE_PERL%%/MIME/Tools/PrefixingLogger.pm -%%SITE_PERL%%/MIME/Tools/ToolkitLogger.pm -%%SITE_PERL%%/MIME/Tools/Utils.pm -%%SITE_PERL%%/MIME/Tools/changes.pod -%%SITE_PERL%%/MIME/Tools/config.pod -%%SITE_PERL%%/MIME/Tools/diag.pod -%%SITE_PERL%%/MIME/Tools/faq.pod -%%SITE_PERL%%/MIME/Tools/overview.pod -%%SITE_PERL%%/MIME/Tools/primer.pod -%%SITE_PERL%%/MIME/Tools/tips.pod -%%SITE_PERL%%/MIME/Tools/traps.pod -%%SITE_PERL%%/MIME/Tools/tricks.pod %%SITE_PERL%%/MIME/WordDecoder.pm %%SITE_PERL%%/MIME/Words.pm %%SITE_PERL%%/%%PERL_ARCH%%/auto/MIME-tools/.packlist @@ -47,5 +24,4 @@ @dirrm %%SITE_PERL%%/MIME/Field @dirrm %%SITE_PERL%%/MIME/Decoder @dirrm %%SITE_PERL%%/MIME/Parser -@dirrm %%SITE_PERL%%/MIME/Tools @unexec rmdir %D/%%SITE_PERL%%/MIME 2>/dev/null || true |