summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-16 08:09:03 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-16 08:13:31 +0100
commit9f7e5ff5e4e19801c4252eac16810afa77820311 (patch)
tree3eec39735ec8186e4bea2b41800ed6bb1c125d0b /eclass/eutils.eclass
parentapp-emacs/magit: add 2.3.1 (diff)
downloadgentoo-9f7e5ff5e4e19801c4252eac16810afa77820311.tar.gz
gentoo-9f7e5ff5e4e19801c4252eac16810afa77820311.tar.bz2
gentoo-9f7e5ff5e4e19801c4252eac16810afa77820311.zip
eutils.eclass: in_iuse and einstalldocs are part of EAPI 6
Disable in_iuse and einstalldocs in EAPIs other than {0..5} since they are now part of EAPI.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass80
1 files changed, 42 insertions, 38 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index c2a64e312dd6..a08aee40f7ee 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1512,15 +1512,17 @@ path_exists() {
# as necessary.
#
# Note that this function should not be used in the global scope.
-in_iuse() {
- debug-print-function ${FUNCNAME} "${@}"
- [[ ${#} -eq 1 ]] || die "Invalid args to ${FUNCNAME}()"
+if has "${EAPI:-0}" 0 1 2 3 4 5; then
+ in_iuse() {
+ debug-print-function ${FUNCNAME} "${@}"
+ [[ ${#} -eq 1 ]] || die "Invalid args to ${FUNCNAME}()"
- local flag=${1}
- local liuse=( ${IUSE} )
+ local flag=${1}
+ local liuse=( ${IUSE} )
- has "${flag}" "${liuse[@]#[+-]}"
-}
+ has "${flag}" "${liuse[@]#[+-]}"
+ }
+fi
# @FUNCTION: use_if_iuse
# @USAGE: <flag>
@@ -1714,42 +1716,44 @@ prune_libtool_files() {
#
# Passing additional options to dodoc and dohtml is not supported.
# If you needed such a thing, you need to call those helpers explicitly.
-einstalldocs() {
- debug-print-function ${FUNCNAME} "${@}"
-
- local dodoc_opts=-r
- has ${EAPI} 0 1 2 3 && dodoc_opts=
-
- if ! declare -p DOCS &>/dev/null ; then
- local d
- for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
- THANKS BUGS FAQ CREDITS CHANGELOG ; do
- if [[ -s ${d} ]] ; then
- dodoc "${d}" || die
+if has "${EAPI:-0}" 0 1 2 3 4 5; then
+ einstalldocs() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local dodoc_opts=-r
+ has ${EAPI} 0 1 2 3 && dodoc_opts=
+
+ if ! declare -p DOCS &>/dev/null ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
+ THANKS BUGS FAQ CREDITS CHANGELOG ; do
+ if [[ -s ${d} ]] ; then
+ dodoc "${d}" || die
+ fi
+ done
+ elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then
+ if [[ ${DOCS[@]} ]] ; then
+ dodoc ${dodoc_opts} "${DOCS[@]}" || die
+ fi
+ else
+ if [[ ${DOCS} ]] ; then
+ dodoc ${dodoc_opts} ${DOCS} || die
fi
- done
- elif [[ $(declare -p DOCS) == "declare -a"* ]] ; then
- if [[ ${DOCS[@]} ]] ; then
- dodoc ${dodoc_opts} "${DOCS[@]}" || die
- fi
- else
- if [[ ${DOCS} ]] ; then
- dodoc ${dodoc_opts} ${DOCS} || die
fi
- fi
- if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then
- if [[ ${HTML_DOCS[@]} ]] ; then
- dohtml -r "${HTML_DOCS[@]}" || die
- fi
- else
- if [[ ${HTML_DOCS} ]] ; then
- dohtml -r ${HTML_DOCS} || die
+ if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]] ; then
+ if [[ ${HTML_DOCS[@]} ]] ; then
+ dohtml -r "${HTML_DOCS[@]}" || die
+ fi
+ else
+ if [[ ${HTML_DOCS} ]] ; then
+ dohtml -r ${HTML_DOCS} || die
+ fi
fi
- fi
- return 0
-}
+ return 0
+ }
+fi
check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; }