1 |
commit: cf493d5dcedbf1df2e73c495ed9c067480325323 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 24 14:23:36 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 24 14:23:36 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=cf493d5d |
7 |
|
8 |
cmake.eclass: src_configure: Make sure mycmakeargs is initialised at all |
9 |
|
10 |
Closes: https://bugs.gentoo.org/703638 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
eclass/cmake.eclass | 5 +++-- |
14 |
1 file changed, 3 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass |
17 |
index 20ba229377..834df7f4c3 100644 |
18 |
--- a/eclass/cmake.eclass |
19 |
+++ b/eclass/cmake.eclass |
20 |
@@ -492,8 +492,9 @@ cmake_src_configure() { |
21 |
_EOF_ |
22 |
fi |
23 |
|
24 |
- # Make the array a local variable since <=portage-2.1.6.x does not |
25 |
- # support global arrays (see bug #297255). |
26 |
+ # Make the array a local variable since <=portage-2.1.6.x does not support |
27 |
+ # global arrays (see bug #297255). But first make sure it is initialised. |
28 |
+ [[ -z ${mycmakeargs} ]] && declare -a mycmakeargs=() |
29 |
local mycmakeargstype=$(declare -p mycmakeargs 2>&-) |
30 |
if [[ "${mycmakeargstype}" != "declare -a mycmakeargs="* ]]; then |
31 |
die "mycmakeargs must be declared as array" |