treating OPTIONS

Thomas-Martin Seck tmseck-lists at
Sun Mar 28 03:22:45 PST 2004

* Pav Lucistnik (pav at

> V so, 27. 03. 2004 v 21:01, Thomas-Martin Seck píše:
> > * SADA Kenji <sada at> [gmane.os.freebsd.devel.ports]:
> > 
> > > .if exists(${LOCALBASE}/lib/
> > > WITH_LDAP=      yes
> > > OPTIONS+=       LDAP "Support for LDAP queries" on
> > > .else
> > > OPTIONS+=       LDAP "Support for LDAP queries" off
> > > .endif
> > 
> > Please do not do this. IMHO, ports that autotune themselves are a bad
> > idea and abusing OPTIONS for this is even worse. If you - as the
> > maintainer - decide that LDAP support is optional, default the port to
> > not include it. Period. If the user wants LDAP she can always say so
> > herself, either via the commandline or via 'make config'.
> Why not? This is a common practice that port autodetects optional
> dependencies and automatically enable/disable them.

Unfortunately, yes. I consider it a bad practice. Why? Because most if
not all maintainers who implement this do not do it correctly, i.e. they
do not provide means to override the autodetection. I stumbled over this
when I tested squid's LDAP integration and thus had to install
openldap-client in my build environment. When I installed GPG there to
check signed distfiles, GPG meant it should depend on openldap-client,
too.  And there is no means to turn this off. There are a lot of other
examples in the tree. No, I did not write a PR yet.

Autodetection is not bad as such, but it needs to be overridable and it
should not be allowed to mess with OPTIONS.

More information about the freebsd-ports mailing list