treating OPTIONS

SADA Kenji sada at FreeBSD.org
Sat Mar 27 18:46:37 PST 2004


Please keep CC: to Xavier Beaudouin, maintainer of this port.

On 27 Mar 2004 20:01:36 -0000
tmseck-lists at netcologne.de (Thomas-Martin Seck) wrote:

> * 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'.

On Sat, 27 Mar 2004 19:13:52 +0100
Oliver Eikemeier <eikemeier at fillmore-labs.com> wrote:

> SADA Kenji wrote:
> > Please see the PR 63930
> > <http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63930>
> > 
> > it gets portlint fatal error that OPTIONS appears after the line
> > ".include <bsd.port.pre.mk>".
> >  My plan is pre-defined LOCALBASE, like:
> > 
> > ---
> > PORTNAME=       libhome
> > PORTVERSION=    0.7.1
> > PORTREVISION=   1
> > CATEGORIES=     misc
> > MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
> > MASTER_SITE_SUBDIR=     pll
> > 
> > MAINTAINER=     kiwi at oav.net
> > COMMENT=        Library providing a getpwname() emulation
> > 
> > LOCALBASE?=     ${DESTDIR}/usr/local
> > 
> > .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
> > 
> > <snip>
> > 
> > .include <bsd.port.pre.mk>
> > 
> > <snip>
> > 
> > .include <bsd.port.post.mk>
> > ---
> > 
> > This gets one portlint warning instead of many fatal errors.
> > Other options?
> 
> I'm working on a patch to OPTIONS that would make it possible to
> do this (a follow-up to PR 64233). Sorry for taking so long, I
> have quite a few other things to do.
> 
> Basically predefining LOCALBASE is bad. There are just some things
> that can't be done in a clean way now, and I would suggest to wait
> for OPTIONS handling to support proper autodetection. Until
> then you can either suspend the conversion to OPTIONS or use
> OPTIONS that do not autodetect the installed liraries.
> 
> -Oliver


More information about the freebsd-ports mailing list