Gentoo Development Guide

SCONS-UTILS.ECLASS

Section: portage (5)
Updated: Apr 2014
Index Return to Main Contents
 

NAME

scons-utils.eclass - helper functions to deal with SCons buildsystem  

DESCRIPTION

This eclass provides a set of function to help developers sanely call dev-util/scons and pass parameters to it.  

EXAMPLE

inherit scons-utils toolchain-funcs

EAPI=4

src_configure() {
        myesconsargs=(
                CC="$(tc-getCC)"
                $(use_scons nls ENABLE_NLS)
        )
}

src_compile() {
        escons
}

src_install() {
        # note: this can be DESTDIR, INSTALL_ROOT, ... depending on package
        escons DESTDIR="${D}" install
}
 

FUNCTIONS

myesconsargs
List of package-specific options to pass to all SCons calls. Supposed to be set in src_configure().
escons [scons-arg] ...
Call scons, passing the supplied arguments, ${myesconsargs[@]}, filtered ${MAKEOPTS}, ${EXTRA_ESCONS}. Similar to emake. Like emake, this function does die on failure in EAPI 4 (unless called nonfatal).
scons_clean_makeopts [makeflags] [...]
Strip the supplied makeflags (or ${MAKEOPTS} if called without an argument) of options not supported by SCons and make sure --jobs gets an argument. Output the resulting flag list (suitable for an assignment to SCONSOPTS).
use_scons <use-flag> [var-name] [var-opt-true] [var-opt-false]
Output a SCons parameter with value depending on the USE flag state. If the USE flag is set, output <var-name>=<var-opt-true>; otherwise <var-name>=<var-opt-false>.

If <var-name> is omitted, <use-flag> will be used instead. However, if <use-flag> starts with an exclamation mark (!flag), 'no' will be prepended to the name (e.g. noflag).

If <var-opt-true> and/or <var-opt-false> are omitted, ${USE_SCONS_TRUE} and/or ${USE_SCONS_FALSE} will be used instead.

 

ECLASS VARIABLES

SCONS_MIN_VERSION
The minimal version of SCons required for the build to work.
SCONSOPTS
The default set of options to pass to scons. Similar to MAKEOPTS, supposed to be set in make.conf. If unset, escons() will use cleaned up MAKEOPTS instead.
EXTRA_ESCONS
The additional parameters to pass to SCons whenever escons() is used. Much like EXTRA_EMAKE, this is not supposed to be used in make.conf and not in ebuilds!
USE_SCONS_TRUE ?= 1
The default value for truth in scons-use() (1 by default).
USE_SCONS_FALSE ?= 0
The default value for false in scons-use() (0 by default).
 

MAINTAINERS

mgorny@gentoo.org
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/scons-utils.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/scons-utils.eclass?view=log


 

Index

NAME
DESCRIPTION
EXAMPLE
FUNCTIONS
ECLASS VARIABLES
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:07 GMT, April 19, 2014