Date: Tue, 26 Jul 2005 21:42:31 -0500 From: linimon@lonesome.com (Mark Linimon) To: Mikhail Teterin <mi+mx@aldan.algebra.com> Cc: ports@freebsd.org Subject: Re: a portlint dilemma Message-ID: <20050727024231.GA18447@soaustin.net> In-Reply-To: <200507262156.43233.mi%2Bmx@aldan.algebra.com> References: <200507262156.43233.mi%2Bmx@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 26, 2005 at 09:56:43PM -0400, Mikhail Teterin wrote: > I'd like to set the default value for a new port's OPTION depending on the > ARCH ("on" for i386, "off" for others). > > However, portlint would not let me. ARCH can only be used _after_ > including bsd.port.pre.mk, and OPTIONS can only be modified _before_ it. If I understand things correctly, this is a design limitation of bsd.port.mk, not a bug in portlint. The definition of ARCH is not picked up until you include bsd.port.pre.mk, so it is meaningless before then: portlint is telling you the truth here. I think what you will need to do in this case is define your own local copy of the variable (e.g. LOCAL_ARCH!=${UNAME} -p) and then define your OPTIONS from there. There are some chicken-and-egg problems like this in bsd.port.mk (well, the part that is invoked by bsd.port.pre.mk). At one time I understood which each of them was but I haven't looked at them in a long time. mcl
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050727024231.GA18447>