1 |
As EAPI 2 support is intended, this requires configuring the build |
2 |
system to install docs into a temporary location and moving files from |
3 |
it. Due to the lack of 'dodoc -r', directories inside docdir are |
4 |
supported only with EAPI 4. |
5 |
|
6 |
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=350423 |
7 |
--- |
8 |
eclass/autotools-utils.eclass | 21 ++++++++++++++++++++- |
9 |
1 files changed, 20 insertions(+), 1 deletions(-) |
10 |
|
11 |
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass |
12 |
index e5ce908..96b3372 100644 |
13 |
--- a/eclass/autotools-utils.eclass |
14 |
+++ b/eclass/autotools-utils.eclass |
15 |
@@ -377,7 +377,9 @@ autotools-utils_src_configure() { |
16 |
|| die 'autotools-utils.eclass: myeconfargs has to be an array.' |
17 |
|
18 |
# Common args |
19 |
- local econfargs=() |
20 |
+ local econfargs=( |
21 |
+ --docdir=/temporary-docdir |
22 |
+ ) |
23 |
|
24 |
# Handle static-libs found in IUSE, disable them by default |
25 |
if in_iuse static-libs; then |
26 |
@@ -442,6 +444,23 @@ autotools-utils_src_install() { |
27 |
dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" |
28 |
fi |
29 |
|
30 |
+ # Move docs installed by autotools. |
31 |
+ if [[ -d ${D}/temporary-docdir ]]; then |
32 |
+ if [[ ${EAPI} = 4 ]]; then |
33 |
+ dodoc -r "${D}"/temporary-docdir/* || die "docdir dodoc failed" |
34 |
+ else |
35 |
+ local f |
36 |
+ for f in "${D}"/temporary-docdir/*; do |
37 |
+ [[ -d ${f} ]] \ |
38 |
+ && die "directories in docdir require at least EAPI 4" |
39 |
+ done |
40 |
+ |
41 |
+ dodoc "${D}"/temporary-docdir/* || die "docdir dodoc failed" |
42 |
+ fi |
43 |
+ |
44 |
+ rm -r "${D}"/temporary-docdir |
45 |
+ fi |
46 |
+ |
47 |
# Remove libtool files and unnecessary static libs |
48 |
remove_libtool_files |
49 |
} |
50 |
-- |
51 |
1.7.8.2 |