1 |
commit: b8f5b4ed89df03f95dab0b918d2b010bbc1da28a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 10 03:04:41 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 10 03:04:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8f5b4ed |
7 |
|
8 |
toolchain.eclass: allow re-generation of info pages for snapshots |
9 |
|
10 |
Snapshots don't (yet?) contain pre-generated info pages (and man |
11 |
pages, but that's turned out not to be an issue, as they get |
12 |
regenerated and nobody notices). |
13 |
|
14 |
Given it's often easier and more sensible to keyword a snapshot |
15 |
from one of the stable branches upstream rather than cherry-picking |
16 |
patches, we need to make sure we don't regress with the documentation |
17 |
provided when we do that. |
18 |
|
19 |
Allow re-generation of info pages using texinfo for snapshots; |
20 |
we have a safeguard (eqawarn) for if they start appearing in |
21 |
snapshots and nobody noticed. |
22 |
|
23 |
Closes: https://bugs.gentoo.org/834845 |
24 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
25 |
|
26 |
eclass/toolchain.eclass | 26 +++++++++++++++++++++++--- |
27 |
1 file changed, 23 insertions(+), 3 deletions(-) |
28 |
|
29 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
30 |
index 4a91f0d3dee0..4e023ffb65d0 100644 |
31 |
--- a/eclass/toolchain.eclass |
32 |
+++ b/eclass/toolchain.eclass |
33 |
@@ -288,6 +288,13 @@ BDEPEND=" |
34 |
)" |
35 |
DEPEND="${RDEPEND}" |
36 |
|
37 |
+if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then |
38 |
+ # Snapshots don't contain info pages. |
39 |
+ # If they start to, adjust gcc_cv_prog_makeinfo_modern logic in toolchain_src_configure. |
40 |
+ # Needed unless/until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 is fixed |
41 |
+ BDEPEND+=" sys-apps/texinfo" |
42 |
+fi |
43 |
+ |
44 |
if tc_has_feature gcj ; then |
45 |
DEPEND+=" |
46 |
gcj? ( |
47 |
@@ -1417,9 +1424,22 @@ toolchain_src_configure() { |
48 |
) |
49 |
fi |
50 |
|
51 |
- # Disable gcc info regeneration -- it ships with generated info pages |
52 |
- # already. Our custom version/urls/etc... trigger it. bug #464008 |
53 |
- export gcc_cv_prog_makeinfo_modern=no |
54 |
+ if [[ ${PV} != *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then |
55 |
+ # Disable gcc info regeneration -- it ships with generated info pages |
56 |
+ # already. Our custom version/urls/etc... trigger it. bug #464008 |
57 |
+ export gcc_cv_prog_makeinfo_modern=no |
58 |
+ else |
59 |
+ # Allow a fallback so we don't accidentally install no docs |
60 |
+ # bug #834845 |
61 |
+ ewarn "No pre-generated info pages in tarball. Allowing regeneration with texinfo..." |
62 |
+ |
63 |
+ if [[ ${PV} == *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then |
64 |
+ # Safeguard against https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899 being fixed |
65 |
+ # without corresponding ebuild changes. |
66 |
+ eqawarn "Snapshot release with pre-generated info pages found!" |
67 |
+ eqawarn "The BDEPEND in the ebuild should be updated to drop texinfo." |
68 |
+ fi |
69 |
+ fi |
70 |
|
71 |
# Do not let the X detection get in our way. We know things can be found |
72 |
# via system paths, so no need to hardcode things that'll break multilib. |