---
 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


Reply via email to