Can't access configure.env in portfile

Ryan Schmidt ryandesign at macports.org
Sun Nov 29 06:33:26 PST 2009


I feel like what I'm doing should work, but it doesn't. I want to access the variable ${configure.env}. But whenever I do, I only get values I've added to it with configure.env-append; I don't get the tons of values MacPorts adds automatically, which are the ones I'm actually interested in. Using the attached test portfile, I get:


--->  Configuring test
DEBUG: Using compiler 'Mac OS X gcc 4.2'
DEBUG: Executing proc-pre-org.macports.configure-configure-0
DEBUG: configure.env: FOO=bar
DEBUG: Executing org.macports.configure (test)
DEBUG: Environment: CFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m64' LDFLAGS='-L/opt/local/lib' FCFLAGS='-O2 -m64' OBJC='/usr/bin/gcc-4.2' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' FOO='bar' CC='/usr/bin/gcc-4.2'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_private_tmp/work/test-1.0" && true --prefix=/opt/local'
DEBUG: Executing proc-post-org.macports.configure-configure-0
DEBUG: configure.env: FOO=bar


See, both before and after the configure phase, configure.env only contains the "FOO=bar" variable I added. But what I actually want to know about are the CFLAGS, CPPFLAGS, CXXFLAGS, etc. that MacPorts sets automatically. Yes, I know we have separate variables ${configure.cflags}, ${configure.cppflags}, ${configure.cxxflags}, etc. for most (all?) of those, but I'd rather not have to enumerate over them myself since to my mind MacPorts should have already done so for me somewhere.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 250 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20091129/ed64a07b/attachment.obj>


More information about the macports-dev mailing list