treating OPTIONS

Oliver Eikemeier eikemeier at fillmore-labs.com
Sat Mar 27 10:13:59 PST 2004


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