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

Bjarne D Mathiesen macintosh at mathiesen.info
Wed May 16 02:15:24 PDT 2012


Joshua Root wrote:
> On 2012-5-16 11:01 , Bjarne D Mathiesen wrote:
>> I'ld like to return to my orignal problem :
>> 	making ports independent of which version of Perl is installed
>> 	-or-
>> 	the major one
>>
>> So - my question still stands : are you interested in me doing the basic
>> hard work in making ports that are hardcoded to a specific Perl5 version
>> independent of which version is installed or the major one ???
> 
> Your idea won't work right. If the path to an arbitrary perl is inserted
> into any of the files installed by the port, the build is no longer
> repeatable.

Could you give an example ???
For the two ports I've personal experience with my modification seems to
work perfectly

I'm of course aware, than when switching / upgrading to another version
of Perl all of the ports defined in this way will have to be rebuilt,
but that's no different from what we already have with the p5.xx-{mod}
ports.

When I personally swithced from Perl 5.12 to Perl 5.14 I had to do this:

port -s install perl5.14

# find & upgrade from p5.12 -> p5.14
port installed \
| grep p5.12 \
| while read portname version active
do
    port -f deactivate ${portname}
    port -f -s install ${portname/12/14}
done

# use perl5 port to switch to perl 5.14

# use cpan to initialise again
cpan
port -f uninstall perl5.12

# find & upgrade ports dependent on a p5.12 module
( ( port installed \
| grep p5.12 \
| while read portname version active
do
    port -q dependents ${portname}
done ) \
| sort \
| uniq \
| grep -v p5.12 ) |
xargs -n1 port -s -n upgrade --force

# this is possibly overkill
cpan -l | while read module version
do
    cpan -f -i ${module}
done

# force uninstall inactive ports
port -q installed \
| sed -E -e '/active/d' \
| xargs -n2 port -f uninstall


:-)
-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3


More information about the macports-dev mailing list