[151160] trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
devans at macports.org
devans at macports.org
Mon Aug 8 22:12:57 PDT 2016
Revision: 151160
https://trac.macports.org/changeset/151160
Author: devans at macports.org
Date: 2016-08-08 22:12:56 -0700 (Mon, 08 Aug 2016)
Log Message:
-----------
perl5 portgroup: transparently handle version strings passed to perl5.setup as perl v-strings, eliminates the need for per port workarounds.
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/perl5-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2016-08-09 04:44:10 UTC (rev 151159)
+++ trunk/dports/_resources/port1.0/group/perl5-1.0.tcl 2016-08-09 05:12:56 UTC (rev 151160)
@@ -298,14 +298,20 @@
destroot.destdir --destdir=${destroot}
}
-# Convert a floating-point version to a dotted-integer one.
+# Convert a floating-point version to an equivalent dotted decimal one.
+# If version is expressed as a perl v-string, strip the leading "v"
proc perl5_convert_version {vers} {
+ if {[string index $vers 0] eq "v"} {
+ set start 1
+ } else {
+ set start 0
+ }
set index [string first . $vers]
set other_dot [string first . [string range $vers [expr {$index + 1}] end]]
if {$index == -1 || $other_dot != -1} {
- return $vers
+ return [string range $vers $start end]
}
- set ret [string range $vers 0 [expr {$index - 1}]]
+ set ret [string range $vers $start [expr {$index - 1}]]
incr index
set fractional [string range $vers $index end]
set index 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160808/6f12ed85/attachment.html>
More information about the macports-changes
mailing list