summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-07-06 14:41:17 +0000
committerMichał Górny <mgorny@gentoo.org>2014-07-06 14:41:17 +0000
commitdab0f2fc34736449bf9bb916adb2c04a0fcf2fc4 (patch)
treed346cf89c9798e8977c30b0b322059068eab545c /eclass/python-r1.eclass
parentVersion bump (diff)
downloadhistorical-dab0f2fc34736449bf9bb916adb2c04a0fcf2fc4.tar.gz
historical-dab0f2fc34736449bf9bb916adb2c04a0fcf2fc4.tar.bz2
historical-dab0f2fc34736449bf9bb916adb2c04a0fcf2fc4.zip
python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the implementations is actually enabled. Fixes bug #516520.
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r--eclass/python-r1.eclass16
1 files changed, 9 insertions, 7 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 395c1a60322b..4e4e047519c9 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.74 2014/06/19 08:08:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.75 2014/07/06 14:41:17 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -368,17 +368,19 @@ python_gen_cond_dep() {
local dep=${1}
shift
- # substitute ${PYTHON_USEDEP} if used
- if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
- local PYTHON_USEDEP=$(python_gen_usedep "${@}")
- dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
- fi
-
for impl in "${PYTHON_COMPAT[@]}"; do
_python_impl_supported "${impl}" || continue
for pattern; do
if [[ ${impl} == ${pattern} ]]; then
+ # substitute ${PYTHON_USEDEP} if used
+ # (since python_gen_usedep() will not return ${PYTHON_USEDEP}
+ # the code is run at most once)
+ if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
+ local PYTHON_USEDEP=$(python_gen_usedep "${@}")
+ dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+ fi
+
matches+=( "python_targets_${impl}? ( ${dep} )" )
break
fi