Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2005 01:48:45 -0400
From:      Mikhail Teterin <mi+kde@aldan.algebra.com>
To:        Adam Weinberger <adamw@magnesium.net>
Cc:        ports@freebsd.org, Mark Linimon <linimon@lonesome.com>
Subject:   Re: a portlint dilemma
Message-ID:  <200507270148.46018@aldan>
In-Reply-To: <42E718FE.4070506@magnesium.net>
References:  <200507262156.43233.mi%2Bmx@aldan.algebra.com> <200507262327.24793.mi%2Bmx@aldan.algebra.com> <42E718FE.4070506@magnesium.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 27 July 2005 01:17 am, Adam Weinberger wrote:
= That is indeed a very good - albeit sneaky - trick!

I wonder, what portlint's intention is in this case. Is it to really
prevent things like I wanted in GraphicsMagick or just to make ports'
Makefiles more uniform (in which case this should be a warning, not a
"fatal" error).

= The main problem that I find with the OPTIONS chicken-and-egg problem
= is that you can't modify OPTIONS based on the presence of files
= because, when OPTIONS processing takes place, LOCALBASE and X11BASE
= aren't defined. Do you have a good sneaky trick for that case?

There is no chicken-and-egg problem, because the variables are not
expanded until used (or until assigned to others with ``:='').

How about:

	OPTIONS=MEOW "Use libMEOW for additional purring?" ${MEOW}

	.include <bsd.ports.pre.mk>
	.if exists(${LOCALBASE}/lib/libMEOW.so)
	MEOW=	on
	.else
	MEOW=	off
	.endif
	.include <bsd.ports.post.mk>

Does this work? Is it, what you are asking about?

	-mi





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