summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-07-06 20:17:12 +0000
committerZac Medico <zmedico@gentoo.org>2009-07-06 20:17:12 +0000
commitdb019afbb27145942daa3d2c9f2eaccde9f228ec (patch)
treeea981fa444407e1e26d3123c5a377fb049203d6d /bin/ebuild.sh
parentb6e900218ccf1acf7003c2b35a76317efc64ec8d (diff)
downloadportage-db019afbb27145942daa3d2c9f2eaccde9f228ec.tar.gz
portage-db019afbb27145942daa3d2c9f2eaccde9f228ec.tar.bz2
portage-db019afbb27145942daa3d2c9f2eaccde9f228ec.zip
Bug #273631 - Add default src_install implementation for EAPI 3. Thanks to
Markus Meier <maekke@gentoo.org> for this patch (and people in #gentoo-portage for bash syntax tweaks). svn path=/main/trunk/; revision=13798
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh21
1 files changed, 21 insertions, 0 deletions
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 "$@" ; }