diff options
author | Michael Cummings <mcummings@gentoo.org> | 2006-09-06 14:38:07 +0000 |
---|---|---|
committer | Michael Cummings <mcummings@gentoo.org> | 2006-09-06 14:38:07 +0000 |
commit | 31980782e8b57818818a893decfa1dbcb8d2d5d5 (patch) | |
tree | b88a47a52b6beb9892dd79d0123efc49e595ab96 /dev-perl/File-MimeInfo/files | |
parent | updated patch and added patch for openssl 0.9.8 issue (diff) | |
download | gentoo-2-31980782e8b57818818a893decfa1dbcb8d2d5d5.tar.gz gentoo-2-31980782e8b57818818a893decfa1dbcb8d2d5d5.tar.bz2 gentoo-2-31980782e8b57818818a893decfa1dbcb8d2d5d5.zip |
Bump for a bug in how File-MimeInfo handles utf8 in weird circumstances. Filed upstream as http://rt.cpan.org/Public/Bug/Display.html?id=20376 - noticed when running filer ; Patched test01 for flakiness in detecting plain/text.
(Portage version: 2.1.1_rc1-r3)
Diffstat (limited to 'dev-perl/File-MimeInfo/files')
-rw-r--r-- | dev-perl/File-MimeInfo/files/digest-File-MimeInfo-0.13-r1 | 3 | ||||
-rw-r--r-- | dev-perl/File-MimeInfo/files/mimeinfo.patch | 19 | ||||
-rw-r--r-- | dev-perl/File-MimeInfo/files/test01.patch | 8 |
3 files changed, 30 insertions, 0 deletions
diff --git a/dev-perl/File-MimeInfo/files/digest-File-MimeInfo-0.13-r1 b/dev-perl/File-MimeInfo/files/digest-File-MimeInfo-0.13-r1 new file mode 100644 index 000000000000..0e3e4be2bae4 --- /dev/null +++ b/dev-perl/File-MimeInfo/files/digest-File-MimeInfo-0.13-r1 @@ -0,0 +1,3 @@ +MD5 f87b07e1608f4380bb3f53154ac671bb File-MimeInfo-0.13.tar.gz 24327 +RMD160 03de4611611c2b4b0042682a87001b5a3a407dd7 File-MimeInfo-0.13.tar.gz 24327 +SHA256 e7ca658a1b8da4ed2e93656449317b6108c6743b1dce51426ed78681657e9170 File-MimeInfo-0.13.tar.gz 24327 diff --git a/dev-perl/File-MimeInfo/files/mimeinfo.patch b/dev-perl/File-MimeInfo/files/mimeinfo.patch new file mode 100644 index 000000000000..50f7917476e4 --- /dev/null +++ b/dev-perl/File-MimeInfo/files/mimeinfo.patch @@ -0,0 +1,19 @@ +--- File-MimeInfo-0.13.orig/MimeInfo.pm 2006-07-09 10:57:47.000000000 -0400 ++++ File-MimeInfo-0.13/MimeInfo.pm 2006-07-09 10:59:12.000000000 -0400 +@@ -116,8 +116,14 @@ sub default { + + { + no warnings; # warnings can be thrown when input is neither ascii or utf8 +- $line =~ s/\s//g; # \n and \t are also control chars +- return 'text/plain' unless $line =~ /[\x00-\x1F\xF7]/; ++ if ($] < 5.008) { ++ $line =~ s/([^\0-\x7F])/do {my $o = ord($1); sprintf("%c%c", 0xc0 | ($o >> 6), 0x80 | ($o & 0x3f)) }/ge; ++ } ++ else ++ { ++ utf8::encode($line) ++ } ++ return 'text/plain' unless $line =~ /[\x00-\x1F\xF7]/; + } + print STDERR "> First 10 bytes of the file contain control chars\n" if $DEBUG; + return 'application/octet-stream'; diff --git a/dev-perl/File-MimeInfo/files/test01.patch b/dev-perl/File-MimeInfo/files/test01.patch new file mode 100644 index 000000000000..b5f5ce41ac42 --- /dev/null +++ b/dev-perl/File-MimeInfo/files/test01.patch @@ -0,0 +1,8 @@ +diff -Naurp File-MimeInfo-0.13/t/default/plain_text File-MimeInfo-0.13.new/t/default/plain_text +--- File-MimeInfo-0.13/t/default/plain_text 2003-07-12 12:39:39.000000000 -0400 ++++ File-MimeInfo-0.13.new/t/default/plain_text 2006-09-06 10:19:44.000000000 -0400 +@@ -1,4 +1 @@ +- + This is a plain text file +- +- |