perl5.8 fixup

Bradley Giesbrecht brad at pixilla.com
Sat Mar 7 08:17:29 PST 2009


On Mar 7, 2009, at 1:11 AM, Ryan Schmidt wrote:

> On Mar 6, 2009, at 20:22, Bradley Giesbrecht wrote:
>
>> How about creating a Portfile for ALL the perl5.8 modules,
>
> Did you mean a single portfile containing all perl5.8 modules, or  
> individual portfiles for each perl5.8 module? I would be in favor of  
> the latter.

Individual port files.

>> make them all depends of perl5.8,
>
> Did you mean that the perl5.8 port would declare dependencies on  
> each of these perl5.8 module ports, e.g. "depends_lib-append p5-some- 
> module"? If so, I don't think that can work, since the modules  
> require perl5.8 to build.

True, so can we make a wrapper port that:
depends_lib-append perl5 all_the_default_p5's

So you can't run "port depends_lib-append" for post-destroot?

>> unregistering them from perl5.8 and registering the module on there  
>> own.
>> Then those p5 modules that existed before can replace the ones  
>> created from the perl5.8 base modules with a higher revision number.
>>
>> Then a port upgrade installed should work to upgrade all the p5  
>> modules with newer versions that have been added.
>
> If we make perl5.8 install no modules of its own and move all  
> modules to their own ports, then each port that uses any of the  
> standard formerly-built-in modules will have to now declare  
> dependencies on the formerly-built-in modules' new ports.

Make pseudo port perl5-p5-base. Installs all the formerly-built-in  
modules. Add port perl5-p5-base as a depends_lib to each and every p5  
that is not in the perl5-p5-base group of ports. Over time it would be  
nice to have the non-base p5's depend directly on the p5 as opposed to  
the perl5-p5-base port.

It would be nice to have a way of adding these types of modules (could  
also be python and others) in a post-destroot phase and not have them  
be required or registered to the port itself like so:

perl5:Portfile

default_variants +perl5-p5-base

variant perl5-p5-base description {"Install default perl modules"} {
     set p5-base {"p5-mod1","p5-mod2"}
}

post-destroot {
     if {[variant_isset perl5-p5-base]} {
         foreach p5_module $p5-base} {
             port install $p5_module
         }
     }
}


//Brad


More information about the macports-dev mailing list