[41369] trunk/dports/perl/p5-file-mimeinfo
ricci at macports.org
ricci at macports.org
Fri Oct 31 11:18:59 PDT 2008
Revision: 41369
http://trac.macports.org/changeset/41369
Author: ricci at macports.org
Date: 2008-10-31 11:18:59 -0700 (Fri, 31 Oct 2008)
Log Message:
-----------
Uprev to 0.15
rework patch to fit changed module
Modified Paths:
--------------
trunk/dports/perl/p5-file-mimeinfo/Portfile
trunk/dports/perl/p5-file-mimeinfo/files/patch-lib-File-MimeInfo.pm.diff
Modified: trunk/dports/perl/p5-file-mimeinfo/Portfile
===================================================================
--- trunk/dports/perl/p5-file-mimeinfo/Portfile 2008-10-31 18:18:04 UTC (rev 41368)
+++ trunk/dports/perl/p5-file-mimeinfo/Portfile 2008-10-31 18:18:59 UTC (rev 41369)
@@ -4,7 +4,7 @@
PortGroup perl5 1.0
-version 0.14
+version 0.15
perl5.setup File-MimeInfo ${version}
revision 0
maintainers ricci
@@ -12,8 +12,9 @@
It tries to implement the freedesktop specification for a shared MIME database.
long_description ${description}
-checksums md5 b4cb0ea1a30730c24747199784d90968 \
- sha1 5a375be72c3b9107cdb4ada65b3973bb33e4f474
+checksums md5 41fa5a252203e1d6023ab5849fd9e0df \
+ sha1 e185dd52769ec3c77cbb1eb983e49b843e5e38e5
+
platforms darwin
depends_lib port:shared-mime-info
Modified: trunk/dports/perl/p5-file-mimeinfo/files/patch-lib-File-MimeInfo.pm.diff
===================================================================
--- trunk/dports/perl/p5-file-mimeinfo/files/patch-lib-File-MimeInfo.pm.diff 2008-10-31 18:18:04 UTC (rev 41368)
+++ trunk/dports/perl/p5-file-mimeinfo/files/patch-lib-File-MimeInfo.pm.diff 2008-10-31 18:18:59 UTC (rev 41369)
@@ -1,11 +1,22 @@
---- lib/File/MimeInfo.pm.orig 2008-01-07 16:15:31.000000000 -0800
-+++ lib/File/MimeInfo.pm 2008-01-07 16:18:02.000000000 -0800
-@@ -23,6 +23,8 @@
- # $LANG can be used to set a default language for the comments
- # @DIRS can be used to specify custom database directories
-
-+## setup @DIRS to point to the DB that MacPorts installed, thus users don't have to set ENV vars and such.
-+push @DIRS, '__PREFIX__/share/mime';
- rehash(); # initialise data
-
- sub new { bless \$VERSION, shift } # what else is there to bless ?
+--- lib/File/MimeInfo.pm.orig 2008-02-13 16:38:59.000000000 -0800
++++ lib/File/MimeInfo.pm 2008-10-31 10:52:12.000000000 -0700
+@@ -136,6 +136,19 @@
+ sub rehash {
+ (@globs, %literal, %extension, %mime2ext) = (); # clear all data
+ local $_; # limit scope of $_ ... :S
++
++ ## setup @DIRS to point to the DB that MacPorts installed,
++ ## thus users don't have to set ENV vars and such.
++ my $DIRS_index = undef;
++ for ($DIRS_index = 0; $DIRS_index < @DIRS; $DIRS_index++) {
++ if ($DIRS[$DIRS_index] =~ m|__PREFIX__/share/mime|) {
++ last;
++ }
++ }
++ if ($DIRS_index >= @DIRS) {
++ ## we didn't find the MP prefix path, add it...
++ push @DIRS, '__PREFIX__/share/mime';
++ }
+ my @globfiles = @DIRS
+ ? ( grep {-e $_ && -r $_} map "$_/globs", @DIRS )
+ : ( reverse data_files('mime/globs') );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081031/486532f9/attachment-0001.html>
More information about the macports-changes
mailing list