Skip to content

Commit

Permalink
Add tentative EAPI6 phase functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Sep 4, 2014
1 parent 1a0e6e5 commit ecb5d5c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/phase-functions.sh
Expand Up @@ -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
}
Expand Down
18 changes: 18 additions & 0 deletions bin/phase-helpers.sh
Expand Up @@ -752,6 +752,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:
Expand Down

0 comments on commit ecb5d5c

Please sign in to comment.