Adding options framework variables that depend on variables coming after

Naram Qashat cyberbotx at
Mon Mar 23 15:43:26 UTC 2015

I'm wanting to add an options framework LIB_DEPENDS that depends on
variables that normally come after

In this case, I am trying to add a UTEMPTER_LIB_DEPENDS on
sysutils/libutempter, but I want to check OPSYS and OSVERSION beforehand,
since base FreeBSD 9.x contains utempter while any earlier FreeBSDs as
well as non-FreeBSD OSes don't contain it and need the port.

I cannot place the UTEMPTER_LIB_DEPENDS line after because
the options framework doesn't see it then, but I also cannot wrap it
around an if conditional using OPSYS and OSVERSION before
because those variables aren't set yet.

I've been told that there is a workaround, but I was not told what the
workaround was. Does anyone know how this can be acomplished?

More information about the freebsd-ports mailing list