1 |
commit: c9cbd8218419463a9f78a511810b0b482d2a01d8 |
2 |
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 29 13:12:19 2015 +0000 |
4 |
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 29 14:14:35 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9cbd821 |
7 |
|
8 |
eutils.eclass: Allow to configure base patch location for epatch_user |
9 |
|
10 |
This is particularly useful for people who run alternative |
11 |
package managers and want to control their configuration. |
12 |
|
13 |
Reviewed-By: SpanKY <vapier <AT> gentoo.org> |
14 |
Gentoo-Bug: 559698 |
15 |
Github-PR: https://github.com/gentoo/gentoo/pull/69 |
16 |
|
17 |
eclass/eutils.eclass | 14 ++++++++++---- |
18 |
1 file changed, 10 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass |
21 |
index b7f0970..7331796 100644 |
22 |
--- a/eclass/eutils.eclass |
23 |
+++ b/eclass/eutils.eclass |
24 |
@@ -350,6 +350,12 @@ EPATCH_FORCE="no" |
25 |
# List of patches not to apply. Note this is only file names, |
26 |
# and not the full path. Globs accepted. |
27 |
|
28 |
+# @VARIABLE: EPATCH_USER_SOURCE |
29 |
+# @DESCRIPTION: |
30 |
+# Location for user patches, see the epatch_user function. |
31 |
+# Should be set by the user. Don't set this in ebuilds. |
32 |
+: ${EPATCH_USER_SOURCE:=${PORTAGE_CONFIGROOT%/}/etc/portage/patches} |
33 |
+ |
34 |
# @FUNCTION: epatch |
35 |
# @USAGE: [options] [patches] [dirs of patches] |
36 |
# @DESCRIPTION: |
37 |
@@ -697,11 +703,11 @@ epatch_user() { |
38 |
[[ -e ${applied} ]] && return 2 |
39 |
|
40 |
# don't clobber any EPATCH vars that the parent might want |
41 |
- local EPATCH_SOURCE check base=${PORTAGE_CONFIGROOT%/}/etc/portage/patches |
42 |
+ local EPATCH_SOURCE check |
43 |
for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do |
44 |
- EPATCH_SOURCE=${base}/${CTARGET}/${check} |
45 |
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check} |
46 |
- [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check} |
47 |
+ EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check} |
48 |
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check} |
49 |
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check} |
50 |
if [[ -d ${EPATCH_SOURCE} ]] ; then |
51 |
EPATCH_SOURCE=${EPATCH_SOURCE} \ |
52 |
EPATCH_SUFFIX="patch" \ |