(un)setting environment variables from a Portfile

René J.V. Bertin rjvbertin at gmail.com
Sun Jan 11 11:43:01 PST 2015

On Sunday January 11 2015 14:26:45 Michael Dickens wrote:

Hi Michael

> This variable is designed just for the purpose you need for qt4-mac; it
> would not be difficult to add to qt5-mac if it is not already in place.
> There's probably a better way to do this, but using a simple variable is
> quick and simple. - MLD

There already is a building_qt5, but I don't see your point: that's a quick and simple way for the PortGroup file to know that it's being included in order to build Qt itself.

My specific case (turned out to be moot) was that having QTDIR set in the environment might undo MacPorts' sandboxing attempts, and let the build process pick up another Qt install. I feared that'd be particularly troublesome when building Qt, but it turns out that MacPorts already unsets the variable, somewhere.


More information about the macports-dev mailing list