On May 27, 2012, at 8:23 PM, Joshua Root wrote: > On 2012-5-28 12:40 , Bradley Giesbrecht wrote: >> >> 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. > > Even if it was, that still wouldn't avoid the need to use variants (or > possibly subports in some cases) to change the version of perl used.
The existing ports that are changed by the patch-perl5.xx.diff patch are hard
coded to perl5.12. I incorrectly believed that ${perl5.major} would be a static
version (currently 5.12) from the portgroup unless subports were in use, and
that when MacPorts changed it's default perl to 5.14 in the perl5 portgroup
that these ports would pick up that change.
>> 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}}
>> ...
>
> This works in the specific case of the p5-* ports because they don't
> install any files (except for a README that's just there so the destroot
> isn't empty).
Would it be advantageous to have a static default perl version the perl5
portgroup that would allow for advancing the version number in dependents?
I will submit a new patch replacing ${perl5.major} with p5.14.
Regards,
Bradley Giesbrecht (pixilla)
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
