Date: Thu, 31 Jul 2014 09:54:45 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: ports@FreeBSD.org Subject: OPTIONS_REQUIRES Message-ID: <alpine.BSF.2.11.1407310936320.34015@wonkity.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1407310936320.34015>