From owner-freebsd-ports@FreeBSD.ORG Mon Feb 4 18:53:44 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 94637FC8 for ; Mon, 4 Feb 2013 18:53:44 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx1.freebsd.org (Postfix) with ESMTP id 2820A3FA for ; Mon, 4 Feb 2013 18:53:43 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hm6so2061448wib.14 for ; Mon, 04 Feb 2013 10:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=nbMopmtkE+NOAT30zLbeq2Pa46ZryX87/h4msEL0mFQ=; b=OtEBP7dJ0iJJiqQ3Q02vUZsh7xDQocxyA7nhP0XlfOimRY23yKuPGhKlHEpniPEolV JVBiLNUof8kdgwBNXz4FC7MuV209ovyaMiEYWv0twYFYE7X8HD8HpcJZwPlgETjoI0BN YYuzMCP4Il83zzFfmNM16RWrikdNnBtJBmgqAlGoQt+eeRocCKW/DKATdmfqMsK6obVH k6JMkoblVRpjrhkMCj/QJFmBb4VzfnFU1yARIT/txrNt0NrxIvXfY6Fl99AjDRDdga+U RWnZM9WLuAdu+P1wPiz4QQbApcs/d5Eab3IjvKTifeTE2vT31fKKKbVBYA/te86yGYTk krHg== X-Received: by 10.194.76.237 with SMTP id n13mr37456851wjw.57.1360004022983; Mon, 04 Feb 2013 10:53:42 -0800 (PST) Received: from ?IPv6:2001:980:d7ed:1:4c9d:37a8:bdad:c2fb? ([2001:980:d7ed:1:4c9d:37a8:bdad:c2fb]) by mx.google.com with ESMTPS id gz3sm21662913wib.2.2013.02.04.10.53.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 10:53:41 -0800 (PST) Message-ID: <511003B3.90600@gmail.com> Date: Mon, 04 Feb 2013 19:53:39 +0100 From: =?ISO-8859-1?Q?Ren=E9_Ladan?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130129 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: [CFT+BRAINSTORM] One USE_ to rule them all References: <20130204181946.GF67687@ithaqua.etoilebsd.net> In-Reply-To: <20130204181946.GF67687@ithaqua.etoilebsd.net> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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: Mon, 04 Feb 2013 18:53:44 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04-02-2013 19:19, Baptiste Daroussin wrote: > Hi, > > I have some improvements to the ports tree to propose, and I'm > looking for testers/opinions > > First let me explain: > > I want to introduce a new USE_FEATURES macro into the ports tree > > 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. > > What I expect in long term is to get a more readable bsd.port.mk & > friends, meaning easier to maintain > > I except some performance improvements given that make will have to > parse less things. > > I also expect less complexity if bsd.*.mk code. > > 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= > something > > 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. > > each features/*.mk is itself protected by a variable to avoid multi > loading of the same file > > if a feature depends on another one the feature itself just have to > ".include" the other one. > This sounds like a good idea to me. > As a proof of concept I made the following: USE_FEATURES= gmake > (with a compatibility for USE_GMAKE to allow migration) > USE_FEATURES= iconv (with a compatibility for USE_ICONV to allow > migration) USE_FEATURES= motif (with no compatibility as I have > switched all the USE_MOTIF ports to use it) USE_FEATURES= fise > (with no compatibility as I have switched all the USE_FUSE to use > it) USE_FEATURES= display (with no compatibilify as I have switched > all the USE_DISPLAY to use it) USE_FEATURES= pathfix (which is the > equivalent of USE_GNOME= gnomehack without the need to loading the > whole bsd.gnome.mk) > > 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) > Are you saying that some USE_BLAH=yes will stick around or do I misunderstand? Another question: for USE_BLAH=yes the logical transformation would be USE_FEATURES=BLAH but what about USE_FOO=BLAH ? Would USE_FEATURES=FOO/BLAH (possibly another separator) or USE_FEATURES=BLAH be more sensible? > The USE_FEATURES itself: > http://people.freebsd.org/~bapt/features.diff > > The modified ports for the PoC: > http://people.freebsd.org/~bapt/features-chase.diff > You could commit the header updates already if possible, which also makes the patch more readable. Regards, René -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBAgAGBQJREAOzAAoJEKipqUGAIxKQLXsQAJDecygfd5cWSbKtt7P5yBGm 1xqPKiPI6bbyGzykob72woPFWK9bl0mS+JN0TYEaecHyQDyc59BauuaMJYWzveZS tXwW9pB6z5CdSy7jMtpD7OF2OofWCP3ZZU4XIkfqBUFXryM9OB083btx6asn3ygX l5FY1HG0RukhngCFOgrIer9SkAg0oJ89bL40NVOhXROV09MAdP3zGw/piojQXlyF TuaavqCKqLcHFUbw5yKvwFUkYRRECoAflob1Yi7pVKT9y9cXCQKnEB0Cwwv9QECL WWOKW3adPJ47HhoQYhJcVyyXAmP25J+k+WqBZxboY64ASIoj8HkVWHogOx917mDk nANm5q0ccaPI6yFvUkb0RKbtSbEChXM8ahiw7H6r79CKzh2GE5es+ZUVllAfmO/w Nz23w5aT43G8iYOmv42RSHgUOSxEQTGccumpWZPGABgEoubwXs4m/65TTl20NmRQ m/bVU0dDfiBIoVRuo1g4StM0wiW7ATh+ne/KJ0GR19qQ0DUsu9iC9+OeEF7Vko69 4Hp2Y0UVzjAniSAjVyK6nsWKlPQh88XeUWP5t/d7eD3KPEAWyv/yU65KhK33e+u/ MDHAuEfuOB5lBa9n8J3KMTdLb6yoQjudDnKRNhd8rxCX+UMq6wVxEO31nQnl2fll Y1yqj3eGdp1x2R9G0xC3 =qpKQ -----END PGP SIGNATURE-----