Right now, we have no standard method of making options depend on other
options. For example, many ports have an X11 option, and later options
that require X11. If the user disables X11 but chooses one of the
options that require it, the best case is that the port build stops with
a message. Worst case, it just stops.
We need a way to make options depend on others. This could be used in
the option configuration screen. If the X11 option from the example is
disabled, all the options that depend on it are also disabled. This
could also be used for groups.
Of course, it would also be evaluated after the configuration screen,
stopping with an error message if the required dependencies are not set.
Given that I don't know if this is a good way to name the variables,
something like (from emulators/virtualbox-ose):
OPTIONS_REQUIRES_X11= QT4
In the configuration screen, the QT4 option is disabled (grayed out)
unless X11 is on.
If QT4 is on but X11 is not (say, BATCH is used), the build stops with
option QT4 requires option X11
Groups (single, radio, multi, group) could be made to depend on an
option, too. The only difference would be some tuning of the message to
show the individual option names rather than the group name, which the
user can't see.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"