# Unison not recognising noX11 FLAVOR



## Khaine (Dec 28, 2018)

I am trying to install net/unison without x11.  I have the following in my /etc/make.conf


```
$less /etc/make.conf

# No X11
OPTIONS_UNSET += X11
```

However, when I look at the dependencies that will be installed, it looks like it is pulling in x11-toolkits/ocaml-lablgtk2 which depends on x11.  In the past there was a -nox11 build of unison that didn't pull in the x11 components, however this has been replaced with the FLAVOR.  This port doesn't appear to respect that FLAVOR.  Has anyone been able to build unison without x11?


----------



## T-Daemon (Dec 28, 2018)

net/unison without x11:

`cd /usr/ports/net/unison
make FLAVOR=nox11`

I don't know how the port managers handle the FLAVOR setting.

Info: https://wiki.freebsd.org/Ports/FlavorsTools

Note:


> 5. The chosen FLAVOR for a port origin should always be passed in as a *make argument*, not in the environment


----------



## Khaine (Dec 29, 2018)

so using make `FLAVOUR=nox11` works, but using `OPTIONS_UNSET += X11` in /etc/make.conf does not.



```
%make FLAVOR=nox11 all-depends-list
/usr/ports/ports-mgmt/pkg
/usr/ports/lang/ocaml
/usr/ports/devel/gmake
/usr/ports/devel/gettext-runtime
/usr/ports/converters/libiconv
/usr/ports/print/indexinfo
```



```
% make all-depends-list
/usr/ports/ports-mgmt/pkg
/usr/ports/lang/ocaml
/usr/ports/devel/gmake
/usr/ports/devel/gettext-runtime
/usr/ports/converters/libiconv
/usr/ports/print/indexinfo
/usr/ports/x11-toolkits/ocaml-lablgtk2
/usr/ports/devel/ocaml-findlib
/usr/ports/x11-toolkits/ocaml-labltk
/usr/ports/x11-toolkits/tk86
/usr/ports/x11/libX11
/usr/ports/devel/pkgconf
/usr/ports/devel/kyua
/usr/ports/devel/atf
/usr/ports/devel/lutok
/usr/ports/lang/lua52
/usr/ports/devel/libedit
/usr/ports/databases/sqlite3
/usr/ports/devel/readline
/usr/ports/x11/xtrans
/usr/ports/devel/xorg-macros
/usr/ports/x11/xorgproto
...
```


----------



## SirDice (Dec 31, 2018)

Khaine said:


> so using make `FLAVOUR=nox11` works, but using `OPTIONS_UNSET += X11` in /etc/make.conf does not.


Because one is a FLAVOR the other is an OPTION. They are treated and configured differently and are not exchangeable.


----------



## Khaine (Dec 31, 2018)

I'm a bit confused.  Previously, if you didn't want X11 installed (i.e. a headless server) you would set the noX11 option in make.conf.  We now have flavours which are similar, but different and don't respect options.  Is there a global way to define a flavour?  If not, for ports that have an optional X11 GUI do I need to manually specify a flavour each time I compile it?


----------



## SirDice (Dec 31, 2018)

Khaine said:


> Previously, if you didn't want X11 installed (i.e. a headless server) you would set the noX11 option in make.conf.


Previously it was an OPTION. The port has since been changed to use FLAVOR instead.



Khaine said:


> If not, for ports that have an optional X11 GUI do I need to manually specify a flavour each time I compile it?


It depends, if the port uses the OPTION framework a `OPTIONS_UNSET+=X11` is typically enough (the WITHOUT_* and WITH_* way still works but is deprecated). But this doesn't work for ports that have been converted/changed to use FLAVOR.


----------

