treating OPTIONS

Michael Nottebrock michaelnottebrock at gmx.net
Sat Mar 27 17:40:07 PST 2004


On Sunday 28 March 2004 03:15, Pav Lucistnik wrote:
> V so, 27. 03. 2004 v 21:01, Thomas-Martin Seck píše:
> > * SADA Kenji <sada at freebsd.org> [gmane.os.freebsd.devel.ports]:
> > > .if exists(${LOCALBASE}/lib/libldap.so)
> > > 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.

Something I only realised yesterday (hi kris) is that OPTIONS do not just set 
WITH_FOO but also WITHOUT_FOO, so for autodetecting things you'd have to 
check .if exists(bar) and !defined WITHOUT_FOO then define WITH_FOO... I'm 
currently changing the KDE ports do do away with autodetection where possible 
and just enforce config instead. It makes building of customized packagas 
easier as a side effect.

-- 
   ,_,   | Michael Nottebrock               | lofi at freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040328/c41eaef5/attachment.bin


More information about the freebsd-ports mailing list