diff options
| author | Sam James <sam@gentoo.org> | 2025-06-06 05:03:56 +0100 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-06-06 05:03:56 +0100 |
| commit | 9d349ff7f635e777166b16d110afd93debeb6b7c (patch) | |
| tree | ce38273ca6ee25a2065b16f9f3b5c5cd2537a1aa /eclass | |
| parent | 556c9d1244471c296801b8096ca90cc23eeaf858 (diff) | |
| download | kde-9d349ff7f635e777166b16d110afd93debeb6b7c.tar.gz kde-9d349ff7f635e777166b16d110afd93debeb6b7c.tar.bz2 kde-9d349ff7f635e777166b16d110afd93debeb6b7c.zip | |
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@gentoo.org>
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/cmake.eclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 07216f0b9f5..b6d96770086 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 |
