From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Kc31W-0004DV-Qr for garchives@archives.gentoo.org; Sat, 06 Sep 2008 19:00:43 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 700FDE0364; Sat, 6 Sep 2008 19:00:41 +0000 (UTC) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by pigeon.gentoo.org (Postfix) with ESMTP id 4F48EE0364 for ; Sat, 6 Sep 2008 19:00:41 +0000 (UTC) Received: by wr-out-0506.google.com with SMTP id c37so953220wra.26 for ; Sat, 06 Sep 2008 12:00:40 -0700 (PDT) Received: by 10.70.66.9 with SMTP id o9mr16338639wxa.1.1220727640382; Sat, 06 Sep 2008 12:00:40 -0700 (PDT) Received: by 10.70.40.7 with HTTP; Sat, 6 Sep 2008 12:00:40 -0700 (PDT) Message-ID: Date: Sat, 6 Sep 2008 12:00:40 -0700 From: "Alec Warner" Sender: antarus@scriptkitty.com To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC] Ability to pass arguments to src_configure/src_compile In-Reply-To: <20080906173656.GB5434@spoc.mpa.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080906173656.GB5434@spoc.mpa.com> X-Google-Sender-Auth: 7511ddc7d7288975 X-Archives-Salt: 77a988ab-ee5b-4425-b336-138558d59f0c X-Archives-Hash: cf5740255ef2a75c07c907d7c35471df On Sat, Sep 6, 2008 at 10:36 AM, Thomas Anderson wrote: > Hi, > Currently we have a lot of: > src_configure() { > econf $(use_enable dvdr) \ > $(use_with ipv6 ssl) \ > --with-system-zlib > } > > Introducing(Idea shamelessly taken from Exherbo): > DEFAULT_SRC_CONFIGURE_USE_{WITHS,ENABLES} > DEFAULT_SRc_CONFIGURE_EXTRA_PARAMS > > The code from above could be rewritten like so: > > DEFAULT_SRC_CONFIGURE_USE_ENABLES=( 'dvdr' ) > DEFAULT_SRC_CONFIGURE_USE_WITHS=( 'ipv6 ssl' ) > DEFAULT_SRC_CONFIGURE_EXTRA_PARAMS=( '--with-system-zlib' ) > > That's much simpler. It saves you 1 line and reduces readability and intuitiveness by a fair margin; how is it simpler? > > Also taken from Exherbo, DEFAULT_SRC_COMPILE_PARAMS could be used to > append parameters to emake like so: > > src_compile() { > emake buildtarget > } > > which would be replaced by: > DEFAULT_SRC_COMPILE_PARAMS=( 'buildtarget' ) > > This was originally proposed in bug #230725[1] > > Regards, > Thomas > > [1] https://bugs.gentoo.org/show_bug.cgi?id=230725 >