[130128] trunk/dports/perl/p5-graveyard/Portfile

larryv at macports.org larryv at macports.org
Sat Dec 27 01:56:01 PST 2014


Revision: 130128
          https://trac.macports.org/changeset/130128
Author:   larryv at macports.org
Date:     2014-12-27 01:56:01 -0800 (Sat, 27 Dec 2014)
Log Message:
-----------
Perl graveyard: Allow module names that are Tcl commands (#46322)

So far, it's just "error", "eval", "lchown", and "switch".

Modified Paths:
--------------
    trunk/dports/perl/p5-graveyard/Portfile

Modified: trunk/dports/perl/p5-graveyard/Portfile
===================================================================
--- trunk/dports/perl/p5-graveyard/Portfile	2014-12-27 07:45:32 UTC (rev 130127)
+++ trunk/dports/perl/p5-graveyard/Portfile	2014-12-27 09:56:01 UTC (rev 130128)
@@ -14,7 +14,19 @@
     5.14 5.16
 }
 
+proc handle_unfortunate_port_names action {
+    foreach name {error eval lchown switch} {
+        # Can't use 'switch' here, for obvious reasons.
+        if {$action eq "hide"} {
+            rename $name _$name
+        } elseif {$action eq "show"} {
+            rename _$name $name
+        }
+    }
+}
+
 proc unknown args {
+    handle_unfortunate_port_names show
     upvar 1 replacements replacements
     if {[llength $args] < 3} {
         lappend args 5.8 5.10 5.12 5.14
@@ -31,11 +43,18 @@
             replaced_by py${repl}-$port
         }
     }
+    handle_unfortunate_port_names hide
 }
 
+handle_unfortunate_port_names hide
+
+
 # SUBPORT (without "p5*-" prefix)   VERSION+REV     REPLACED SERIES (defaults
 #                                                   to "5.8 5.10 5.12 5.14")
 
+
+handle_unfortunate_port_names show
+
 if {${subport} ne ${name}} {
     PortGroup obsolete 1.0
 } else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141227/b3e63416/attachment.html>


More information about the macports-changes mailing list