1 |
commit: 06ebb1e10f4c93b4be4ee76442f63c88b328169c |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 16 19:06:02 2021 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 17 21:21:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=06ebb1e1 |
7 |
|
8 |
EAPI 8: Default src_prepare doesn't accept options in PATCHES |
9 |
|
10 |
Bug: https://bugs.gentoo.org/752486 |
11 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
12 |
|
13 |
eapi-differences.tex | 3 ++- |
14 |
ebuild-functions.tex | 21 ++++++++++++++++++++- |
15 |
2 files changed, 22 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/eapi-differences.tex b/eapi-differences.tex |
18 |
index f3af563..5d7170d 100644 |
19 |
--- a/eapi-differences.tex |
20 |
+++ b/eapi-differences.tex |
21 |
@@ -121,7 +121,7 @@ Use dependencies & \compactfeatureref{use-deps} & |
22 |
* & Yes & Yes & Yes & Yes \\ |
23 |
|
24 |
\t{src_prepare} style & \compactfeatureref{src-prepare} & |
25 |
- * & no-op & 6 & 6 & 6 \\ |
26 |
+ * & no-op & 6 & 6 & 8 \\ |
27 |
|
28 |
\t{src_configure} & \compactfeatureref{src-configure} & |
29 |
* & Yes & Yes & Yes & Yes \\ |
30 |
@@ -494,6 +494,7 @@ EAPI 8 is EAPI 7 with the following changes: |
31 |
\item Bash version is 5.0, \featureref{bash-version}. |
32 |
\item Selective fetch/mirror restriction, \featureref{uri-restrict}. |
33 |
\item \t{IDEPEND}, \featureref{idepend}. |
34 |
+\item Different \t{src_prepare} implementation, \featureref{src-prepare-8}. |
35 |
\end{compactitem} |
36 |
|
37 |
\ChangeWhenAddingAnEAPI{8} |
38 |
|
39 |
diff --git a/ebuild-functions.tex b/ebuild-functions.tex |
40 |
index 108b8bc..c8e02db 100644 |
41 |
--- a/ebuild-functions.tex |
42 |
+++ b/ebuild-functions.tex |
43 |
@@ -144,6 +144,24 @@ src_prepare() { |
44 |
\end{verbatim} |
45 |
\end{listing} |
46 |
|
47 |
+\featurelabel{src-prepare-8} For EAPIs listed in table~\ref{tab:src-prepare-table} as using format |
48 |
+8, the default implementation used when the ebuild lacks the \t{src_prepare} function shall behave |
49 |
+as: |
50 |
+ |
51 |
+\begin{listing}[H] |
52 |
+\caption{\t{src_prepare}, format~8} |
53 |
+\begin{verbatim} |
54 |
+src_prepare() { |
55 |
+ if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then |
56 |
+ [[ -n ${PATCHES[@]} ]] && eapply -- "${PATCHES[@]}" |
57 |
+ else |
58 |
+ [[ -n ${PATCHES} ]] && eapply -- ${PATCHES} |
59 |
+ fi |
60 |
+ eapply_user |
61 |
+} |
62 |
+\end{verbatim} |
63 |
+\end{listing} |
64 |
+ |
65 |
For other EAPIs supporting \t{src_prepare}, the default implementation used when the ebuild lacks |
66 |
the \t{src_prepare} function is a no-op. |
67 |
|
68 |
@@ -158,7 +176,8 @@ the \t{src_prepare} function is a no-op. |
69 |
\midrule |
70 |
0, 1 & No & Not applicable \\ |
71 |
2, 3, 4, 5 & Yes & no-op \\ |
72 |
- 6, 7, 8 & Yes & 6 \\ |
73 |
+ 6, 7 & Yes & 6 \\ |
74 |
+ 8 & Yes & 8 \\ |
75 |
\bottomrule |
76 |
\end{tabular} |
77 |
\end{centertable} |