Gentoo Archives: gentoo-dev

From: Duncan Coutts <dcoutts@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] check-reqs conditionals
Date: Wed, 15 Feb 2006 12:40:51
Message-Id: 1140006995.30224.31.camel@localhost
In Reply to: [gentoo-dev] check-reqs conditionals by Ciaran McCreesh
1 On Sat, 2006-02-11 at 22:42 +0000, Ciaran McCreesh wrote:
2 > For those of you who don't know, check-reqs is an eclass that is
3 > occasionally used by a few packages that have ludicrously high build
4 > requirements. Typical examples have included anything using Haskell (the
5 > programming language with built-in memory leaks!) and certain C++
6 > template metaprogamming voodoo.
7 >
8 > Currently it just exports a single function that will warn (or die,
9 > based upon user preference) if the build requirements aren't met. There
10 > has been a request for a clean way of handling packages that can be
11 > built in two different ways that give the same end result (typical
12 > example is use of a really slow but low memory requiring algorithm vs a
13 > fast but memory intensive algorithm when building data tables).
14 >
15 > How does something like the attached look? (Yes, it's using old-school
16 > [ rather than [[, since the rest of the eclass is written that way. I
17 > might switch the whole thing over at some point.)
18 >
19
20 Thanks Ciaran, this looks great.
21
22 I've tested it with the dev-lang/ghc ebuild and it looks like it fits
23 our needs. This will help us fix bug #74346.
24
25 In the ghc ebuild I'll be using it like so:
26
27 + # The SplitObjs feature doesn't work on several arches and it makes
28 + # 'ar' take loads of RAM:
29 + CHECKREQS_MEMORY="200"
30 + if use alpha || use ppc || use ppc64 || use sparc; then
31 + echo "SplitObjs=NO" >> mk/build.mk
32 + elif ! check_reqs_conditional; then
33 + einfo "Turning off ghc's 'Split Objs' feature because this machine"
34 + einfo "does not have enough RAM for it. This will have the effect"
35 + einfo "of making binaries produced by ghc considerably larger."
36 + echo "SplitObjs=NO" >> mk/build.mk
37 + fi
38
39 --
40 Duncan Coutts : Gentoo Developer (Haskell herd team lead)
41 email : dcoutts at gentoo dot org
42
43 --
44 gentoo-dev@g.o mailing list