1 |
commit: 1343712b8137aa73e45df0a249f8bda303ed328a |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 4 18:21:32 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 4 18:21:32 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1343712b |
7 |
|
8 |
Make (sub-)section titles unique within each chapter. |
9 |
|
10 |
Section, subsection, etc. titles are used to construct ID attributes, |
11 |
which must be unique within each chapter. |
12 |
|
13 |
One approach to disambiguate these identifiers would be to use the |
14 |
complete section hierarchy for constructing them (see bug 626032). |
15 |
However, that would break external references (and for example, links |
16 |
from bugzilla or from mailing list archives cannot be updated). |
17 |
|
18 |
Use a less intrusive approach instead and make the titles of the few |
19 |
ambiguous subsections unique, or convert them to a list. |
20 |
|
21 |
Closes: https://bugs.gentoo.org/626032 |
22 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
23 |
|
24 |
ebuild-writing/eapi/text.xml | 42 +++++++++++++-------------- |
25 |
ebuild-writing/functions/src_compile/text.xml | 36 ++++++++++++----------- |
26 |
2 files changed, 40 insertions(+), 38 deletions(-) |
27 |
|
28 |
diff --git a/ebuild-writing/eapi/text.xml b/ebuild-writing/eapi/text.xml |
29 |
index 7d05b15..a2fbddd 100644 |
30 |
--- a/ebuild-writing/eapi/text.xml |
31 |
+++ b/ebuild-writing/eapi/text.xml |
32 |
@@ -137,7 +137,7 @@ IUSE="foo +bar" |
33 |
<title>EAPI=2</title> |
34 |
|
35 |
<subsection> |
36 |
-<title>Helpers</title> |
37 |
+<title>EAPI 2 Helpers</title> |
38 |
<body> |
39 |
<ul> |
40 |
<li> |
41 |
@@ -158,7 +158,7 @@ doman foo.lang.1 |
42 |
</subsection> |
43 |
|
44 |
<subsection> |
45 |
-<title>Metadata</title> |
46 |
+<title>EAPI 2 Metadata</title> |
47 |
<body> |
48 |
<ul> |
49 |
<li> |
50 |
@@ -234,7 +234,7 @@ SRC_URI="https://dl.google.com/earth/client/GE4/release_4_3/GoogleEarthLinux.bin |
51 |
</subsection> |
52 |
|
53 |
<subsection> |
54 |
-<title>Phases</title> |
55 |
+<title>EAPI 2 Phases</title> |
56 |
<body> |
57 |
<ul> |
58 |
<li> |
59 |
@@ -346,7 +346,7 @@ src_compile() { |
60 |
<title>EAPI=4</title> |
61 |
|
62 |
<subsection> |
63 |
-<title>Helpers</title> |
64 |
+<title>EAPI 4 Helpers</title> |
65 |
<body> |
66 |
<ul> |
67 |
<li> |
68 |
@@ -470,7 +470,7 @@ src_install() { |
69 |
</subsection> |
70 |
|
71 |
<subsection> |
72 |
-<title>Metadata</title> |
73 |
+<title>EAPI 4 Metadata</title> |
74 |
<body> |
75 |
<ul> |
76 |
<li> |
77 |
@@ -494,7 +494,7 @@ DEPEND=" |
78 |
</subsection> |
79 |
|
80 |
<subsection> |
81 |
-<title>Phases</title> |
82 |
+<title>EAPI 4 Phases</title> |
83 |
<body> |
84 |
<ul> |
85 |
<li> |
86 |
@@ -577,7 +577,7 @@ src_install() { |
87 |
</subsection> |
88 |
|
89 |
<subsection> |
90 |
-<title>Variables</title> |
91 |
+<title>EAPI 4 Variables</title> |
92 |
<body> |
93 |
<ul> |
94 |
<li> |
95 |
@@ -668,7 +668,7 @@ src_install() { |
96 |
<title>EAPI=5</title> |
97 |
|
98 |
<subsection> |
99 |
-<title>Metadata</title> |
100 |
+<title>EAPI 5 Metadata</title> |
101 |
<body> |
102 |
<ul> |
103 |
<li> |
104 |
@@ -731,7 +731,7 @@ RDEPEND="dev-libs/foo:2= |
105 |
</subsection> |
106 |
|
107 |
<subsection> |
108 |
-<title>Profiles</title> |
109 |
+<title>EAPI 5 Profiles</title> |
110 |
<body> |
111 |
<ul> |
112 |
<li> |
113 |
@@ -745,7 +745,7 @@ RDEPEND="dev-libs/foo:2= |
114 |
</subsection> |
115 |
|
116 |
<subsection> |
117 |
-<title>Helpers</title> |
118 |
+<title>EAPI 5 Helpers</title> |
119 |
<body> |
120 |
<ul> |
121 |
<li> |
122 |
@@ -788,7 +788,7 @@ If USE flag is set, echo [true output][true suffix] (defaults to "yes"), |
123 |
</subsection> |
124 |
|
125 |
<subsection> |
126 |
-<title>Phases</title> |
127 |
+<title>EAPI 5 Phases</title> |
128 |
<body> |
129 |
<ul> |
130 |
<li> |
131 |
@@ -802,7 +802,7 @@ If USE flag is set, echo [true output][true suffix] (defaults to "yes"), |
132 |
</subsection> |
133 |
|
134 |
<subsection> |
135 |
-<title>Variables</title> |
136 |
+<title>EAPI 5 Variables</title> |
137 |
<body> |
138 |
<ul> |
139 |
<li> |
140 |
@@ -821,14 +821,14 @@ If USE flag is set, echo [true output][true suffix] (defaults to "yes"), |
141 |
<title>EAPI=6</title> |
142 |
|
143 |
<subsection> |
144 |
-<title>Bash version</title> |
145 |
+<title>EAPI 6 Bash version</title> |
146 |
<body> |
147 |
<p>Ebuilds can use features of Bash version 4.2 (was 3.2 before).</p> |
148 |
</body> |
149 |
</subsection> |
150 |
|
151 |
<subsection> |
152 |
-<title>Ebuild environment</title> |
153 |
+<title>EAPI 6 Ebuild Environment</title> |
154 |
<body> |
155 |
<ul> |
156 |
<li> |
157 |
@@ -850,7 +850,7 @@ If USE flag is set, echo [true output][true suffix] (defaults to "yes"), |
158 |
</subsection> |
159 |
|
160 |
<subsection> |
161 |
-<title>Phases</title> |
162 |
+<title>EAPI 6 Phases</title> |
163 |
<body> |
164 |
<ul> |
165 |
<li> |
166 |
@@ -888,7 +888,7 @@ src_install() { |
167 |
</subsection> |
168 |
|
169 |
<subsection> |
170 |
-<title>Helpers</title> |
171 |
+<title>EAPI 6 Helpers</title> |
172 |
<body> |
173 |
<ul> |
174 |
<li> |
175 |
@@ -963,7 +963,7 @@ src_install() { |
176 |
<title>EAPI=7</title> |
177 |
|
178 |
<subsection> |
179 |
-<title>Terminology</title> |
180 |
+<title>EAPI 7 Terminology</title> |
181 |
<body> |
182 |
<p>Documents may use the following terms to better describe dependency and installation targets.</p> |
183 |
<ul> |
184 |
@@ -983,7 +983,7 @@ src_install() { |
185 |
</body> |
186 |
</subsection> |
187 |
<subsection> |
188 |
-<title>Variables</title> |
189 |
+<title>EAPI 7 Variables</title> |
190 |
<body> |
191 |
<ul> |
192 |
<li> |
193 |
@@ -1030,7 +1030,7 @@ src_install() { |
194 |
</body> |
195 |
</subsection> |
196 |
<subsection> |
197 |
-<title>Metadata</title> |
198 |
+<title>EAPI 7 Metadata</title> |
199 |
<body> |
200 |
<ul> |
201 |
<li> |
202 |
@@ -1045,7 +1045,7 @@ src_install() { |
203 |
</body> |
204 |
</subsection> |
205 |
<subsection> |
206 |
-<title>Profiles</title> |
207 |
+<title>EAPI 7 Profiles</title> |
208 |
<body> |
209 |
<ul> |
210 |
<li> |
211 |
@@ -1056,7 +1056,7 @@ src_install() { |
212 |
</body> |
213 |
</subsection> |
214 |
<subsection> |
215 |
-<title>Helpers</title> |
216 |
+<title>EAPI 7 Helpers</title> |
217 |
<body> |
218 |
<ul> |
219 |
<li> |
220 |
|
221 |
diff --git a/ebuild-writing/functions/src_compile/text.xml b/ebuild-writing/functions/src_compile/text.xml |
222 |
index 757ac9e..1cd5050 100644 |
223 |
--- a/ebuild-writing/functions/src_compile/text.xml |
224 |
+++ b/ebuild-writing/functions/src_compile/text.xml |
225 |
@@ -31,9 +31,10 @@ |
226 |
<section> |
227 |
<title>Default <c>src_compile</c></title> |
228 |
|
229 |
-<subsection> |
230 |
-<title>with EAPI=0,1</title> |
231 |
<body> |
232 |
+<ul> |
233 |
+<li> |
234 |
+<p>with EAPI=0,1</p> |
235 |
<codesample lang="ebuild"> |
236 |
src_compile() { |
237 |
if [ -x ./configure ]; then |
238 |
@@ -44,11 +45,10 @@ src_compile() { |
239 |
fi |
240 |
} |
241 |
</codesample> |
242 |
-</body> |
243 |
-</subsection> |
244 |
-<subsection> |
245 |
-<title>with EAPI=2</title> |
246 |
-<body> |
247 |
+</li> |
248 |
+ |
249 |
+<li> |
250 |
+<p>with EAPI=2</p> |
251 |
<codesample lang="ebuild"> |
252 |
src_compile() { |
253 |
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
254 |
@@ -56,16 +56,18 @@ src_compile() { |
255 |
fi |
256 |
} |
257 |
</codesample> |
258 |
+</li> |
259 |
+</ul> |
260 |
</body> |
261 |
-</subsection> |
262 |
</section> |
263 |
|
264 |
<section> |
265 |
<title>Sample <c>src_compile</c></title> |
266 |
|
267 |
-<subsection> |
268 |
-<title>with EAPI=0</title> |
269 |
<body> |
270 |
+<ul> |
271 |
+<li> |
272 |
+<p>with EAPI=0</p> |
273 |
<codesample lang="ebuild"> |
274 |
src_compile() { |
275 |
use sparc && filter-flags -fomit-frame-pointer |
276 |
@@ -81,18 +83,18 @@ src_compile() { |
277 |
<note> |
278 |
You also need to inherit the <uri link="::eclass-reference/flag-o-matic.eclass/">flag-o-matic</uri> eclass in order to use the <c>append-ldflags</c> function. |
279 |
</note> |
280 |
-</body> |
281 |
-</subsection> |
282 |
-<subsection> |
283 |
-<title>with EAPI=2</title> |
284 |
-<body> |
285 |
+</li> |
286 |
+ |
287 |
+<li> |
288 |
+<p>with EAPI=2</p> |
289 |
<p> |
290 |
-porting the above example to EAPI=2, you won't need to define an extra |
291 |
+Porting the above example to EAPI=2, you won't need to define an extra |
292 |
<c>src_compile</c>, as it only calls <c>emake</c> (which is the default |
293 |
<c>src_compile</c> function). |
294 |
</p> |
295 |
+</li> |
296 |
+</ul> |
297 |
</body> |
298 |
-</subsection> |
299 |
</section> |
300 |
|
301 |
<section> |