variables and external commands in portfiles - was ${perl5.lib}

Mark Duling mark.duling at biola.edu
Sat Jan 27 17:16:35 PST 2007


>On Jan 26, 2007, at 3:15 PM, Mark Duling wrote:
>>>> Can I use variable ${perl5.lib} in portfiles?  I could just try it
>>>> but I'm
>>>> curious and I don't have time to test it right now.  If so I can
>>>> add it to
>>>> the port man page after x11prefix in the RUNTIME VARIABLES section.
>>>
>>> It's set in the perl5 group code, so you can only use it in portfiles
>>> that make use of the perl group code.
>>
>> Oh right.  I should have known that.  Well in a non-perl port, I  
>> guess I
>> could use perl -V system calls to get it in a non-hardcoded way  
>> since I
>> don't want to update a port for a new perl release.

Is there a way to get the results of an external command into a variable
in a portfile?  I have a port that needs to set the path to 'perl
-V:sitearch'.  I can hardcode it for perl 5.8.8 for now, but I don't want
to have to update it for every perl update.

It seems that the freebsd ports sytem has access for perl variables even
for non-perl ports.  Would that be easy to hack onto MaPorts?  It would be
nice but I don't know the pros and cons.

Mark




More information about the macports-dev mailing list