summaryrefslogtreecommitdiffstats
path: root/bin/phase-functions.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-29 22:04:42 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-29 22:04:42 -0700
commit6b4b621f1abcf21d3bfa54b323126a3ef11eb52c (patch)
tree7fa1b7e4ddc3c01093f2166410191b81d5c08ff2 /bin/phase-functions.sh
parent40ef0fd75e329b789ae1fd98184b89520e9ee0c3 (diff)
downloadportage-6b4b621f1abcf21d3bfa54b323126a3ef11eb52c.tar.gz
portage-6b4b621f1abcf21d3bfa54b323126a3ef11eb52c.tar.bz2
portage-6b4b621f1abcf21d3bfa54b323126a3ef11eb52c.zip
EAPI 5: User patches (no-op dummy stub for now)
A real apply_user_patches implementation will be a bit more work, so for now we'll just implement the minimum amount necessary to satisfy the spec: http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=a8bf7862967cce36b7f1b408934a774126da2538
Diffstat (limited to 'bin/phase-functions.sh')
-rw-r--r--bin/phase-functions.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index c23be74d3..ff7d85520 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -277,7 +277,8 @@ dyn_clean() {
"$PORTAGE_BUILDDIR"/.{configured,compiled,tested,packaged} \
"$PORTAGE_BUILDDIR"/.die_hooks \
"$PORTAGE_BUILDDIR"/.ipc_{in,out,lock} \
- "$PORTAGE_BUILDDIR"/.exit_status
+ "$PORTAGE_BUILDDIR"/.exit_status \
+ "$PORTAGE_BUILDDIR"/.apply_user_patches
rm -rf "${PORTAGE_BUILDDIR}/build-info"
rm -rf "${WORKDIR}"
@@ -381,6 +382,14 @@ dyn_prepare() {
die "Failed to create $PORTAGE_BUILDDIR/.prepared"
vecho ">>> Source prepared."
ebuild_phase post_src_prepare
+ case "${EAPI}" in
+ 0|1|2|3|4|4-python|4-slot-abi)
+ ;;
+ *)
+ [[ ! -f ${PORTAGE_BUILDDIR}/.apply_user_patches ]] && \
+ die "src_prepare must call apply_user_patches at least once"
+ ;;
+ esac
trap - SIGINT SIGQUIT
}
@@ -804,6 +813,18 @@ _ebuild_phase_funcs() {
eval "default_src_install() { _eapi4_src_install \"\$@\" ; }"
[[ $phase_func = src_install ]] && \
eval "default() { _eapi4_$phase_func \"\$@\" ; }"
+ case "$eapi" in
+ 4|4-python|4-slot-abi)
+ ;;
+ *)
+ ! declare -F src_prepare >/dev/null && \
+ src_prepare() { _eapi5_src_prepare "$@" ; }
+ default_src_prepare() { _eapi5_src_prepare "$@" ; }
+ [[ $phase_func = src_prepare ]] && \
+ eval "default() { _eapi5_$phase_func \"\$@\" ; }"
+ apply_user_patches() { _eapi5_apply_user_patches "$@" ; }
+ ;;
+ esac
;;
esac