1 |
commit: 527f9a33ac8e2bfff7d90cfcbda092a7e080d5f6 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 2 14:35:34 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 14:39:12 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=527f9a33 |
7 |
|
8 |
apache-2.eclass: Handle PATCHES array. Added epatch_user. |
9 |
|
10 |
eclass/apache-2.eclass | 16 +++++++++++++++- |
11 |
1 file changed, 15 insertions(+), 1 deletion(-) |
12 |
|
13 |
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass |
14 |
index 3f9e706..a8d5804 100644 |
15 |
--- a/eclass/apache-2.eclass |
16 |
+++ b/eclass/apache-2.eclass |
17 |
@@ -23,7 +23,7 @@ case ${EAPI:-0} in |
18 |
:; |
19 |
;; |
20 |
6) |
21 |
- die "This eclass is not yet ready for EAPI-6" |
22 |
+ die "This eclass is not yet ready for EAPI-6. Please help porting it!" |
23 |
;; |
24 |
esac |
25 |
|
26 |
@@ -453,6 +453,20 @@ apache-2_src_prepare() { |
27 |
|
28 |
epatch "${GENTOO_PATCHDIR}"/patches/*.patch |
29 |
|
30 |
+ if [[ ${EAPI} = 5 ]] ; then |
31 |
+ # Handle patches from ebuild's PATCHES array if one is given |
32 |
+ if [[ -n "${PATCHES}" ]] ; then |
33 |
+ local patchestype=$(declare -p PATCHES 2>&-) |
34 |
+ if [[ "${patchestype}" != "declare -a PATCHES="* ]] ; then |
35 |
+ die "Declaring PATCHES as a variable is forbidden. Please use an array instead." |
36 |
+ fi |
37 |
+ epatch "${PATCHES[@]}" |
38 |
+ fi |
39 |
+ |
40 |
+ # Handle user patches |
41 |
+ epatch_user |
42 |
+ fi |
43 |
+ |
44 |
# setup the filesystem layout config |
45 |
cat "${GENTOO_PATCHDIR}"/patches/config.layout >> "${S}"/config.layout || \ |
46 |
die "Failed preparing config.layout!" |