1 |
Dnia 2013-08-20, o godz. 13:01:34 |
2 |
Michał Górny <mgorny@g.o> napisał(a): |
3 |
|
4 |
> Hello, |
5 |
> |
6 |
> Due to the widespread breakage in the tree noted in bug #480892 [1], |
7 |
> and mis-design of multilib-minimal.eclass, we'd like to put some more |
8 |
> work into getting einstalldocs() ready for EAPI 6. |
9 |
> |
10 |
> When it's mostly defined, we'd like to backport it to eutils.eclass so |
11 |
> that we could use it to fix the existing breakages. But for that, we'd |
12 |
> really prefer if we had a final spec for it so that the EAPI switch |
13 |
> could be as simple as disabling the function in eutils. |
14 |
> |
15 |
> Therefore, I'd like to open a final discussion for the features set |
16 |
> that is intended to be included in it, and it's name. |
17 |
> |
18 |
> [1]:https://bugs.gentoo.org/show_bug.cgi?id=480892 |
19 |
|
20 |
Proposed implementation follows: |
21 |
|
22 |
einstalldocs() { |
23 |
if ! declare -p DOCS &>/dev/null ; then |
24 |
local d |
25 |
for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ |
26 |
THANKS BUGS FAQ CREDITS CHANGELOG ; do |
27 |
[[ -s "${d}" ]] && dodoc "${d}" |
28 |
done |
29 |
elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then |
30 |
[[ ${DOCS[@]} ]] && dodoc -r "${DOCS[@]}" |
31 |
else |
32 |
[[ ${DOCS} ]] && dodoc -r ${DOCS} |
33 |
fi |
34 |
|
35 |
if [[ $(declare -p HTML_DOCS) == "declare -a "* ]] ; then |
36 |
dohtml -r "${HTML_DOCS[@]}" |
37 |
elif [[ ${HTML_DOCS} ]]; then |
38 |
dohtml -r ${HTML_DOCS} |
39 |
fi |
40 |
} |
41 |
|
42 |
It's based on EAPI 4 src_install(). I've added support for DOCS=() |
43 |
and DOCS='', HTML_DOCS, and made dodoc recursive per Pinkbyte's |
44 |
request. In this form, it's suitable replacement for what's |
45 |
in autotools-utils & distutils-r1. |
46 |
|
47 |
It should be noted that if we're to backport it to all old EAPIs, |
48 |
'dodoc -r' needs te be conditional to EAPI 4+. |
49 |
|
50 |
-- |
51 |
Best regards, |
52 |
Michał Górny |