1 |
commit: 404265ebc3cd062402d737dc120f872c3330fa86 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 14 17:08:48 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 24 12:51:35 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=404265eb |
7 |
|
8 |
src_prepare: Show new EAPI 6 default_src_prepare |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
ebuild-writing/functions/src_prepare/text.xml | 13 +++++++++++++ |
13 |
1 file changed, 13 insertions(+) |
14 |
|
15 |
diff --git a/ebuild-writing/functions/src_prepare/text.xml b/ebuild-writing/functions/src_prepare/text.xml |
16 |
index 2a8cb84..4ff2074 100644 |
17 |
--- a/ebuild-writing/functions/src_prepare/text.xml |
18 |
+++ b/ebuild-writing/functions/src_prepare/text.xml |
19 |
@@ -40,6 +40,19 @@ src_prepare() { |
20 |
true; |
21 |
} |
22 |
</codesample> |
23 |
+<p> |
24 |
+Beginning with EAPI=6, the src_prepare function gained a new default implementation: |
25 |
+</p> |
26 |
+<codesample lang="ebuild"> |
27 |
+src_prepare() { |
28 |
+ if declare -p PATCHES | grep -q "^declare -a "; then |
29 |
+ [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" |
30 |
+ else |
31 |
+ [[ -n ${PATCHES} ]] && eapply ${PATCHES} |
32 |
+ fi |
33 |
+ eapply_user |
34 |
+} |
35 |
+</codesample> |
36 |
</body> |
37 |
</section> |