Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2012 17:52:48 +0200
From:      Michael Gmelin <freebsd@grem.de>
To:        freebsd-ports@freebsd.org
Subject:   Re: HAVE_GNOME vs. bsd.ports.options.mk
Message-ID:  <20121010175248.19675251@bsd64.grem.de>
In-Reply-To: <CADLo83-K%2Bi0rU9ssWuB8K9UTXRBa478UBBP1zrzChfAmtT5J%2Bw@mail.gmail.com>
References:  <20121010121850.039fb6d2@bsd64.grem.de> <CADLo83-K%2Bi0rU9ssWuB8K9UTXRBa478UBBP1zrzChfAmtT5J%2Bw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Oct 2012 16:40:39 +0100
Chris Rees <utisoft@gmail.com> wrote:

> On 10 Oct 2012 11:19, "Michael Gmelin" <freebsd@grem.de> wrote:
> >
> > Hi
> >
> > I noticed that HAVE_GNOME doesn't work properly with
> > bsd.ports.options.mk yet, so
> >
> > .include <bsd.port.options.mk>
> > .if ${HAVE_GNOME:Mgnomelibs}!=""
> > # ...
> > .endif
> > .include <bsd.port.mk>
> >
> > won't work, while this
> >
> > .include <bsd.port.pre.mk>
> > .if ${HAVE_GNOME:Mgnomelibs}!=""
> > # ...
> > .endif
> > .include <bsd.port.post.mk>
> >
> > 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



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