Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Mar 2004 19:13:52 +0100
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        SADA Kenji <sada@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: treating OPTIONS
Message-ID:  <4065C460.1000609@fillmore-labs.com>
In-Reply-To: <20040328023952.06ffa2ce.sada@FreeBSD.org>
References:  <20040328023952.06ffa2ce.sada@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4065C460.1000609>