On Thu, May 10, 2012 at 2:28 AM, Andriy Gapon <a...@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-existent
>> 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
>>   o if USE_GCC is a concrete version, then it wins
>>   o else (if USE_GCC has the "X+") form, then the minimum requested version
>> becomes MAX(X, Y), where Y is from WITH_GCC [*]
>>
>> [*] Note that whether WITH_GCC has "Y" or "Y+" form doesn't matter in this 
>> 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 or 
> 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
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to