diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-12-26 21:14:48 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-01-07 15:21:38 +0100 |
commit | b068f2b2031c152888510f5657afe3d3a07113fa (patch) | |
tree | ae04c1935cba1c413cb8596bd1b52a0f3decd8bb /eclass/ecm.eclass | |
parent | app-backup/duplicity: amd64 stable (diff) | |
download | gentoo-b068f2b2031c152888510f5657afe3d3a07113fa.tar.gz gentoo-b068f2b2031c152888510f5657afe3d3a07113fa.tar.bz2 gentoo-b068f2b2031c152888510f5657afe3d3a07113fa.zip |
ecm.eclass: Case-insensitivity for grep and sed
Reported-by: Milos Popovic <gpopac@gmail.com>
Bug: https://bugs.gentoo.org/829998
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/ecm.eclass')
-rw-r--r-- | eclass/ecm.eclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index 5ae6e73401ef..baece9e6e637 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} |