1 |
commit: b887343bd84cfbfd7c0fa42e1e35158f3817e464 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 17 14:35:57 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 24 12:56:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b887343b |
7 |
|
8 |
ebuild-writing/eapi: Add summary of EAPI=7 features |
9 |
|
10 |
Reference material used includes "The ultimate guide to EAPI 7"[1] by Michał Górny |
11 |
and the "Package Manager Specification"[2] |
12 |
|
13 |
[1] https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html |
14 |
[2] https://projects.gentoo.org/pms/7/pms.html |
15 |
|
16 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
17 |
|
18 |
ebuild-writing/eapi/text.xml | 184 +++++++++++++++++++++++++++++++++++++++++++ |
19 |
1 file changed, 184 insertions(+) |
20 |
|
21 |
diff --git a/ebuild-writing/eapi/text.xml b/ebuild-writing/eapi/text.xml |
22 |
index 406a562..7fd018f 100644 |
23 |
--- a/ebuild-writing/eapi/text.xml |
24 |
+++ b/ebuild-writing/eapi/text.xml |
25 |
@@ -976,6 +976,190 @@ src_install() { |
26 |
</body> |
27 |
</section> |
28 |
|
29 |
+<section> |
30 |
+<title>EAPI=7</title> |
31 |
+<body> |
32 |
+<subsection> |
33 |
+<title>Terminology</title> |
34 |
+<body> |
35 |
+<p>Documents may use the following terms to better describe dependency and installation targets.</p> |
36 |
+<ul> |
37 |
+ <li> |
38 |
+ <p><b><c>CHOST</c></b></p> |
39 |
+ <p>The system that will be running the installed package.</p> |
40 |
+ </li> |
41 |
+ <li> |
42 |
+ <p><b><c>CBUILD</c></b></p> |
43 |
+ <p>The system used to build packages. When not cross-compiling, CBUILD == CHOST.</p> |
44 |
+ </li> |
45 |
+ <li> |
46 |
+ <p><b><c>CTARGET</c></b></p> |
47 |
+ <p>Used in certain cross-compliations, often empty value.</p> |
48 |
+ </li> |
49 |
+</ul> |
50 |
+</body> |
51 |
+</subsection> |
52 |
+<subsection> |
53 |
+<title>Variables</title> |
54 |
+<body> |
55 |
+<ul> |
56 |
+ <li> |
57 |
+ <p><b><c>PORTDIR</c> and <c>ECLASSDIR</c> are removed</b></p> |
58 |
+ <p><c>PORTDIR</c> and <c>ECLASSDIR</c> are no longer defined and cannot be used |
59 |
+ in ebuilds to access these directories.</p> |
60 |
+ </li> |
61 |
+ <li> |
62 |
+ <p><b><c>DESTTREE</c> and <c>INSDESTTREE</c> are removed</b></p> |
63 |
+ <p>The unintended exported variables <c>PORTDIR</c> and <c>ECLASSDIR</c> |
64 |
+ cannot be used in ebuilds to manipulate installation paths. |
65 |
+ Use <c>into</c> or <c>insinto</c>, respectively, instead.</p> |
66 |
+ </li> |
67 |
+ <li> |
68 |
+ <p><b><c>D</c>, <c>ED</c>, <c>ROOT</c>, and <c>EROOT</c> modified</b></p> |
69 |
+ <p>These variables no longer contain a trailing slash with <c>EAPI=7</c>.</p> |
70 |
+ </li> |
71 |
+ <li> |
72 |
+ <p><b><c>BDEPEND</c> addded</b></p> |
73 |
+ <p> |
74 |
+ Previously, all build-time tools and libraries went into the <c>DEPEND</c>. |
75 |
+ Now, built-time dependencies are split into <c>DEPEND</c> and <c>BDEPEND</c>. |
76 |
+ The difference is simply that <c>BDEPEND</c> are dependencies to be executed on the CBUILD. |
77 |
+ <c>DEPEND</c> remains for other dependencies, such as libraries, for the CHOST. |
78 |
+ This improves the cross-compliation support. |
79 |
+ </p> |
80 |
+ </li> |
81 |
+ <li> |
82 |
+ <p><b><c>BROOT</c> added</b></p> |
83 |
+ <p><c>BROOT</c> is the absolute path to the root directory, including any prefix, containing build |
84 |
+ dependencies satisfied by BDEPEND, typically executable build tools.</p> |
85 |
+ </li> |
86 |
+ <li> |
87 |
+ <p><b><c>SYSROOT</c> and <c>ESYSROOT</c> added</b></p> |
88 |
+ <p><c>SYSROOT</c> is the location of where dependencies in <c>DEPEND</c> are installed. |
89 |
+ <c>ESYSROOT</c> is <c>SYSROOT</c> with <c>EPREFIX</c> appended. |
90 |
+ </p> |
91 |
+ </li> |
92 |
+ <li> |
93 |
+ <p><b><c>ENV_UNSET</c> added</b></p> |
94 |
+ <p>A whitespace delimited list of variables to be removed from the build environment.</p> |
95 |
+ </li> |
96 |
+</ul> |
97 |
+</body> |
98 |
+</subsection> |
99 |
+<subsection> |
100 |
+<title>Metadata</title> |
101 |
+<body> |
102 |
+<ul> |
103 |
+ <li> |
104 |
+ <p><b>Empty groupings are banned</b><p> |
105 |
+ <p>Groupings which are empty, such as <c>DEPEND="|| ( ${empty_var} )"</c> will now generate an error. |
106 |
+ Furthermore, conditions within groupings are more strictly enforced. |
107 |
+ Eg. <c>REQUIRED_USE="|| ( foo? ( bar ) baz? ( zoinks )"</c> would previously work with <c>USE="-a -b"<c> now requires |
108 |
+ either <c>USE="foo bar"</c> or <c>USE="baz zoinks"</c>. |
109 |
+ </p> |
110 |
+ </li> |
111 |
+</ul> |
112 |
+</body> |
113 |
+</subsection> |
114 |
+<subsection> |
115 |
+<title>Profiles</title> |
116 |
+<body> |
117 |
+<ul> |
118 |
+ <li> |
119 |
+ <p><b><c>package.provided</c> banned</b><p> |
120 |
+ <p>Profiles may no longer contain a <c>package.provided</c> file with <c>EAPI=7</c>.</p> |
121 |
+ </li> |
122 |
+</ul> |
123 |
+</body> |
124 |
+</subsection> |
125 |
+<subsection> |
126 |
+<title>Helpers</title> |
127 |
+<body> |
128 |
+<ul> |
129 |
+ <li> |
130 |
+ <p><b><c>dohtml</c> banned</b></p> |
131 |
+ <p> |
132 |
+ The <c>dohtml</c> helper has been banned with <c>EAPI=7</c>. |
133 |
+ </p> |
134 |
+ </li> |
135 |
+ <li> |
136 |
+ <p><b><c>dolib</c> and <c>libopts</c> banned</b></p> |
137 |
+ <p> |
138 |
+ The <c>dolib</c> helper and the associated <c>libopts</c> have been banned with <c>EAPI=7</c>. |
139 |
+ </p> |
140 |
+ </li> |
141 |
+ <li> |
142 |
+ <p><b><c>has_version</c> and <c>best_version</c> changes</b></p> |
143 |
+ <p> |
144 |
+ <c>has_version</c> and <c>best_version</c> now support an optional switch |
145 |
+ to determine which type of dependencies to check. |
146 |
+ </p> |
147 |
+ <ul> |
148 |
+ <li><p><c>-r</c> (the default) will check runtime dependencies (RDEPEND)</p></li> |
149 |
+ <li><p><c>-d</c> will check target build-time dependencies (DEPEND)</p></li> |
150 |
+ <li><p><c>-b</c> will check host build-time dependencies (BDEPEND)</p></li> |
151 |
+ </ul> |
152 |
+ </li> |
153 |
+ <li> |
154 |
+ <p><b>Version manipulation and comparision commands</b></p> |
155 |
+ <p> |
156 |
+ EAPI=7 introduced three commands for common version number operations. |
157 |
+ </p> |
158 |
+ <ul> |
159 |
+ <li><p><c>ver_cut</c> obtains substrings of a version string</p></li> |
160 |
+ <li><p><c>ver_rs</c> replaces separators in a version string</p></li> |
161 |
+ <li><p><c>ver_test</c> compares two versions</p></li> |
162 |
+ </ul> |
163 |
+ <p>See <uri link="::ebuild-writing/variables#Version%20and%20Name%20Formatting%20Issues"/> |
164 |
+ for examples of common uses or |
165 |
+ <uri link="https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#version-manipulation-and-comparison-commands"> |
166 |
+ an in-depth look</uri></p> |
167 |
+ </li> |
168 |
+ <li> |
169 |
+ <p><b>New function <c>eqawarn</c></b></p> |
170 |
+ <p> |
171 |
+ The <c>eqawarn</c> helper has been added with <c>EAPI=7</c>. |
172 |
+ This function is to alert developers to a deprecated feature. |
173 |
+ Previously, this was contained in <c>eutils</c> eclass which is no longer necessary. |
174 |
+ </p> |
175 |
+ </li> |
176 |
+ <li> |
177 |
+ <p><b>New function <c>dostrip</c></b></p> |
178 |
+ <p> |
179 |
+ The <c>dostrip</c> helper has been added with <c>EAPI=7</c>. |
180 |
+ This function controls whether or not to strip a binary.<br> |
181 |
+ <c>dostrip -x [file]</c> will exclude a binary from being stripped.<br> |
182 |
+ Conversely, when combined with RESTRICT=strip, <c>dostrip [file]</c> selects a binary |
183 |
+ file to be stripped. |
184 |
+ </p> |
185 |
+ </li> |
186 |
+ <li> |
187 |
+ <p><b><c>die</c> and <c>assert</c> changes</b></p> |
188 |
+ <p>These commands are now safe to use in a subshell and act as if they were called in the main process.</p> |
189 |
+ </li> |
190 |
+ <li> |
191 |
+ <p><b><c>nonfatal</c> changes</b></p> |
192 |
+ <p>The <c>nonfatal</c> command now works for shell functions and subprocesses.</p> |
193 |
+ </li> |
194 |
+ <li> |
195 |
+ <p><b><c>domo</c> behaviour changed</b></p> |
196 |
+ <p><c>domo</c> (for localizations) now ignores the <c>into</c> directives. |
197 |
+ This follows similar commands like <c>doinfo</c> and <c>doman</c>.</p> |
198 |
+ </li> |
199 |
+ <li> |
200 |
+ <p><b><c>econf</c> changes</b></p> |
201 |
+ <p>The cross-compilation options <c>--build</c> and <c>--target</c> options |
202 |
+ to specify <c>CBUILD</c> and <c>CTARGET</c> respectively have been added and are retro-active to all EAPIs. |
203 |
+ In addition, if the build supports <c>--with-sysroot</c>, the correct value will be passed |
204 |
+ such that normal and cross-compliations succeed. |
205 |
+ </p> |
206 |
+ </li> |
207 |
+</ul> |
208 |
+</body> |
209 |
+</subsection> |
210 |
+</body> |
211 |
+</section> |
212 |
+ |
213 |
</body> |
214 |
</chapter> |
215 |
</guide> |