1 |
> > > oasis_use_enable() { |
2 |
> > > echo "--override $2 `use $1 && echo \"true\" || echo |
3 |
> > > \"false\"`" } |
4 |
> > |
5 |
> > Mike added 'usex' to 'eutils.eclass' recently, so you might like to |
6 |
> > use it: (UNTESTED) |
7 |
> > echo "--override $2 $(usex $1 true false)" |
8 |
> |
9 |
> it needs to print the quotes too, so this wont work |
10 |
|
11 |
It did not print quotes: |
12 |
$ echo "--override bazz `true && echo \"true\" || echo \"false\"`" |
13 |
--override bazz true |
14 |
|
15 |
> i've been copy/pasting this 'formula' for a while, i know it works, and |
16 |
> i am too lazy to try to rewrite it to usex just for the sake of it :) |
17 |
> |
18 |
> > |
19 |
> > > oasis_src_configure() { |
20 |
> > > ocaml setup.ml -configure \ |
21 |
> > > --prefix usr \ |
22 |
> > > --libdir /usr/$(get_libdir) \ |
23 |
> > > --docdir /usr/share/doc/${PF}/html \ |
24 |
> > > --destdir "${D}" \ |
25 |
> > > $(oasis_use_enable debug debug) \ |
26 |
> > > $(oasis_use_enable ocamlopt is_native) \ |
27 |
> > > ${oasis_configure_opts} \ |
28 |
> > > || die |
29 |
> > > } |
30 |
> > |
31 |
> > This configure hates gentoo prefix, right? |
32 |
> > Might worth sprinkling "${EPREFIX}" around absolute paths. |
33 |
> > |
34 |
> |
35 |
> well, this will imply not supporting eapi2, i can live with it |
36 |
|
37 |
Oh, right. I've forgot. Each EPREFIX usage would require something like the following: |
38 |
|
39 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
40 |
|
41 |
> however, usually, i prefer prefix guys that need it to submit patches |
42 |
> instead of trying to support it without testing. |
43 |
|
44 |
Yeah, sounds fair. |
45 |
|
46 |
-- |
47 |
|
48 |
Sergei |