summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-11-02 15:35:34 +0100
committerLars Wendler <polynomial-c@gentoo.org>2016-11-02 15:39:12 +0100
commit527f9a33ac8e2bfff7d90cfcbda092a7e080d5f6 (patch)
treeb7784e6e745904b0b66be8d953c56b4227b000e0 /eclass/apache-2.eclass
parentdev-lang/rust: bump allowed LLVM version (diff)
downloadgentoo-527f9a33ac8e2bfff7d90cfcbda092a7e080d5f6.tar.gz
gentoo-527f9a33ac8e2bfff7d90cfcbda092a7e080d5f6.tar.bz2
gentoo-527f9a33ac8e2bfff7d90cfcbda092a7e080d5f6.zip
apache-2.eclass: Handle PATCHES array. Added epatch_user.
Diffstat (limited to 'eclass/apache-2.eclass')
-rw-r--r--eclass/apache-2.eclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 3f9e706f8b93..a8d5804af61c 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -23,7 +23,7 @@ case ${EAPI:-0} in
:;
;;
6)
- die "This eclass is not yet ready for EAPI-6"
+ die "This eclass is not yet ready for EAPI-6. Please help porting it!"
;;
esac
@@ -453,6 +453,20 @@ apache-2_src_prepare() {
epatch "${GENTOO_PATCHDIR}"/patches/*.patch
+ if [[ ${EAPI} = 5 ]] ; then
+ # Handle patches from ebuild's PATCHES array if one is given
+ if [[ -n "${PATCHES}" ]] ; then
+ local patchestype=$(declare -p PATCHES 2>&-)
+ if [[ "${patchestype}" != "declare -a PATCHES="* ]] ; then
+ die "Declaring PATCHES as a variable is forbidden. Please use an array instead."
+ fi
+ epatch "${PATCHES[@]}"
+ fi
+
+ # Handle user patches
+ epatch_user
+ fi
+
# setup the filesystem layout config
cat "${GENTOO_PATCHDIR}"/patches/config.layout >> "${S}"/config.layout || \
die "Failed preparing config.layout!"