* [gentoo-dev-announce] New eclass: scons-utils.eclass
@ 2010-10-07 19:35 Michał Górny
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2010-10-07 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 19:35 [gentoo-dev-announce] New eclass: scons-utils.eclass Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox