commit: 8e2b8c86f2a4161848ff16567f20eb905d741292
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 11:11:46 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 21 10:40:22 2019 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=8e2b8c86
cmake.eclass: Array support for CMAKE_REMOVE_MODULES_LIST
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
eclass/cmake.eclass | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 0cf10c14a8..587ba1d9b5 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -331,8 +331,15 @@ cmake_src_prepare() {
die "FATAL: Unable to find CMakeLists.txt"
fi
+ local modules_list
+ if [[ $(declare -p CMAKE_REMOVE_MODULES_LIST) == "declare -a"* ]]; then
+ modules_list=( "${CMAKE_REMOVE_MODULES_LIST[@]}" )
+ else
+ modules_list=( ${CMAKE_REMOVE_MODULES_LIST} )
+ fi
+
local name
- for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
+ for name in "${modules_list[@]}" ; do
find "${S}" -name ${name}.cmake -exec rm -v {} + || die
done