[67093] trunk/dports/lang/perl5.8/Portfile

ricci at macports.org ricci at macports.org
Wed Apr 28 16:54:56 PDT 2010


Revision: 67093
          http://trac.macports.org/changeset/67093
Author:   ricci at macports.org
Date:     2010-04-28 16:54:52 -0700 (Wed, 28 Apr 2010)
Log Message:
-----------
add conflicts w/ perl5.10 and perl5.12
add variant +mangle_names to avoid conflicts w/ perl5.10 and perl5.12

Modified Paths:
--------------
    trunk/dports/lang/perl5.8/Portfile

Modified: trunk/dports/lang/perl5.8/Portfile
===================================================================
--- trunk/dports/lang/perl5.8/Portfile	2010-04-28 23:47:48 UTC (rev 67092)
+++ trunk/dports/lang/perl5.8/Portfile	2010-04-28 23:54:52 UTC (rev 67093)
@@ -4,6 +4,7 @@
 PortSystem      1.0
 
 name            perl5.8
+conflicts       perl5.10 perl5.12
 version         5.8.9
 revision        3
 categories      lang
@@ -113,6 +114,31 @@
     }
 }
 
+variant mangle_names description {mangle the installed names by appending -5.8 to avoid conflicting with perl5.10 and perl5.12} {
+    conflicts-delete perl5.10
+    conflicts-delete perl5.12
+    post-destroot {
+        file delete ${destroot}${prefix}/bin/perl
+        set branch [join [lrange [split ${version} .] 0 1] .]
+        foreach bin [glob ${destroot}${prefix}/bin/*] {
+            if {$bin != "${destroot}${prefix}/bin/perl${version}"} {
+                move ${bin} ${bin}-${branch}
+            }
+        }
+    
+        ln -s ${prefix}/bin/perl${version} ${destroot}${prefix}/bin/$name
+    
+        foreach man1File [glob ${destroot}${prefix}/share/man/man1p/*] {
+            regexp (.*)(\.1.*) ${man1File} -> program suffix
+            file rename ${man1File} ${program}-${branch}${suffix}
+        }
+        foreach man3File [glob ${destroot}${prefix}/share/man/man3p/*] {
+            regexp (.*)(\.3.*) ${man3File} -> program suffix
+            file rename ${man3File} ${program}-${branch}${suffix}
+        }
+    }
+}
+
 livecheck.type  regex
 livecheck.url   http://www.cpan.org/src
 livecheck.regex {perl-(5\.8\.\d)\.}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100428/f1ea0b45/attachment.html>


More information about the macports-changes mailing list