commit:     9d349ff7f635e777166b16d110afd93debeb6b7c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  6 04:03:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  6 04:03:56 2025 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=9d349ff7

cmake.eclass: quote "${file}" for seds

Otherwise sed may fail (as it can't find the files) on directories/files
with spaces in the path, as is the case in dev-build/cmake itself
where it'll die in src_prepare.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/cmake.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 07216f0b9f..b6d9677008 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -255,8 +255,8 @@ _cmake_modify-cmakelists() {
                sed \
                        -e 
'/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE\([[:space:]].*)\|)\)/I{s/^/#_cmake_modify_IGNORE
 /g}' \
                        -e 
'/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_\(COLOR_MAKEFILE\|INSTALL_PREFIX\|VERBOSE_MAKEFILE\)[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE
 /g}' \
-                       -i ${file} || die "failed to disable hardcoded settings"
-               readarray -t mod_lines < <(grep -se "^#_cmake_modify_IGNORE" 
${file})
+                       -i "${file}" || die "failed to disable hardcoded 
settings"
+               readarray -t mod_lines < <(grep -se "^#_cmake_modify_IGNORE" 
"${file}")
                if [[ ${#mod_lines[*]} -gt 0 ]]; then
                        einfo "Hardcoded definition(s) removed in 
${file/${CMAKE_USE_DIR%\/}\//}:"
                        local mod_line

Reply via email to