From owner-freebsd-ports@FreeBSD.ORG Wed Oct 10 15:52:49 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E84A9A8F for ; Wed, 10 Oct 2012 15:52:49 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 44CC68FC18 for ; Wed, 10 Oct 2012 15:52:48 +0000 (UTC) Received: (qmail 42549 invoked by uid 89); 10 Oct 2012 15:52:48 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@80.190.102.230) by mail.grem.de with ESMTPA; 10 Oct 2012 15:52:48 -0000 Date: Wed, 10 Oct 2012 17:52:48 +0200 From: Michael Gmelin To: freebsd-ports@freebsd.org Subject: Re: HAVE_GNOME vs. bsd.ports.options.mk Message-ID: <20121010175248.19675251@bsd64.grem.de> In-Reply-To: References: <20121010121850.039fb6d2@bsd64.grem.de> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 15:52:50 -0000 On Wed, 10 Oct 2012 16:40:39 +0100 Chris Rees wrote: > On 10 Oct 2012 11:19, "Michael Gmelin" wrote: > > > > Hi > > > > I noticed that HAVE_GNOME doesn't work properly with > > bsd.ports.options.mk yet, so > > > > .include > > .if ${HAVE_GNOME:Mgnomelibs}!="" > > # ... > > .endif > > .include > > > > won't work, while this > > > > .include > > .if ${HAVE_GNOME:Mgnomelibs}!="" > > # ... > > .endif > > .include > > > > does. > > > > AFAIK bsd.port.pre.mk/bsd.port.post.mk should be replaced by > > bsd.port.options.mk/bsd.port.mk in the long term, so having this > > work or documenting a workaround would help port maintainers who are > > in the process of updating the port structure. > > No. They are two separate methods with two different reasons for > using them. > > You have discovered a case of pre.mk being the correct one to use, > which is unusual :) > > Chris > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to > "freebsd-ports-unsubscribe@freebsd.org" In which case the Porter's Handbook gives little to no advice what the actual differences are. The only time bsd.port.options.mk is mentioned is in the context of OptionsNG (5.12.2.2) where it says: "OPTIONS definitions must appear before the inclusion of bsd.port.options.mk. The PORT_OPTIONS variable can only be tested after the inclusion of bsd.port.options.mk. Inclusion of bsd.port.pre.mk can be used instead, too, and is still widely used in ports written before the introduction of bsd.port.options.mk. But be aware that some variables will not work as expected after the inclusion of bsd.port.pre.mk, typically some USE_* flags." Which sounds to me like: "Yes, you can still use bsd.port.pre.mk, but it's the old way of doing things and expect bad things to happen." It would probably make sense to refine that section in the Porter's Handbook - I know that this is a moving target right now, but since it is it either needs to be adapted or at least fact that this is the case should be stated somewhere (potentially with a link to the wiki). I would be willing to propose a refined version of this section in the Porter's Handbook - might take me a while though since I'm pretty busy at the moment. But if nobody else has the resources I would do it myself for the sake of making things easier for maintainers. Michael -- Michael Gmelin