From owner-freebsd-ports@FreeBSD.ORG Sun Mar 28 03:22:45 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6296416A4CE for ; Sun, 28 Mar 2004 03:22:45 -0800 (PST) Received: from smtp2.netcologne.de (smtp2.netcologne.de [194.8.194.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0590943D1F for ; Sun, 28 Mar 2004 03:22:45 -0800 (PST) (envelope-from tmseck-lists@netcologne.de) Received: from laurel.tmseck.homedns.org (xdsl-213-196-212-240.netcologne.de [213.196.212.240]) by smtp2.netcologne.de (Postfix) with SMTP id 1F05C3A1C2 for ; Sun, 28 Mar 2004 13:22:43 +0200 (MEST) Received: (qmail 650 invoked by uid 1001); 28 Mar 2004 11:22:50 -0000 Date: Sun, 28 Mar 2004 13:22:28 +0200 From: Thomas-Martin Seck To: Pav Lucistnik Message-ID: <20040328112228.GA593@laurel.tmseck.homedns.org> References: <20040327200136.31711.qmail@laurel.tmseck.homedns.org> <1080436501.75008.5.camel@hood.oook.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1080436501.75008.5.camel@hood.oook.cz> User-Agent: Mutt/1.4.2.1i Organization: private site in Germany X-PGP-KeyID: DF46EE05 X-PGP-Fingerprint: A38F AE66 6B11 6EB9 5D1A B67D 2444 2FE1 DF46 EE05 X-Attribution: tms cc: freebsd-ports@FreeBSD.org Subject: Re: treating OPTIONS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 11:22:45 -0000 * Pav Lucistnik (pav@FreeBSD.org): > V so, 27. 03. 2004 v 21:01, Thomas-Martin Seck pí¨e: > > > * SADA Kenji [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. 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.