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

larryv at macports.org larryv at macports.org
Sat Dec 27 16:31:35 PST 2014


Revision: 130161
          https://trac.macports.org/changeset/130161
Author:   larryv at macports.org
Date:     2014-12-27 16:31:35 -0800 (Sat, 27 Dec 2014)
Log Message:
-----------
Perl graveyard: Require full names of superports (#46322)

Accommodating the Perl modules that have the same names as Tcl commands
isn't worth it. We'll just list them with the leading "p5-" and go from
there.

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

Modified: trunk/dports/perl/p5-graveyard/Portfile
===================================================================
--- trunk/dports/perl/p5-graveyard/Portfile	2014-12-27 20:31:31 UTC (rev 130160)
+++ trunk/dports/perl/p5-graveyard/Portfile	2014-12-28 00:31:35 UTC (rev 130161)
@@ -14,28 +14,18 @@
     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
     }
-    foreach series [lassign $args port vers] {
-        lassign [split $vers _] ver rev
-        if {$rev eq ""} {
-            set rev 0
-        }
+    set replaced [lassign $args port vers]
+    regsub ^p5- $port {} port
+    lassign [split $vers _] ver rev
+    if {$rev eq ""} {
+        set rev 0
+    }
+    foreach series $replaced {
         set repl $replacements($series)
         subport p${series}-$port {
             version $ver
@@ -43,18 +33,13 @@
             replaced_by py${repl}-$port
         }
     }
-    handle_unfortunate_port_names hide
 }
 
-handle_unfortunate_port_names hide
 
-
-# SUBPORT (without "p5*-" prefix)   VERSION+REV     REPLACED SERIES (defaults
+# SUPERPORT (i.e., "p5-whatever")   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/9c4aa56c/attachment.html>


More information about the macports-changes mailing list