Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 07 Jan 2022 14:22:02
Message-Id: 1641565298.b068f2b2031c152888510f5657afe3d3a07113fa.asturm@gentoo
1 commit: b068f2b2031c152888510f5657afe3d3a07113fa
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 26 20:14:48 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 7 14:21:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b068f2b2
7
8 ecm.eclass: Case-insensitivity for grep and sed
9
10 Reported-by: Milos Popovic <gpopac <AT> gmail.com>
11 Bug: https://bugs.gentoo.org/829998
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 eclass/ecm.eclass | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17 diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
18 index 5ae6e73401ef..baece9e6e637 100644
19 --- a/eclass/ecm.eclass
20 +++ b/eclass/ecm.eclass
21 @@ -380,7 +380,7 @@ ecm_src_prepare() {
22
23 if [[ ${ECM_HANDBOOK} = forceoptional ]] ; then
24 ecm_punt_bogus_dep KF5 DocTools
25 - sed -i -e "/kdoctools_install/ s/^/#DONT/" CMakeLists.txt || die
26 + sed -i -e "/kdoctools_install/I s/^/#DONT/" CMakeLists.txt || die
27 fi
28 fi
29
30 @@ -412,12 +412,12 @@ ecm_src_prepare() {
31 local f pf="${T}/${P}"-tests-optional.patch
32 touch ${pf} || die "Failed to touch patch file"
33 for f in $(find . -type f -name "CMakeLists.txt" -exec \
34 - grep -l "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do
35 + grep -li "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do
36 cp ${f} ${f}.old || die "Failed to prepare patch origfile"
37 pushd ${f%/*} > /dev/null || die
38 ecm_punt_bogus_dep Qt5 Test
39 sed -i CMakeLists.txt -e \
40 - "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/" \
41 + "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/I" \
42 || die
43 popd > /dev/null || die
44 diff -Naur ${f}.old ${f} 1>>${pf}