(Per a request from koobs on irc)
Currently the only way to specify make.conf variables (other than port options which have their own mechanism) in a per-port fashion is to use conditionals on .CURDIR, which is fragile since it tends to involve assumptions about where the ports tree is mounted.
Instead, allow category_portname_VARS= to be set in make.conf to provide arbitrary assignments when building a specified port. For example one might use
This is intended to be consistent with the existing category_portname_SET= variables for port options, and uses the same syntax for values as option_VARS= in port makefiles, but without the case-folding behavior since that makes it impossible to handle mixed-case or lowercase variable names.
VAR+=val can be used to append to a variable, and VAR@ to unset one entirely.