commit: 4635dbecb2ee1129f6f7cde8a29fc27a618ecbbe Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sun Dec 26 20:14:48 2021 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sun Dec 26 20:38:03 2021 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=4635dbec
ecm.eclass: Case-insensitivity for grep and sed Reported-by: Milos Popovic <gpopac <AT> gmail.com> Bug: https://bugs.gentoo.org/829998 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> eclass/ecm.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index 5ae6e73401..baece9e6e6 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -380,7 +380,7 @@ ecm_src_prepare() { if [[ ${ECM_HANDBOOK} = forceoptional ]] ; then ecm_punt_bogus_dep KF5 DocTools - sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die + sed -i -e "/kdoctools_install/I s/^/#DONT/" CMakeLists.txt || die fi fi @@ -412,12 +412,12 @@ ecm_src_prepare() { local f pf="${T}/${P}"-tests-optional.patch touch ${pf} || die "Failed to touch patch file" for f in $(find . -type f -name "CMakeLists.txt" -exec \ - grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do + grep -li "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do cp ${f} ${f}.old || die "Failed to prepare patch origfile" pushd ${f%/*} > /dev/null || die ecm_punt_bogus_dep Qt5 Test sed -i CMakeLists.txt -e \ - "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \ + "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/I" \ || die popd > /dev/null || die diff -Naur ${f}.old ${f} 1>>${pf}