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: Sat, 24 Mar 2012 13:23:31
Message-Id: 20120324102228.48622a85@gentoo.org
In Reply to: Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages. by Alexandre Rostovtsev
1 On Fri, 23 Mar 2012 16:41:35 -0400
2 Alexandre Rostovtsev <tetromino@g.o> wrote:
3
4 > On Fri, Mar 23, 2012 at 4:24 PM, Alexis Ballier <aballier@g.o>
5 > wrote:
6 > > On Fri, 23 Mar 2012 23:11:46 +0300
7 > > Sergei Trofimovich <slyfox@g.o> wrote:
8 > >> > oasis_src_configure() {
9 > >> >     ocaml setup.ml -configure \
10 > >> >             --prefix usr \
11 > >> >             --libdir /usr/$(get_libdir) \
12 > >> >             --docdir /usr/share/doc/${PF}/html \
13 > >> >             --destdir "${D}" \
14 > >> >             $(oasis_use_enable debug debug) \
15 > >> >             $(oasis_use_enable ocamlopt is_native) \
16 > >> >             ${oasis_configure_opts} \
17 > >> >             || die
18 > >> > }
19 > >>
20 > >> This configure hates gentoo prefix, right?
21 > >> Might worth sprinkling "${EPREFIX}" around absolute paths.
22 > >>
23 > >
24 > > well, this will imply not supporting eapi2, i can live with it
25 > >
26 > > however, usually, i prefer prefix guys that need it to submit
27 > > patches instead of trying to support it without testing.
28 > > eg: shall it be EPREFIX before the /usr's?shall it be ED instead of
29 > > D? both ?
30 >
31 > You probably want ${EPREFIX} in front of every /usr passed to
32 > configure. In other words,
33 >
34 > ocaml setup.ml -configure --prefix "${EPREFIX}/usr" --libdir
35 > "${EPREFIX}/blah" --docdir "${EPREFIX}/blargh" etc.
36 >
37 > However, destdir should still be ${D}. That way, in src_install() your
38 > package's files will be copied to ${D}${EPREFIX}/usr, better known as
39 > ${ED}usr.
40
41 will do that since it doesnt hurt, but it'll require testing anyway.
42 thanks for the explanations, but then beware of the findlib_src_preinst
43 call in src_install, which sets a variable so that findlib installs
44 stuff in $D; if at some point this will be changed to $ED for some
45 reason then oasis+findlib packages may go in a double prefix...