Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2012 11:48:19 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        bf1783@gmail.com, Gerald Pfeifer <gerald@freebsd.org>, "b. f." <bf1783@googlemail.com>, freebsd-ports@freebsd.org
Subject:   Re: WITH_GCC
Message-ID:  <CACdU%2Bf_77t7GCH2hm3hwcK2i%2BTcHUq_aBP4a7SeghQhGz3soDg@mail.gmail.com>
In-Reply-To: <4FAB6E01.50108@FreeBSD.org>
References:  <CAGFTUwPUFdP=Z20%2BbL59qFuh_V6R1R-GcyrK03dxESL6ZyGz7A@mail.gmail.com> <4F578AA7.4060008@FreeBSD.org> <4F990D9A.3090100@FreeBSD.org> <4FA643FA.3050206@FreeBSD.org> <4FAB6E01.50108@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 10, 2012 at 2:28 AM, Andriy Gapon <avg@freebsd.org> wrote:
> on 06/05/2012 12:27 Andriy Gapon said the following:
>> My makefile-fu and ports-infrastructure-fu are really weak (maybe non-ex=
istent
>> even), but here is my attempt: [see the attachment].
>>
>> The idea behind the patch:
>> - if WITH_GCC is not defined, then everything should be as before
>> - if WITH_GCC is defined, but USE_GCC is not defined, then USE_GCC gets =
set from
>> WITH_GCC
>> - if both are defined
>> =A0 o if USE_GCC is a concrete version, then it wins
>> =A0 o else (if USE_GCC has the "X+") form, then the minimum requested ve=
rsion
>> becomes MAX(X, Y), where Y is from WITH_GCC [*]
>>
>> [*] Note that whether WITH_GCC has "Y" or "Y+" form doesn't matter in th=
is case.
>>
>> In all cases WITH_GCC can be used only to increase minimum required GCC =
version,
>> unless a port wants a concrete fixed version.
>>
>
> Here's an updated version of the patch.
> It should allow for initial bootstrapping of GCC itself.
>
> BTW, what would be the more appropriate name for such a knob - WITH_GCC o=
r WANT_GCC?
>

For Mk/bsd.database.mk - the meaning of USE_, WITH_ and WANT_ variables are=
:

USE_* - Maintainer - Add dependency. If no version is given (by the
maintainer via the port or by the user via defined variable), try to
find the currently installed version.  Fall back to default if
necessary.

WITH_*_VER - User defined variable to set version

WANT_*_VER - Maintainer can set an arbitrary version to always build
this port with (overrides WITH_*_VER).

So the appropriate name for this user defined variable should be
WITH_GCC since it sets both a dependancy and version for GCC as
requested by the user.

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf_77t7GCH2hm3hwcK2i%2BTcHUq_aBP4a7SeghQhGz3soDg>