On Feb 7, 2013, at 16:39, Aljaž Srebrnič wrote: > On 07/feb/2013, at 19:23, Ryan Schmidt wrote: > >> On Feb 7, 2013, at 07:32, [email protected] wrote: >> >>> Revision: 102707 >>> https://trac.macports.org/changeset/102707 >>> Author: [email protected] >>> Date: 2013-02-07 05:32:37 -0800 (Thu, 07 Feb 2013) >>> Log Message: >>> ----------- >>> graphics/tiv: >>> new port, Terminal Image Viewer >>> >>> Added Paths: >>> ----------- >>> trunk/dports/graphics/tiv/ >>> trunk/dports/graphics/tiv/Portfile >> >> >>> +use_configure no >>> + >>> +pre-build { >>> + build.args CC=${configure.cc} \ >>> + CXX=${configure.cxx} >>> +} >> >> FYI this doesn't need to be in a pre-build block, since these variables >> aren't being affected by variants elsewhere in the port. > > I thought so, too, but I found that snippet somewhere in the wiki… :/
Yes, here: https://trac.macports.org/wiki/PortfileRecipes#gcc Read it carefully: "Setting configure.compiler changes the values MacPorts puts in variables like ${configure.cc}, ${configure.cxx}, ${configure.f77}, etc., which MacPorts automatically sets as environment variables during the configure phase. If the software in question doesn't use the configure phase, and you therefore need to pass these variables to the build phase, you must do so in a pre-build block; if you try to do so directly in the portfile body, you'll pick up the original values, before the variant changed them." Since there are no compiler variants in your port, that reasoning does not apply in your case. _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
