option check

Jan Beich jbeich at FreeBSD.org
Wed Sep 11 08:53:47 UTC 2019


Walter Schwarzenfeld <w.schwarzenfeld at utanet.at> writes:

> I am trying to check from the Makefile if an other port has one OPTION
> on or off.
>
> Don't find a working syntax.

Unlike Gentoo requesting dependencies built with particular options set
is not supported yet. The feature has been requested for years i.e.,
soon after OPTIONS were introduced. What ports *currently* can do is
invent ad hoc check (see below), create slaves/flavors or adjust defaults.

  $ rg -g \*.mk -g Makefile\* pkg-config.\*exists
  graphics/gtk-update-icon-cache/Makefile
  43:     @if ! pkg-config --exists cairo-xlib; then \

  www/webkit2-gtk3/Makefile
  108:    @if ! pkg-config --exists cairo-egl; then \

  x11-toolkits/gtk20/Makefile
  58:     @if ! pkg-config --exists cairo-xlib; then \

  x11-toolkits/gtk30/Makefile
  96:     @if ! pkg-config --exists cairo-xlib; then \

  x11-toolkits/pango/Makefile
  50:     @if ! pkg-config --exists cairo-gobject; then \

Beware of flavors. Until variable dependencies are supported ports
cannot depend on a particular flavor without introducing conflicts.
For example, A depends on B at OPT1 while C and D depend on B; a user
would have to give up on C and D to have A installed.


More information about the freebsd-ports mailing list