From owner-freebsd-ports@FreeBSD.ORG Tue Feb 5 23:24:18 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6D89BA87 for ; Tue, 5 Feb 2013 23:24:18 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by mx1.freebsd.org (Postfix) with ESMTP id 016B7E9F for ; Tue, 5 Feb 2013 23:24:17 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id d17so377644eek.38 for ; Tue, 05 Feb 2013 15:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=HdBiyNtdO0/vh+jXKUnEJJMeq7nd9E/F/6gBc1p6epY=; b=Eav1rSColPhQVgzF5fGqdh5smN9CIHy0XRvL/lnPHlF0gaRJvGLHNc6QFGFN4Rx3ls bSLULhFgxv8mK/9/afgOena36h3qLylGeYSWfzDIOL33HovU7Ztz9GA697CMLORWgQvo l5Yjh6Er6MtdinhohwYjwLKZf9WcBfRXjRx6Wd4d414NbwFqqX2HaN7OeSWy6pO0s4gU BmhgvGiI/w1G7TNSdMSvCW84TEHnXFYYz7eL/1xqoar0IWayzJ2qp2T3C7x1e0HgJgOa TRdhIhTOfkghm2HR2H3We1lKdIY7YNRKdEz5Sqg+ByqSlbiJLnQbZ07xfUIN62OY36Ek 6EUA== X-Received: by 10.14.209.131 with SMTP id s3mr89738625eeo.26.1360106650745; Tue, 05 Feb 2013 15:24:10 -0800 (PST) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id f49sm34067692eep.12.2013.02.05.15.24.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 15:24:09 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 6 Feb 2013 00:24:07 +0100 From: Baptiste Daroussin To: =?iso-8859-1?Q?Ren=E9?= Ladan Subject: Re: [CFT+BRAINSTORM] One USE_ to rule them all Message-ID: <20130205232407.GM88651@ithaqua.etoilebsd.net> References: <20130204181946.GF67687@ithaqua.etoilebsd.net> <511003B3.90600@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="F7w+4yMapWozG0Ib" Content-Disposition: inline In-Reply-To: <511003B3.90600@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-ports@freebsd.org 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: Tue, 05 Feb 2013 23:24:18 -0000 --F7w+4yMapWozG0Ib Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 04, 2013 at 07:53:39PM +0100, Ren=E9 Ladan wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 04-02-2013 19:19, Baptiste Daroussin wrote: > > Hi, > >=20 > > I have some improvements to the ports tree to propose, and I'm > > looking for testers/opinions > >=20 > > First let me explain: > >=20 > > I want to introduce a new USE_FEATURES macro into the ports tree > >=20 > > The goal of this macros is to be able to standardize how we call > > all the USE_* things as well as creating some "load on demand" code > > for a corresponding feature. > >=20 > > What I expect in long term is to get a more readable bsd.port.mk & > > friends, meaning easier to maintain > >=20 > > I except some performance improvements given that make will have to > > parse less things. > >=20 > > I also expect less complexity if bsd.*.mk code. > >=20 > > What will have is all/most of the code corresponding to a > > USE_SOMETHING right now will endup in a Mk/features/something.mk > > which will be loaded only if the ports defines: USE_FEATURES=3D > > something > >=20 > > the loading is done at the very early stage of bsd.port.post.mk to > > allow one to load modify USE_FEATURES depending on some options > > etc. > >=20 > > each features/*.mk is itself protected by a variable to avoid multi > > loading of the same file > >=20 > > if a feature depends on another one the feature itself just have to > > ".include" the other one. > >=20 > This sounds like a good idea to me. >=20 > > As a proof of concept I made the following: USE_FEATURES=3D gmake > > (with a compatibility for USE_GMAKE to allow migration)=20 > > USE_FEATURES=3D iconv (with a compatibility for USE_ICONV to allow > > migration) USE_FEATURES=3D motif (with no compatibility as I have > > switched all the USE_MOTIF ports to use it) USE_FEATURES=3D fise > > (with no compatibility as I have switched all the USE_FUSE to use > > it) USE_FEATURES=3D display (with no compatibilify as I have switched > > all the USE_DISPLAY to use it) USE_FEATURES=3D pathfix (which is the > > equivalent of USE_GNOME=3D gnomehack without the need to loading the > > whole bsd.gnome.mk) > >=20 > > The very long term goal will be to switch as much code as possible > > to be turn into a feature (when it makes sens of course) > >=20 > Are you saying that some USE_BLAH=3Dyes will stick around or do I > misunderstand? >=20 > Another question: for USE_BLAH=3Dyes the logical transformation would be > USE_FEATURES=3DBLAH but what about USE_FOO=3DBLAH ? Would > USE_FEATURES=3DFOO/BLAH (possibly another separator) or > USE_FEATURES=3DBLAH be more sensible? >=20 patch has been updated to be able to support the following: USE_FEATURES=3D foo:bla that will 1/ load foo.mk, 2/ create a variable: FEATURE_foo=3D bla So that you can do virtually any thing you want :) regards, Bapt --F7w+4yMapWozG0Ib Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlERlJcACgkQ8kTtMUmk6ExREwCgt59r+B0PbNcpLwt3hPutIcNx ZJsAnRSa1CF1WkSp0r84+BUI9NPa2Ab4 =h9Y0 -----END PGP SIGNATURE----- --F7w+4yMapWozG0Ib--