From owner-freebsd-ports@FreeBSD.ORG Thu May 10 16:48:23 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 CDBEF1065673; Thu, 10 May 2012 16:48:23 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5F8C58FC12; Thu, 10 May 2012 16:48:23 +0000 (UTC) Received: by ggnm2 with SMTP id m2so1418412ggn.13 for ; Thu, 10 May 2012 09:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZJsmuy4uWOwFWkQnsfmWcC1X0lQr4CBS9nLEYIMCYVw=; b=ve7n0rtkn0Z6MfhGyoNy8Aa57FnPgwb5NlccCUD94BzAQdeSVUQBWJVd9rc8C79DVL kIoQe48j7PdB7cP/ocDpqYFJrXK9d/jgz2AMJUZq1bEfrhMFTlUdqug72TGvvWC7sNpg H2LGK8VoHNHzEdEyDdKtdaOntzsCShJNgBgWa8LVaGwZAqUxdcF11wh7MkSNXXB+w2Wn Hiod9NgLKB2L7Id1fRZOaoYL/71qYiwvLBBGGHjmZ+jrhm9sDM2SazMhw2tyI1V81Om+ WnBU/4TJUIVdD5OA7ITQHqwQR5s7/UzJqD8EGfGOTtF6wJbnFNVkV1GMEgX/c0Bgbf1i kZ+w== MIME-Version: 1.0 Received: by 10.60.154.199 with SMTP id vq7mr6838014oeb.10.1336668499587; Thu, 10 May 2012 09:48:19 -0700 (PDT) Received: by 10.60.25.10 with HTTP; Thu, 10 May 2012 09:48:19 -0700 (PDT) In-Reply-To: <4FAB6E01.50108@FreeBSD.org> References: <4F578AA7.4060008@FreeBSD.org> <4F990D9A.3090100@FreeBSD.org> <4FA643FA.3050206@FreeBSD.org> <4FAB6E01.50108@FreeBSD.org> Date: Thu, 10 May 2012 11:48:19 -0500 Message-ID: From: Scot Hetzel To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: bf1783@gmail.com, Gerald Pfeifer , "b. f." , freebsd-ports@freebsd.org Subject: Re: WITH_GCC 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: Thu, 10 May 2012 16:48:23 -0000 On Thu, May 10, 2012 at 2:28 AM, Andriy Gapon 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