1 |
On Sat, 24 Mar 2012 00:02:15 +0300 |
2 |
Sergei Trofimovich <slyfox@g.o> wrote: |
3 |
|
4 |
> > > > oasis_use_enable() { |
5 |
> > > > echo "--override $2 `use $1 && echo \"true\" || echo |
6 |
> > > > \"false\"`" } |
7 |
> > > |
8 |
> > > Mike added 'usex' to 'eutils.eclass' recently, so you might like |
9 |
> > > to use it: (UNTESTED) |
10 |
> > > echo "--override $2 $(usex $1 true false)" |
11 |
> > |
12 |
> > it needs to print the quotes too, so this wont work |
13 |
> |
14 |
> It did not print quotes: |
15 |
> $ echo "--override bazz `true && echo \"true\" || echo \"false\"`" |
16 |
> --override bazz true |
17 |
|
18 |
hu? i was pretty sure it was needed, but you're right, i dont know what |
19 |
i was trying to achieve with those escaped quotes in there... i've |
20 |
converted to your usex formula which is equivalent, thanks :) |
21 |
|
22 |
|
23 |
> > > This configure hates gentoo prefix, right? |
24 |
> > > Might worth sprinkling "${EPREFIX}" around absolute paths. |
25 |
> > > |
26 |
> > |
27 |
> > well, this will imply not supporting eapi2, i can live with it |
28 |
> |
29 |
> Oh, right. I've forgot. Each EPREFIX usage would require something |
30 |
> like the following: |
31 |
> |
32 |
> has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
33 |
|
34 |
not worth it, ocaml ebuilds are all eapi2 and the eapi2->3 migration is |
35 |
quite straightforward, so there's no point in supporting <eapi3. |
36 |
|
37 |
A. |