[72401] trunk/dports/lang/perl5/Portfile

Daniel J. Luke dluke at geeklair.net
Wed Oct 13 11:58:13 PDT 2010


On Oct 13, 2010, at 2:37 PM, Eric Hall wrote:
> 
> On Wed, Oct 13, 2010 at 12:45:52PM -0400, Daniel J. Luke wrote:
>> On Oct 13, 2010, at 12:27 PM, Eric Hall wrote:
>>> 
>>> 	Doh!  Yes, I'll add reminders for that.  If anyone has
>>> ideas on how to get the version from the perl5.* portfiles that
>>> would (seem to) be a better way to go about it - remove us stupid
>>> humans from the chain.
>> 
>> You could probably glob for ${prefix}/bin/perl${partial_version}
>> 
>> where ${partial_version} is 5.12 or 5.10 (or whatever new variant gets added).=
> 
> 	It seems like reading the "port contents" output would be
> better, is there a good way to get that w/o shelling out to something
> like:
> 
> env VERSION="5.12" PREFIX="/opt/local" sh -c 'port contents perl${VERSION} | egrep "${PREFIX}/bin/perl5" |  sed -E "s%${PREFIX}/bin/%%" | egrep -v "perl${VERSION}$"'

I don't think it's supported to run port from within port (and I don't think using internal port api for this is supported either).

> 	where setting of the PREFIX variable would use port's idea
> of $prefix, and VERSION based on the version we're trying to make the link for.

At the time you're making the link, you already know that the appropriate perl5.X port has been installed, and so I don't think it's unreasonable to glob for perl5.X.* (or just remember to bump the version in the perl5 port when you update the perl5.X port).

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+





More information about the macports-dev mailing list