1 |
commit: 4dbf75308e2ee9775fe45272007e1ae18eca718c |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 18 17:44:00 2015 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 15 13:32:17 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dbf7530 |
7 |
|
8 |
cmake-utils.eclass: don't warn about deprecated usage when not defined |
9 |
|
10 |
eclass/cmake-utils.eclass | 7 +++++-- |
11 |
1 file changed, 5 insertions(+), 2 deletions(-) |
12 |
|
13 |
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
14 |
index fa0ddca..fd53b3a 100644 |
15 |
--- a/eclass/cmake-utils.eclass |
16 |
+++ b/eclass/cmake-utils.eclass |
17 |
@@ -556,8 +556,11 @@ enable_cmake-utils_src_configure() { |
18 |
# Convert mycmakeargs to an array, for backwards compatibility |
19 |
# Make the array a local variable since <=portage-2.1.6.x does not |
20 |
# support global arrays (see bug #297255). |
21 |
- if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then |
22 |
- eqawarn "Declaring mycmakeargs as a variable is deprecated. Please use an array instead." |
23 |
+ local mycmakeargstype=$(declare -p mycmakeargs 2>&-) |
24 |
+ if [[ "${mycmakeargstype}" != "declare -a mycmakeargs="* ]]; then |
25 |
+ if [[ -n "${mycmakeargstype}" ]] ; then |
26 |
+ eqawarn "Declaring mycmakeargs as a variable is deprecated. Please use an array instead." |
27 |
+ fi |
28 |
local mycmakeargs_local=(${mycmakeargs}) |
29 |
else |
30 |
local mycmakeargs_local=("${mycmakeargs[@]}") |