ENV to macports

Rainer Müller raimue at macports.org
Tue Feb 3 18:46:37 PST 2009


Bradley Giesbrecht wrote:
> If your building a Portfile here is a piece of the postfix Portfile:
> 
> variant ldap description "add ldap support via openldap" {
>      depends_lib-append  port:openldap
>      set CCARGS      [concat ${CCARGS} -DHAS_LDAP]
>      set AUXLIBS     [concat ${AUXLIBS} -lldap -llber]
> }

`set' does not affect the environment at all, these are just local Tcl
variables.

If you need special variables in the environment for building, specify
configure.env (and build.env) in the Portfile. But also note there are
predefined options to set CFLAGS, LDFLAGS and others, namely
configure.cflags, configure.ldflags, etc. They should be preferred over
manipulating configure.env.

They are explained in the guide:
<http://guide.macports.org/#reference.phases.configure>

HTH,
Rainer


More information about the macports-users mailing list