[82551] trunk/dports

jmr at macports.org jmr at macports.org
Mon Aug 15 11:12:20 PDT 2011


Revision: 82551
          http://trac.macports.org/changeset/82551
Author:   jmr at macports.org
Date:     2011-08-15 11:12:16 -0700 (Mon, 15 Aug 2011)
Log Message:
-----------
perl5 portgroup, p5-text-tabsxwrap: allow overriding name before calling perl5.setup, so invalid subport names can be avoided

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
    trunk/dports/perl/p5-text-tabsxwrap/Portfile

Modified: trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/perl5-1.0.tcl	2011-08-15 17:44:45 UTC (rev 82550)
+++ trunk/dports/_resources/port1.0/group/perl5-1.0.tcl	2011-08-15 18:12:16 UTC (rev 82551)
@@ -89,7 +89,9 @@
         set perl5.cpandir ${cpandir}
     }
 
-    name                p5-[string tolower ${perl5.module}]
+    if {![info exists name]} {
+        name            p5-[string tolower ${perl5.module}]
+    }
     version             [perl5_convert_version ${perl5.moduleversion}]
     categories          perl
     homepage            http://search.cpan.org/dist/${perl5.module}/
@@ -98,16 +100,18 @@
     distname            ${perl5.module}-${perl5.moduleversion}
     dist_subdir         perl5
 
+    set rootname        [string range $name 3 end]
+
     foreach v ${perl5.branches} {
-        subport p${v}-[string tolower ${perl5.module}] { depends_lib port:perl${v} }
+        subport p${v}-${rootname} { depends_lib port:perl${v} }
     }
 
     if {$subport == $name} {
         perl5.major
         distfiles
         supported_archs noarch
-        replaced_by p[option perl5.default_branch]-[string tolower ${perl5.module}]
-        depends_lib port:p[option perl5.default_branch]-[string tolower ${perl5.module}]
+        replaced_by p[option perl5.default_branch]-${rootname}
+        depends_lib port:p[option perl5.default_branch]-${rootname}
         use_configure no
         build {}
         destroot {

Modified: trunk/dports/perl/p5-text-tabsxwrap/Portfile
===================================================================
--- trunk/dports/perl/p5-text-tabsxwrap/Portfile	2011-08-15 17:44:45 UTC (rev 82550)
+++ trunk/dports/perl/p5-text-tabsxwrap/Portfile	2011-08-15 18:12:16 UTC (rev 82551)
@@ -4,9 +4,9 @@
 PortSystem          1.0
 PortGroup           perl5 1.0
 
+name                p5-text-tabsxwrap
 perl5.setup         Text-Tabs+Wrap 2009.0305
 revision            2
-name                p5-text-tabsxwrap
 platforms           darwin
 maintainers         l2g
 supported_archs     noarch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110815/8cc97732/attachment.html>


More information about the macports-changes mailing list