Ticket #43727: patch-port-group-per5-version-chars.diff

File patch-port-group-per5-version-chars.diff, 873 bytes (added by pixilla (Bradley Giesbrecht), 10 years ago)
  • _resources/port1.0/group/perl5-1.0.tcl

     
    220220
    221221# Convert a floating-point version to a dotted-integer one.
    222222proc perl5_convert_version {vers} {
     223    regexp {[^0-9\.]*$} $vers rest
     224    set vers [string range $vers 0 end-[string length ${rest}]]
    223225    set index [string first . $vers]
    224226    set other_dot [string first . [string range $vers [expr $index + 1] end]]
    225227    if {$index == -1 || $other_dot != -1} {
    226         return $vers
     228        return $vers$rest
    227229    }
    228230    set ret [string range $vers 0 [expr $index - 1]]
    229231    incr index
     
    237239        append ret ".[scan $sub %u]"
    238240        incr index 3
    239241    }
    240     return $ret
     242    return $ret$rest
    241243}