portfile question concerning optional deps

Ryan Schmidt ryandesign at macports.org
Thu Mar 3 14:54:05 PST 2011


On Mar 3, 2011, at 16:47, Daniel J. Luke wrote:

> On Mar 3, 2011, at 5:32 PM, Ryan Schmidt wrote:
>> 
> 
>>> Do we need to audit ports that use bin/lib and see if we can just change the behavior in some future release?
>> 
>> There are occasional valid uses for wanting to allow dependencies installed outside MacPorts For example, we allow an outside MacTeX installation to satisfy. Several ports also go the extra mile and indicate that they need grep or sed, but the ones included with Mac OS X are ok.
> 
> To me, it makes more sense to have path: search $PATH (or if it's an absolute path, just look for that specific file).
> 
>> So I don't think changing the behavior of bin:- or lib:-style dependencies is warranted. Port authors just need to use the correct dependency style for what they're trying to do.
> 
> My preference would be to have path: work this way, and bin search only inside $prefix.

That would be the opposite of the way that these works today, and I can't imagine wanting to go through all thousands of ports and switch this. I would rather educate port authors as to how to use them the way they work today, and improve the documentation if needed.

path:-style doesn't search $PATH; it looks for a file at a particular path specified in the dependency, i.e. path:/usr/bin/grep:grep or path:${prefix}/bin/grep:grep. If the path is not absolute, "${prefix}/" is prepended to it.

bin:-style searches bin_path.

lib:-style does something similar for libraries.




More information about the macports-dev mailing list