Gentoo Archives: gentoo-dev

From: Robert Buchholz <rbu@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
Date: Wed, 24 Sep 2008 00:35:33
Message-Id: 200809240235.22859.rbu@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI by Thomas Sachau
1 On Tuesday 23 September 2008, Thomas Sachau wrote:
2 > Ulrich Mueller schrieb:
3 > > And I still don't see why we would need the most general solution
4 > > for a *default* function. There's always the possibility to write
5 > > your own src_install() for the few ebuilds that need it.
6 > >
7 > > Ulrich
8 >
9 > I aggree with Ulrich in this case. This is just a suggestion for a
10 > default src_install funcion, nothing that should cover every possible
11 > case. So if you have some special DOC that does not work with the
12 > default install, you can still do it the normal way. So my suggestion
13 > for a default src_install:
14 >
15 > default_src_install() {
16 > if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
17 > if emake DESTDIR="${D} install || einstall ; then
18 > die "install failed"
19 > else
20 > if [[ -n ${DOCS} ]]; then
21 > dodoc ${DOCS} || die "dodoc failed"
22 > fi
23 > fi
24 > fi
25 > }
26 >
27 > Any more comments? Good? Bad? Interested?
28
29 Let's go with an even simpler default implementation:
30
31 default_src_install() {
32 if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
33 emake DESTDIR="${D}" install || die "emake install failed"
34         fi
35 if [ -n "${DOCS}" ]; then
36 dodoc ${DOCS} || die "dodoc failed"
37 fi
38 }
39
40 It addresses the following issues:
41 * Do not run einstall if emake fails
42 * Run dodoc even if no Makefile is present, this might come in handy for
43 ebuilds calling default()
44 * die dodoc failure case
45 * hopefully fix the flaws (not really) pointed out by zlin
46
47
48 Robert

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI "Santiago M. Mola" <coldwind@g.o>