Gentoo Archives: gentoo-dev

From: Pacho Ramos <pacho@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Staging 'einstalldocs' for EAPI 6
Date: Wed, 21 Aug 2013 11:14:02
Message-Id: 1377083626.4384.4.camel@localhost
In Reply to: Re: [gentoo-dev] Staging 'einstalldocs' for EAPI 6 by "Michał Górny"
1 El mié, 21-08-2013 a las 11:52 +0200, Michał Górny escribió:
2 > Dnia 2013-08-20, o godz. 13:01:34
3 > Michał Górny <mgorny@g.o> napisał(a):
4 >
5 > > Hello,
6 > >
7 > > Due to the widespread breakage in the tree noted in bug #480892 [1],
8 > > and mis-design of multilib-minimal.eclass, we'd like to put some more
9 > > work into getting einstalldocs() ready for EAPI 6.
10 > >
11 > > When it's mostly defined, we'd like to backport it to eutils.eclass so
12 > > that we could use it to fix the existing breakages. But for that, we'd
13 > > really prefer if we had a final spec for it so that the EAPI switch
14 > > could be as simple as disabling the function in eutils.
15 > >
16 > > Therefore, I'd like to open a final discussion for the features set
17 > > that is intended to be included in it, and it's name.
18 > >
19 > > [1]:https://bugs.gentoo.org/show_bug.cgi?id=480892
20 >
21 > Proposed implementation follows:
22 >
23 > einstalldocs() {
24 > if ! declare -p DOCS &>/dev/null ; then
25 > local d
26 > for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
27 > THANKS BUGS FAQ CREDITS CHANGELOG ; do
28 > [[ -s "${d}" ]] && dodoc "${d}"
29 > done
30 > elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
31 > [[ ${DOCS[@]} ]] && dodoc -r "${DOCS[@]}"
32 > else
33 > [[ ${DOCS} ]] && dodoc -r ${DOCS}
34 > fi
35 >
36 > if [[ $(declare -p HTML_DOCS) == "declare -a "* ]] ; then
37 > dohtml -r "${HTML_DOCS[@]}"
38 > elif [[ ${HTML_DOCS} ]]; then
39 > dohtml -r ${HTML_DOCS}
40 > fi
41 > }
42 >
43 > It's based on EAPI 4 src_install(). I've added support for DOCS=()
44 > and DOCS='', HTML_DOCS, and made dodoc recursive per Pinkbyte's
45 > request. In this form, it's suitable replacement for what's
46 > in autotools-utils & distutils-r1.
47 >
48 > It should be noted that if we're to backport it to all old EAPIs,
49 > 'dodoc -r' needs te be conditional to EAPI 4+.
50 >
51
52 Could appending to DOCS be allowed? I have seen a lot of time of me
53 needing to install all docs "manually" only to add a doc file over
54 default DOCS. Would be interesting to simply do:
55 DOCS+=( otherfile )
56
57 instead of needing to specify all files handled by the install function
58
59 Thanks a lot

Replies

Subject Author
Re: [gentoo-dev] Staging 'einstalldocs' for EAPI 6 Ulrich Mueller <ulm@g.o>