From db019afbb27145942daa3d2c9f2eaccde9f228ec Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 6 Jul 2009 20:17:12 +0000 Subject: Bug #273631 - Add default src_install implementation for EAPI 3. Thanks to Markus Meier for this patch (and people in #gentoo-portage for bash syntax tweaks). svn path=/main/trunk/; revision=13798 --- bin/ebuild.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index c032ae95e..c9008e33e 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -632,6 +632,24 @@ _eapi2_src_compile() { fi } +_eapi3_src_install() { + if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then + emake DESTDIR="${D}" install + fi + + if [[ -z $DOCS ]] ; then + local d + for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ + THANKS BUGS FAQ CREDITS CHANGELOG ; do + [[ -s "${d}" ]] && dodoc "${d}" + done + elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then + dodoc "${DOCS[@]}" + else + dodoc ${DOCS} + fi +} + ebuild_phase() { declare -F "$1" >/dev/null && qa_call $1 } @@ -1421,6 +1439,9 @@ _ebuild_phase_funcs() { declare -F src_compile >/dev/null || \ src_compile() { _eapi2_src_compile "$@" ; } + [[ $eapi == 2 ]] || declare -F src_install >/dev/null || \ + src_install() { _eapi3_src_install "$@" ; } + if hasq $phase_func $default_phases ; then _eapi2_pkg_nofetch () { _eapi0_pkg_nofetch "$@" ; } -- cgit v1.2.3-1-g7c22