Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 342435 - scons-utils.eclass should tc-export
Summary: scons-utils.eclass should tc-export
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-24 09:27 UTC by Xake
Modified: 2010-10-27 18:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2010-10-24 09:27:43 UTC
I tried making a new linuxdcpp-999.ebuild using scons-utils.eclass and ran into some things I would like to have commented and/or fixed.

The first thing was for the following code (nearly identical to the example code):

src_compile() {
	escons $(use_scons debug) || die "scons failed"
}

Where I get the following:
>>> Compiling source in /var/tmp/portage/net-p2p/linuxdcpp-9999/work/linuxdcpp-9999 ...
scons -j10 PREFIX=/usr FAKE_ROOT=/var/tmp/portage/net-p2p/linuxdcpp-9999/image/ debug=0
scons: Reading SConscript files ...
CXX env variable is not set, attempting to use g++


This is because scons does not - unlike for example cmake-utils.eclass - set CXX anywhere.

I suggest that scons-utils.eclass does set the most used env-variables (like CC, CXX, LD, AS and so on, toolchain-funcs.eclass does contain a list of variables) so that the ebuilds does not have to do it themselves.
Examples of way to do it ca be found in cmake-utils.eclass, or can be exported (like in games.eclass) with "tc-export CC CXX".
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-10-24 09:35:49 UTC
'scons-utils' isn't supposed to export any phase functions (that's why it has '-utils' suffix). We could consider introducing a separate 'scons' eclass for that but that's another topic.

I'll add the tc-export code to the example.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-10-27 18:25:05 UTC
/var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v  <--  scons-utils.eclass
new revision: 1.2; previous revision: 1.1

Updated the example as mentioned earlier.