how to prepend or append to DYLD_LIBRARY_PATH in Portfile?

Ryan Schmidt ryandesign at macports.org
Sun Oct 25 10:06:25 UTC 2020



On Oct 24, 2020, at 21:51, Joshua Root wrote:

> On 2020-10-25 03:46 , Ken Cunningham wrote:
>> Do you think this:
>> 
>> configure.env-append        "DYLD_LIBRARY_PATH=${prefix}/lib/lilbgcc"
>> configure.env-append        “DYLD_LIBRARY_PATH=${workpath}/build”
>> 
>> should “just work" to set both without added shenanigans?
> 
> This is a very special case where "set both" makes any sense.

It could make sense. On the other hand, how is MacPorts to know that in this particular case you want both values, and that they should be separated by a colon? What if you instead really wanted to replace the first value with the second value?

> Not all
> environment variables are treated as lists and not all use the same
> separator. This aspect of the behaviour matches that of env(1) currently
> BTW.

It seems clearer to keep all environment variables behaving the same way in MacPorts and not to special case certain variable names.

When we need special cases, such as using a colon separator when turning configure.pkg_config_path into PKG_CONFIG_PATH, we can implement that for that specific option.



More information about the macports-dev mailing list