Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333911 - scons-utils.eclass (new eclass)
Summary: scons-utils.eclass (new eclass)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Michał Górny
URL: http://archives.gentoo.org/gentoo-dev...
Whiteboard:
Keywords: InVCS
Depends on: 335702
Blocks:
  Show dependency tree
 
Reported: 2010-08-22 07:31 UTC by Michał Górny
Modified: 2010-10-07 21:15 UTC (History)
3 users (show)

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


Attachments
The first draft of the eclass (scons.eclass,4.84 KB, text/plain)
2010-08-22 09:36 UTC, Michał Górny
Details
Eclass rev4 (scons-utils.eclass,6.12 KB, text/plain)
2010-08-25 19:12 UTC, Michał Górny
Details
Eclass, r5 (scons-utils.eclass,6.26 KB, text/plain)
2010-09-02 15:41 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-08-22 07:31:42 UTC
There is an increasing number of ebuilds using 'scons' as a buildsystem. As SCons doesn't resemble all of GNU make opts (e.g. --load-average is missing, and --jobs requires an argument), some cleaning on MAKEOPTS needs to be performed.

Quick look at gx86 shows that some ebuilds perform that on their own, some other just pass MAKEOPTS uncleaned (which could lead to build failures) and some simply do not pass it at all.

I think it would be a good idea to prepare a single implementation of the cleaning function and put it in an eclass. This could be the first functon for the future 'scons.eclass', or maybe another one for 'flag-o-matic.eclass' (but then we'd have to make the function more adjustable), or maybe even a co-operation of a general MAKEOPTS cleaning function in f-o-m and specific one in s.
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2010-08-22 07:39:17 UTC
TBH I would like to see scons gone in huge nuke blastwave, but i think some basic standards should be done.

So if you are willing to do the work just do it :) (and assign it to yourself :))

Also I still preffer convincing upstream about that scons is NO-GO.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-08-22 09:36:52 UTC
Created attachment 243995 [details]
The first draft of the eclass
Comment 3 Christopher Schwan 2010-08-23 10:32:57 UTC
(In reply to comment #1)
> TBH I would like to see scons gone in huge nuke blastwave, but i think some
> basic standards should be done.

+1

(In reply to comment #2)
> Created an attachment (id=243995) [details]
> The first draft of the eclass
> 

A suggestion and a question:

- a function "escons" which automatically calls scons with the right MAKEOPTS (much like emake for make) would be handy
- is there a special reasons why you use "-" instead of "_" (I would prefer scons_use instead of scons-use, though I have no problems with dashes ;) ) ?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-08-23 14:36:02 UTC
(In reply to comment #3)
> - a function "escons" which automatically calls scons with the right MAKEOPTS
> (much like emake for make) would be handy
> - is there a special reasons why you use "-" instead of "_" (I would prefer
> scons_use instead of scons-use, though I have no problems with dashes ;) ) ?

Both already applied. Please take a look at the discussion at the gentoo-dev ml.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-08-25 19:12:40 UTC
Created attachment 244603 [details]
Eclass rev4

This is fourth revision of the eclass, after applying various changes suggested on gentoo-dev.

Here's the ChangeLog:

3e30e1f Rename to scons-utils.eclass.
6477004 Remove exported phase functions.
41784fc Implement a cache in scons_clean_makeopts().
9b3ce5d Clarify doc on SCONSOPTS.
ac9f7ed Call scons_clean_makeopts() inline instead of exporting SCONSOPTS.
ae6afd9 Fix SCONSOPTS check in escons().
151ddf2 Support passing a flag list to scons_clean_makeopts().
82a3ee7 Output the resulting flag list in scons_clean_makeopts() instead of assigning it.
8062ec7 Provide a blank src_configure() for EAPI 2+.
33b4406 Drop default pkg_setup() -- no longer necessary.
44188e0 escons(): set SCONSOPTS implicitly if they are unset.
0f2ea92 Fix tests to use underscores in function names.
ccf1ef9 Introduce SCONSOPTS and use it instead of MAKEOPTS.
501ba41 Rename scons_use() to use_scons(), and the related vars.
681d73f Print the complete SCons command line in escons().
194e52e Use @DEFAULT-UNSET.
42aec9f Remove incorrect @CODE use.
83678d1 Export a default pkg_setup() and src_compile().
7f9b565 Introduce escons() function (similar to emake).
19b7e14 Use underscores instead of dashes in function names.
Comment 6 Christopher Schwan 2010-08-26 08:37:59 UTC
Line 5: "# @ECLASS: scons.eclass" should be "# @ECLASS: scons-utils.eclass".
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-08-26 14:51:06 UTC
(In reply to comment #6)
> Line 5: "# @ECLASS: scons.eclass" should be "# @ECLASS: scons-utils.eclass".

Thanks, fixed.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-09-02 15:41:42 UTC
Created attachment 245766 [details]
Eclass, r5

As I'm not getting any comments, I'm uploading the fifth revision, with final polishing:

795b0b4 Add an use example.
d0b1344 Fix the docs to use @DEFAULT_UNSET.
e739d3b Update @ECLASS line.
Comment 9 Tim Harder gentoo-dev 2010-10-05 17:44:19 UTC
Can this be added to the tree soon? I'd like to use it in an ebuild for a new package.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-10-05 17:57:29 UTC
(In reply to comment #9)
> Can this be added to the tree soon? I'd like to use it in an ebuild for a new
> package.

I'll try to finish up describing its use nicely and commit it either today or tomorrow.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-10-07 19:38:42 UTC
/var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v  <--  scons-utils.eclass
initial revision: 1.1
/var/cvsroot/gentoo-x86/eclass/tests/scons-utils.sh,v  <--  tests/scons-utils.sh
initial revision: 1.1