public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] New eclass: scons-utils.eclass
@ 2010-10-07 19:35 Michał Górny
  2010-10-08 15:40 ` Jeroen Roovers
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2010-10-07 19:35 UTC (permalink / raw
  To: gentoo-dev-announce; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1988 bytes --]

Hello devs,

I've just committed a new eclass to gx86 -- it's called scons-utils
and it's supposed to help creating clean ebuilds for packages using
the SCons buildsystem.

Right now, the eclass addresses the two following important issues:

${MAKEOPTS} cleaning
--------------------

Currently the ebuilds either ignore MAKEOPTS completely, pass it
unmodified or clean it up a little using a copy-paste sed expression.

The scons-utils eclass introduces scons_clean_makeopts() function which
is able to nicely adjust MAKEOPTS to fit SCons. But in fact, you
probably won't ever need to call it -- escons() does it for you.

use_scons()
-----------

Right now, ebuilds use complex variable mangling in order to prepare
SCons variable assignments based on USEflags. Consider the following
code snippet (from media-sound/mixxx):

use hifieq && mysconsargs+=" hifieq=1" || mysconsargs+=" hifieq=0"

With scons-utils you can move this into actual `mysconsargs`
declaration, putting it like that:

$(use_scons hifieq)


Trivial use example
-------------------

Well, enough talking. Now a simple example on how to use it:


inherit scons-utils

src_compile() {
	escons \
		$(use_scons nls gettext) \
		$(use_scons ssl)
}


`escons` here is similar to emake. It simply calls scons, passing
appropriate flags to it. If SCONSOPTS is set (optional, supposed to be
set in make.conf, never mangle it in ebuilds!), it will be used;
otherwise, scons-utils will use cleaned up version of MAKEOPTS.

`use_scons <flag>` outputs either `<flag>=0` or `<flag>=1` depending on
whether the <flag> flag is set.

`use_scons !<flag>` would output: `no<flag>=1` or `no<flag>=0`.

`use_scons <flag> <var>` outputs: `<var>=0` or `<var>=1`, checking
<flag> flag.

For a few more tricks, please take a look at the eclass docs.

Thank you for your attention. If you have any questions, I'll be happy
to answer them.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] New eclass: scons-utils.eclass
  2010-10-07 19:35 [gentoo-dev] New eclass: scons-utils.eclass Michał Górny
@ 2010-10-08 15:40 ` Jeroen Roovers
  2010-10-08 15:43   ` Gökdeniz Karadağ
  0 siblings, 1 reply; 4+ messages in thread
From: Jeroen Roovers @ 2010-10-08 15:40 UTC (permalink / raw
  To: gentoo-dev

On Thu, 7 Oct 2010 21:35:13 +0200
Michał Górny <mgorny@gentoo.org> wrote:

> I've just committed a new eclass to gx86

= Adding and Updating Eclasses =

  Before committing a new eclass to the tree, it should be emailed to
  the gentoo-dev mailing list with a justification and a proposed
  implementation. Do not skip this step — sometimes a better
  implementation or an alternative which does not require a new eclass
  will be suggested. [1]


You never proposed this to the gentoo-dev mailing list?


     jer



[1] http://devmanual.gentoo.org/eclass-writing/index.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] New eclass: scons-utils.eclass
  2010-10-08 15:40 ` Jeroen Roovers
@ 2010-10-08 15:43   ` Gökdeniz Karadağ
  2010-10-11 18:27     ` Jeroen Roovers
  0 siblings, 1 reply; 4+ messages in thread
From: Gökdeniz Karadağ @ 2010-10-08 15:43 UTC (permalink / raw
  To: gentoo-dev



On 08-10-2010 18:40, Jeroen Roovers wrote:
> On Thu, 7 Oct 2010 21:35:13 +0200
> Michał Górny<mgorny@gentoo.org>  wrote:
>
>> I've just committed a new eclass to gx86
>
> = Adding and Updating Eclasses =
>
>    Before committing a new eclass to the tree, it should be emailed to
>    the gentoo-dev mailing list with a justification and a proposed
>    implementation. Do not skip this step — sometimes a better
>    implementation or an alternative which does not require a new eclass
>    will be suggested. [1]
>
>
> You never proposed this to the gentoo-dev mailing list?
>
>
>       jer
>

It was discussed in the thread with subject:
  New eclass: scons.eclass

Cheers,

-- 
Gökdeniz Karadağ



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] New eclass: scons-utils.eclass
  2010-10-08 15:43   ` Gökdeniz Karadağ
@ 2010-10-11 18:27     ` Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2010-10-11 18:27 UTC (permalink / raw
  To: gentoo-dev

On Fri, 08 Oct 2010 18:43:50 +0300
Gökdeniz Karadağ <gokdenizk@gmail.com> wrote:

> It was discussed in the thread with subject:
>   New eclass: scons.eclass

Thanks for the update. This leads me to two suggestions for future
eclass addition announcements:

1) Refer to the original gentoo-dev thread(s) (as recorded on
   archives.g.o).
2) If in that thread discussion leads to a change in the name for the
   proposed eclass, rename the thread accordingly.


     jer



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-11 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 19:35 [gentoo-dev] New eclass: scons-utils.eclass Michał Górny
2010-10-08 15:40 ` Jeroen Roovers
2010-10-08 15:43   ` Gökdeniz Karadağ
2010-10-11 18:27     ` Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox