Ignore:
Timestamp:
Aug 9, 2016, 5:12:56 AM (3 years ago)
Author:
devans@…
Message:

perl5 portgroup: transparently handle version strings passed to perl5.setup as perl v-strings, eliminates the need for per port workarounds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/perl5-1.0.tcl

    r150321 r151160  
    299299}
    300300
    301 # Convert a floating-point version to a dotted-integer one.
     301# Convert a floating-point version to an equivalent dotted decimal one.
     302# If version is expressed as a perl v-string, strip the leading "v"
    302303proc perl5_convert_version {vers} {
     304    if {[string index $vers 0] eq "v"} {
     305        set start 1
     306    } else {
     307        set start 0
     308    }
    303309    set index [string first . $vers]
    304310    set other_dot [string first . [string range $vers [expr {$index + 1}] end]]
    305311    if {$index == -1 || $other_dot != -1} {
    306         return $vers
    307     }
    308     set ret [string range $vers 0 [expr {$index - 1}]]
     312        return [string range $vers $start end]
     313    }
     314    set ret [string range $vers $start [expr {$index - 1}]]
    309315    incr index
    310316    set fractional [string range $vers $index end]
Note: See TracChangeset for help on using the changeset viewer.