1 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
2 |
--- |
3 |
eclass/epatch.eclass | 90 ++------------------------------------------ |
4 |
1 file changed, 4 insertions(+), 86 deletions(-) |
5 |
|
6 |
diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass |
7 |
index 6a9c460da0a3..17526653673a 100644 |
8 |
--- a/eclass/epatch.eclass |
9 |
+++ b/eclass/epatch.eclass |
10 |
@@ -4,7 +4,7 @@ |
11 |
# @ECLASS: epatch.eclass |
12 |
# @MAINTAINER: |
13 |
# base-system@g.o |
14 |
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 |
15 |
+# @SUPPORTED_EAPIS: 6 |
16 |
# @BLURB: easy patch application functions |
17 |
# @DEPRECATED: eapply from EAPI 7 |
18 |
# @DESCRIPTION: |
19 |
@@ -13,11 +13,9 @@ |
20 |
|
21 |
if [[ -z ${_EPATCH_ECLASS} ]]; then |
22 |
|
23 |
-case ${EAPI:-0} in |
24 |
- 0|1|2|3|4|5|6) |
25 |
- ;; |
26 |
- *) |
27 |
- die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";; |
28 |
+case ${EAPI} in |
29 |
+ 6) ;; |
30 |
+ *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; |
31 |
esac |
32 |
|
33 |
inherit estack |
34 |
@@ -386,85 +384,5 @@ epatch() { |
35 |
: # everything worked |
36 |
} |
37 |
|
38 |
-case ${EAPI:-0} in |
39 |
-0|1|2|3|4|5) |
40 |
- |
41 |
-# @ECLASS_VARIABLE: EPATCH_USER_SOURCE |
42 |
-# @USER_VARIABLE |
43 |
-# @DESCRIPTION: |
44 |
-# Location for user patches, see the epatch_user function. |
45 |
-# Should be set by the user. Don't set this in ebuilds. |
46 |
-: ${EPATCH_USER_SOURCE:=${PORTAGE_CONFIGROOT%/}/etc/portage/patches} |
47 |
- |
48 |
-# @FUNCTION: epatch_user |
49 |
-# @USAGE: |
50 |
-# @DESCRIPTION: |
51 |
-# Applies user-provided patches to the source tree. The patches are |
52 |
-# taken from /etc/portage/patches/<CATEGORY>/<P-PR|P|PN>[:SLOT]/, where the first |
53 |
-# of these three directories to exist will be the one to use, ignoring |
54 |
-# any more general directories which might exist as well. They must end |
55 |
-# in ".patch" to be applied. |
56 |
-# |
57 |
-# User patches are intended for quick testing of patches without ebuild |
58 |
-# modifications, as well as for permanent customizations a user might |
59 |
-# desire. Obviously, there can be no official support for arbitrarily |
60 |
-# patched ebuilds. So whenever a build log in a bug report mentions that |
61 |
-# user patches were applied, the user should be asked to reproduce the |
62 |
-# problem without these. |
63 |
-# |
64 |
-# Not all ebuilds do call this function, so placing patches in the |
65 |
-# stated directory might or might not work, depending on the package and |
66 |
-# the eclasses it inherits and uses. It is safe to call the function |
67 |
-# repeatedly, so it is always possible to add a call at the ebuild |
68 |
-# level. The first call is the time when the patches will be |
69 |
-# applied. |
70 |
-# |
71 |
-# Ideally, this function should be called after gentoo-specific patches |
72 |
-# have been applied, so that their code can be modified as well, but |
73 |
-# before calls to e.g. eautoreconf, as the user patches might affect |
74 |
-# autotool input files as well. |
75 |
-epatch_user() { |
76 |
- [[ $# -ne 0 ]] && die "epatch_user takes no options" |
77 |
- |
78 |
- # Allow multiple calls to this function; ignore all but the first |
79 |
- local applied="${T}/epatch_user.log" |
80 |
- [[ -e ${applied} ]] && return 2 |
81 |
- |
82 |
- # don't clobber any EPATCH vars that the parent might want |
83 |
- local EPATCH_SOURCE check |
84 |
- for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT%/*}}; do |
85 |
- EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check} |
86 |
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check} |
87 |
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check} |
88 |
- if [[ -d ${EPATCH_SOURCE} ]] ; then |
89 |
- local old_n_applied_patches=${EPATCH_N_APPLIED_PATCHES:-0} |
90 |
- EPATCH_SOURCE=${EPATCH_SOURCE} \ |
91 |
- EPATCH_SUFFIX="patch" \ |
92 |
- EPATCH_FORCE="yes" \ |
93 |
- EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \ |
94 |
- epatch |
95 |
- echo "${EPATCH_SOURCE}" > "${applied}" |
96 |
- if [[ ${old_n_applied_patches} -lt ${EPATCH_N_APPLIED_PATCHES} ]]; then |
97 |
- has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || \ |
98 |
- EBUILD_DEATH_HOOKS+=" epatch_user_death_notice" |
99 |
- fi |
100 |
- return 0 |
101 |
- fi |
102 |
- done |
103 |
- echo "none" > "${applied}" |
104 |
- return 1 |
105 |
-} |
106 |
- |
107 |
-# @FUNCTION: epatch_user_death_notice |
108 |
-# @INTERNAL |
109 |
-# @DESCRIPTION: |
110 |
-# Include an explicit notice in the die message itself that user patches were |
111 |
-# applied to this build. |
112 |
-epatch_user_death_notice() { |
113 |
- ewarn "!!! User patches were applied to this build!" |
114 |
-} |
115 |
- |
116 |
-esac |
117 |
- |
118 |
_EPATCH_ECLASS=1 |
119 |
fi #_EPATCH_ECLASS |
120 |
-- |
121 |
2.35.1 |