[MacPorts] #34784: Add perl5.branches to all p5 ports (adding p5.16 for perl5.16)
Bjarne D Mathiesen
macintosh at mathiesen.info
Thu Jun 7 19:37:05 PDT 2012
Ryan Schmidt wrote:
>
> On Jun 7, 2012, at 20:31, Bjarne D Mathiesen wrote:
>
>> Ryan Schmidt wrote:
>>
>>> The way the perl5 portgroup is currently written, the perl5.branches line must appear before the perl5.setup line. I think it would be nice if it could appear after that line, but that would require changes to the perl5 portgroup, possibly large changes, such as the large changes I had to make to turn the php 1.0 portgroup into the php 1.1 portgroup.
>>
>> so ... if we had this:
>>
>> PortGroup perl5 1.0
>> default perl5.branches {"5.8 5.10 5.12 5.14 5.16"}
>> perl5.setup YAML 0.73
>>
>> that would satisfy all the requirements ????
>
> Remove "default", the quotes, and the curly brackets.
>
> perl5.branches 5.8 5.10 5.12 5.14 5.16
The attached script ought to fix this
--
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
-------------- next part --------------
#!/macports/bin/bash
while read -a portname
do
echo -e "${portname[2]}"
cd $(dirname $(port file ${portname[0]}))
mv 'Portfile' 'Portfile.orig'
declare portrev=( $( grep 'perl5.branches' $(port file ${portname[0]}) ) )
if [[ ${#portrev[@]} -eq 0 ]]
sed -En -e "1,^PortGroup/p" portfiles/${portname[2]}/'Portfile.orig' \
> portfiles/${portname[2]}/'Portfile'
echo -e "perl5.branches 5.8 5.10 5.12 5.14 5.16" \
>> portfiles/${portname[2]}/'Portfile'
sed -E -e "1,${chksumLine}/d" portfiles/${portname[2]}/'Portfile.orig' \
>> portfiles/${portname[2]}/'Portfile'
else
sed -E -e "/^perl5.branches/s/^(.*)$/\1 5.16/" \
portfiles/${portname[2]}/'Portfile.orig' \
> portfiles/${portname[2]}/'Portfile'
fi
rm 'Portfile.orig'
done < <( port list name:^p5- )
More information about the macports-dev
mailing list