diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2012-09-27 17:12:34 +0000 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2012-09-27 17:12:34 +0000 |
commit | c66be8f747150e04f103e5e9a200adda6d584100 (patch) | |
tree | 45950e38f14b6c48c5ec44771a89f3f03541de9a | |
parent | Disable spreadsheet model on 0.1 as it aint working there. (diff) | |
download | historical-c66be8f747150e04f103e5e9a200adda6d584100.tar.gz historical-c66be8f747150e04f103e5e9a200adda6d584100.tar.bz2 historical-c66be8f747150e04f103e5e9a200adda6d584100.zip |
Made 'usex' declaration conditional on lack of PM or EAPI5+ support
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/eutils.eclass | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index e1e87d69d9d9..5546d08151b0 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.414 2012/09/27 16:35:41 axs Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.415 2012/09/27 17:12:34 axs Exp $ + + 27 Sep 2012; Ian Stakenvicius <axs@gentoo.org> eutils.eclass: + Made 'usex' declaration conditional on lack of PM or EAPI5+ support 27 Sep 2012; Ian Stakenvicius <axs@gentoo.org> fortran-2.eclass, selinux-policy-2.eclass, vdr-plugin-2.eclass, xorg-2.eclass, diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 8bfc2bc78669..ff06d254f288 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.403 2012/09/15 16:16:53 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.404 2012/09/27 17:12:34 axs Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -1371,9 +1371,13 @@ use_if_iuse() { # @FUNCTION: usex # @USAGE: <USE flag> [true output] [false output] [true suffix] [false suffix] # @DESCRIPTION: +# Proxy to declare usex for package managers or EAPIs that do not provide it +# and use the package manager implementation when available (i.e. EAPI >= 5). # If USE flag is set, echo [true output][true suffix] (defaults to "yes"), # otherwise echo [false output][false suffix] (defaults to "no"). -usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 +if ! declare -F usex >/dev/null ; then + usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963 +fi # @FUNCTION: prune_libtool_files # @USAGE: [--all] |