[38109] trunk/base

Ryan Schmidt ryandesign at macports.org
Mon Jul 7 10:50:33 PDT 2008


On Jul 7, 2008, at 11:41, Randall Wood wrote:

> But if you are going to source some script we provide, why not let
> ports set certain expected environment variables that make
> correct-in-most-cases-but-not-ours assumptions that can be overridden
> by setting the environment. Its better than patching the upstream code
> if the code respects env. variables, and carries defaults that make
> sense in almost every other UNIX out in the wild. (Specifically, I am
> thinking of the environment variables that unless set or patched,
> cause GNOME/KDE/other-Freedesktop-spec-implementations to look for
> configuration data in /usr or /usr/local instead of /opt/local)
>
> An ideal mechanism would be something like having a port include a
> statement like:
>
> shell.env name value
>
> and having the install/uninstall phases generate/remove a file (1 for
> each supported shell environment) containing the shell-specific syntax
> for including that variable in the shell

Hmm. Well this might be useful for something else.... what about the  
case where ports want to add something to the PATH? For example  
mysql5 might like to add ${prefix}/lib/mysql5/bin to the PATH.  
apache2 might like to add ${prefix}/apache2/bin.



More information about the macports-dev mailing list