[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-portage-dev
Subject: [gentoo-portage-dev] [PATCH 13/13] Add tentative EAPI6 phase functions
From: Michał Górny <mgorny () gentoo ! org>
Date: 2014-08-18 17:56:52
Message-ID: 1408384612-14713-14-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]
---
bin/phase-functions.sh | 11 +++++++++++
bin/phase-helpers.sh | 18 ++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index b7fb5d7..f2088bd 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -806,6 +806,17 @@ __ebuild_phase_funcs() {
declare -F src_install >/dev/null || \
src_install() { default; }
fi
+
+ # defaults starting with EAPI 6
+ if ! has ${eapi} 2 3 4 4-python 4-slot-abi 5 5-progress 5-hdepend; then
+ [[ ${phase_func} == src_prepare ]] && \
+ default_src_prepare() { __eapi6_src_prepare; }
+ [[ ${phase_func} == src_install ]] && \
+ default_src_install() { __eapi6_src_install; }
+
+ declare -F src_prepare >/dev/null || \
+ src_prepare() { default; }
+ fi
;;
esac
}
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 2eada2f..e64fe8b 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -748,6 +748,24 @@ __eapi4_src_install() {
fi
}
+__eapi6_src_prepare() {
+ if [[ $(declare -p PATCHES) == "declare -a "* ]]; then
+ eapply "${PATCHES[@]}"
+ elif [[ -n ${PATCHES} ]]; then
+ eapply ${PATCHES}
+ fi
+
+ eapply_user
+}
+
+__eapi6_src_install() {
+ if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then
+ emake DESTDIR="${D}" install
+ fi
+
+ einstalldocs
+}
+
# @FUNCTION: has_version
# @USAGE: [--host-root] <DEPEND ATOM>
# @DESCRIPTION:
--
2.0.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic