ENV to macports

Joshua Root jmr at macports.org
Tue Feb 3 19:34:35 PST 2009

Timothy Lee wrote:
> Is it possible to 'pass in' environment variables to the 'port install'
> command?
> Or is the only way to pass something like CFLAGS to macports is through
> a portfile?
> For example... I would like to
> $sudo port install pan2 CFLAGS="-isysroot /Developers/SDKs/MacOSX10.4u.sdk"
> thoughts?

Why do you need to set the sysroot? The universal_sysroot setting from
macports.conf will be used when building with the universal variant, and
when building non-universal an SDK shouldn't be needed. If pan2 does
need it for some reason, then it should be added in the portfile.

It is *possible* to tell MP to use arbitrary parts of your environment,
but it's almost certainly a bad idea.

- Josh

More information about the macports-users mailing list