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