Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.
Date: Fri, 23 Mar 2012 20:25:36
Message-Id: 20120323172443.65bbd5b8@gentoo.org
In Reply to: Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages. by Sergei Trofimovich
1 On Fri, 23 Mar 2012 23:11:46 +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 to
9 > 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 i've been copy/pasting this 'formula' for a while, i know it works, and
15 i am too lazy to try to rewrite it to usex just for the sake of it :)
16
17 >
18 > > oasis_src_configure() {
19 > > ocaml setup.ml -configure \
20 > > --prefix usr \
21 > > --libdir /usr/$(get_libdir) \
22 > > --docdir /usr/share/doc/${PF}/html \
23 > > --destdir "${D}" \
24 > > $(oasis_use_enable debug debug) \
25 > > $(oasis_use_enable ocamlopt is_native) \
26 > > ${oasis_configure_opts} \
27 > > || die
28 > > }
29 >
30 > This configure hates gentoo prefix, right?
31 > Might worth sprinkling "${EPREFIX}" around absolute paths.
32 >
33
34 well, this will imply not supporting eapi2, i can live with it
35
36 however, usually, i prefer prefix guys that need it to submit patches
37 instead of trying to support it without testing.
38 eg: shall it be EPREFIX before the /usr's ? shall it be ED instead of
39 D? both ?
40
41 A.

Replies