[enhancement] proposal - make all ports independent of which version of Perl is installed or the major one

Bradley Giesbrecht pixilla at macports.org
Sun May 27 19:40:27 PDT 2012


On May 27, 2012, at 2:29 PM, Lawrence Velázquez wrote:

> On May 25, 2012, at 11:02 a.m., Bradley Giesbrecht wrote:
> 
>> https://trac.macports.org/attachment/ticket/34617/patch-perl5.xx.diff
>> 
>> The patch looks reasonable to me. I look forward to hearing what others think.
> 
> As has been pointed out several times already, using ${perl5.major} in these ports makes their builds unrepeatable.

I was wrong in thinking ${perl5.major} would be what ever the default of the perl5 portgroup was.

Shouldn't perl5.default_branch be a static version?
_resources/port1.0/group/perl5-1.0.tcl:
...
options perl5.default_branch perl5.branches
default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
default perl5.default_branch {[perl5_get_default_branch]}
proc perl5_get_default_branch {} {
    global prefix
    # use whatever ${prefix}/bin/perl5 was chosen, and if none, fall back to 5.12
    if {![catch {set val [lindex [split [exec ${prefix}/bin/perl5 -V:version] {'}] 1]}]} {
        return [join [lrange [split $val .] 0 1] .]
    } else {
        return 5.12
    }
}
...
default perl5.major {${perl5.default_branch}}
...

Regards,
Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120527/2d70259d/attachment.bin>


More information about the macports-dev mailing list