"Daniel J. Luke" <dluke@geeklair.net> on Sunday, January 28, 2007 at 11:46 AM -0800 wrote:
Is there a way to get the results of an external command into a variable in a portfile?
Yep.
Take a look at PYTHON_PATH in the subversion-pythonbindings port for one way to do this sort of thing.
Ok, will do. Thanks.
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.
I don't think it's worthwhile to add it to base/ since it's relatively easy for the portfiles get their own information if they need it.
Perhaps there is another option, which did not occur to me until now. I put smokeping (the app for which I'd like to use ${sitearch}) in the net category, but really I suppose there is no reason why I couldn't categorize it as perl and net categories and just use the perl5 portgroup, then I'd have access to {sitearch}. It is a perl application, though it requires no compiling at all and is used to monitor networks. Is this valid reasoning? If so ... Could I just add "PortGroup perl5 1.0" to my portfile? If so should it be in dports/perl or is adding "perl" as a virtual or secondary category sufficient to use the perl5 portgroup? Mark