[24772] trunk/dports/perl/p5-mime-tools
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 3 11:27:33 PDT 2007
Revision: 24772
http://trac.macosforge.org/projects/macports/changeset/24772
Author: ricci at macports.org
Date: 2007-05-03 11:27:32 -0700 (Thu, 03 May 2007)
Log Message:
-----------
add a patch for MIME::Parser.pm to make it a bit smarter about what filename to use from the MIME header.
bump revision so the patch will be installed by those who already have install p5-mime-tools
Modified Paths:
--------------
trunk/dports/perl/p5-mime-tools/Portfile
Added Paths:
-----------
trunk/dports/perl/p5-mime-tools/files/
trunk/dports/perl/p5-mime-tools/files/patch-lib-MIME-Parser.pm.useContentTypeName
Modified: trunk/dports/perl/p5-mime-tools/Portfile
===================================================================
--- trunk/dports/perl/p5-mime-tools/Portfile 2007-05-03 16:11:09 UTC (rev 24771)
+++ trunk/dports/perl/p5-mime-tools/Portfile 2007-05-03 18:27:32 UTC (rev 24772)
@@ -3,6 +3,7 @@
PortGroup perl5 1.0
perl5.setup MIME-tools 5.420
+revision 1
maintainers nomaintainer at macports.org
description modules for parsing (and creating!) MIME entities
long_description MIME-tools is a collection of Perl5 MIME:: modules \
@@ -13,6 +14,8 @@
checksums md5 4db6505cc0132c80c5a9cc54f443a21a
platforms darwin
+patchfiles patch-lib-MIME-Parser.pm.useContentTypeName
+
# Depends on these Perl modules
depends_lib-append port:p5-io-stringy \
port:p5-mailtools \
Added: trunk/dports/perl/p5-mime-tools/files/patch-lib-MIME-Parser.pm.useContentTypeName
===================================================================
--- trunk/dports/perl/p5-mime-tools/files/patch-lib-MIME-Parser.pm.useContentTypeName (rev 0)
+++ trunk/dports/perl/p5-mime-tools/files/patch-lib-MIME-Parser.pm.useContentTypeName 2007-05-03 18:27:32 UTC (rev 24772)
@@ -0,0 +1,32 @@
+--- lib/MIME/Parser.pm.orig 2007-05-02 13:04:15.000000000 -0700
++++ lib/MIME/Parser.pm 2007-05-02 13:06:01.000000000 -0700
+@@ -891,6 +891,7 @@
+ sub hunt_for_uuencode {
+ my ($self, $ENCODED, $ent) = @_;
+ my ($good, $how_encoded);
++ my $param_name = undef;
+ local $_;
+ $self->debug("sniffing around for UUENCODE");
+
+@@ -921,6 +922,12 @@
+ $top_ent->make_multipart;
+ my @parts;
+
++ ## 20060926EH:
++ ## capture the 'name' parameter in the Content-Type in case we don't
++ ## get a 'filename' parameter.
++ $param_name = $ent->head->mime_attr("content-type.name");
++
++
+ ### Made the first cut; on to the real stuff:
+ $ENCODED->seek(0,0) or die "$ME: can't seek: $!";
+ $self->whine("Found a $how_encoded attachment");
+@@ -932,7 +939,7 @@
+ my $out = IO::ScalarArray->new(\@bin_data);
+ eval { $decoder->decode($ENCODED, $out) }; last if $@;
+ my $preamble = $decoder->last_preamble;
+- my $filename = $decoder->last_filename;
++ my $filename = (defined($decoder->last_filename ) ? $decoder->last_filename : $param_name);
+ my $mode = $decoder->last_mode;
+
+ ### Get probable type:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070503/06cefddd/attachment.html
More information about the macports-changes
mailing list