From: "Michał Górny" <mgorny@gentoo.org>
To: Michael Palimaka <kensington@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: [PATCH 01/15] scons-utils.eclass: Modernize the example not to rely on myescons...
Date: Fri, 1 Jan 2016 18:15:25 +0100 [thread overview]
Message-ID: <20160101181525.4aee6ea0.mgorny@gentoo.org> (raw)
In-Reply-To: <n66b6p$hdh$1@ger.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]
On Sat, 2 Jan 2016 03:57:59 +1100
Michael Palimaka <kensington@gentoo.org> wrote:
> On 02/01/16 03:41, Michał Górny wrote:
> > ---
> > eclass/scons-utils.eclass | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
> > index a2a6884..e1b3a1b6 100644
> > --- a/eclass/scons-utils.eclass
> > +++ b/eclass/scons-utils.eclass
> > @@ -1,4 +1,4 @@
> > -# Copyright 1999-2012 Gentoo Foundation
> > +# Copyright 1999-2015 Gentoo Foundation
> > # Distributed under the terms of the GNU General Public License v2
> > # $Id$
> >
> > @@ -17,19 +17,19 @@
> > # EAPI=4
> > #
> > # src_configure() {
> > -# myesconsargs=(
> > +# MYSCONS=(
> > # CC="$(tc-getCC)"
> > # $(use_scons nls ENABLE_NLS)
> > # )
> > # }
> > #
> > # src_compile() {
> > -# escons
> > +# escons "${MYSCONS[@]}"
> > # }
> > #
> > # src_install() {
> > # # note: this can be DESTDIR, INSTALL_ROOT, ... depending on package
> > -# escons DESTDIR="${D}" install
> > +# escons "${MYSCONS[@]}" DESTDIR="${D}" install
> > # }
> > # @CODE
> >
> >
>
> What is the benefit of MYSCONS vs myesconsargs? The latter seems to be
> more consistent with other eclasses (mycmakeargs, myqmakeargs, ...)
It's shorter and follows the convention of keeping global variables
uppercase.
Consistency with bad example set by one eclass is not a good argument.
In fact, cmake-utils sets a very bad example of enforcing declarative
model over function-oriented ebuilds which results in really absurd
src_configure() implementations.
src_configure() {
local mycmakeargs=(
...
)
cmake-utils_src_configure
}
vs
src_configure() {
local myconf=(
...
)
ecmake "${myconf[@]}"
}
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
next prev parent reply other threads:[~2016-01-01 17:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 16:41 [gentoo-dev] [PATCH 00/15] scons-utils.eclass: EAPI 6, better docs and cleanup Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 01/15] scons-utils.eclass: Modernize the example not to rely on myescons Michał Górny
2016-01-01 16:57 ` [gentoo-dev] " Michael Palimaka
2016-01-01 17:15 ` Michał Górny [this message]
2016-01-01 17:42 ` Michael Palimaka
2016-01-02 13:38 ` Michael Orlitzky
2016-01-01 16:41 ` [gentoo-dev] [PATCH 02/15] scons-utils.eclass: Modernize the example to use usex Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 03/15] scons-utils.eclass: Describe common issues with scons Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 04/15] scons-utils.eclass: escons doc, 'die' does not respect nonfatal Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 05/15] scons-utils.eclass: escons, invert EAPI check to cover future EAPIs Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 06/15] scons-utils.eclass: escons, respect nonfatal in EAPI 6 Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 07/15] scons-utils.eclass: Deprecate myesconsargs, and kill it " Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 08/15] scons-utils.eclass: Deprecate use_scons, ban " Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 09/15] scons-utils.eclass: tests, be more verbose on tests being performed Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 10/15] scons-utils.eclass: scons_clean_makeopts, mark internal Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 11/15] scons-utils.eclass: _scons_clean_makeopts, fix result caching Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 12/15] scons-utils.eclass: _scons_clean_makeopts, stop exporting cache vars Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 13/15] scons-utils.eclass: _scons_clean_makeopts, clean up and simplify Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 14/15] scons-utils.eclass: Use nproc when --jobs is used without an argument Michał Górny
2016-01-01 16:41 ` [gentoo-dev] [PATCH 15/15] scons-utils.eclass: Enable EAPI 6 Michał Górny
2016-01-08 5:15 ` [gentoo-dev] [PATCH 00/15] scons-utils.eclass: EAPI 6, better docs and cleanup Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160101181525.4aee6ea0.mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=kensington@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox