per-port make.conf options and hyphenated port names

Matthew Pounsett matt at conundrum.com
Tue Jan 21 01:34:19 UTC 2014


On Jan 20, 2014, at 20:01 , Matthew Pounsett <matt at conundrum.com> wrote:

> Digging through /usr/ports/Mk/ I can’t find anywhere that $UNIQUENAME is modified to guarantee that it references a safe variable name (i.e. I don’t see anywhere that $UNIQUENAME has reserved characters removed from it before use).  So, given that a lot of times $UNIQUENAME is just the name of the port, and a lot of ports have hyphens in their names, how is this meant to be dealt with?

I take back part of that last bit.  I’ve found a couple cases (bsd.tcl.mk and bsd.database.mk) that use the ${UNIQUENAME:U:S,-,_,} construction to allow setting safe variables.  bsd.port.mk doesn’t use the same construction when referencing ${$UNIQUENAME}_SET and ${$UNIQUENAME}_UNSET.

So, I’m still back at my earlier question… how is this meant to be dealt with?

Thanks.


More information about the freebsd-ports mailing list