(un)setting environment variables from a Portfile

Rainer Müller raimue at macports.org
Mon Jan 12 01:24:05 PST 2015


On 2015-01-11 14:53, René J.V. Bertin wrote:
> I see MacPorts provides a set of keywords to add or delete env.
> variables to or from specific phases. Is there a (Tcl) command one
> can use to set or unset variables at an appropriate point so it's
> defined (or missing) appropriately for all subsequent steps?

The environment variables have to be set explicitly. Usually it is
enough to define them for the configure phase, but that depends on the
build system.

> If not, can one use *.env-delete to unset a variable without knowing
> its value?

There is currently no way to delete a specific environment variable
without knowing its value, since these are just handled as lists.

Rainer


More information about the macports-dev mailing list