On Sep 4, 2012, at 6:05 PM, Bradley Giesbrecht wrote:

> This perl5 portgroup proc does not handle this version correctly:
> 
> # convert a floating point version to an dotted-integer one
> proc perl5_convert_version {vers} {
>    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
>    }
>    set ret [string range $vers 0 [expr $index - 1]]
>    incr index
>    set fractional [string range $vers $index end]
>    set index 0
>    while {$index < [string length $fractional] || $index < 6} {
>        set sub [string range $fractional $index [expr $index + 2]]
>        if {[string length $sub] < 3} {
>            append sub [string repeat "0" [expr 3 - [string length $sub]]]
>        }
>        append ret ".[scan $sub %u]"
>        incr index 3
>    }
>    return $ret
> }
> set perl5.moduleversion 1.03ii
> puts [perl5_convert_version ${perl5.moduleversion}]
> 1.3.{}
> 
> 
> Manually setting the version after "perl5.setup" fixes the problem.
> 
> I was wondering if there is any code in base or another portgroup that might 
> handle this better.
> 
> Would simply shifting a run of alpha characters off the right at the 
> beginning and adding them back the result at the end work?

https://trac.macports.org/attachment/ticket/35976/patch-perl5-1.0-alpha-ending-vers.diff

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to