From owner-freebsd-ports@FreeBSD.ORG Wed Jul 27 02:42:32 2005 Return-Path: X-Original-To: ports@freebsd.org 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 7E30216A41F for ; Wed, 27 Jul 2005 02:42:32 +0000 (GMT) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [207.200.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4329543D45 for ; Wed, 27 Jul 2005 02:42:31 +0000 (GMT) (envelope-from linimon@lonesome.com) Received: by mail.soaustin.net (Postfix, from userid 502) id 24ED629E5; Tue, 26 Jul 2005 21:42:31 -0500 (CDT) Date: Tue, 26 Jul 2005 21:42:31 -0500 To: Mikhail Teterin Message-ID: <20050727024231.GA18447@soaustin.net> References: <200507262156.43233.mi+mx@aldan.algebra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507262156.43233.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.5.9i From: linimon@lonesome.com (Mark Linimon) Cc: ports@freebsd.org Subject: Re: a portlint dilemma X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2005 02:42:32 -0000 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