From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E526138334 for ; Fri, 1 Mar 2019 13:29:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69A1CE0848; Fri, 1 Mar 2019 13:29:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40D08E0848 for ; Fri, 1 Mar 2019 13:29:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A519E335D2C for ; Fri, 1 Mar 2019 13:29:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5171A520 for ; Fri, 1 Mar 2019 13:29:36 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1551446948.3603015258476c34dde7d805abc9b5474fd6e4dd.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 3603015258476c34dde7d805abc9b5474fd6e4dd X-VCS-Branch: master Date: Fri, 1 Mar 2019 13:29:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2762bd49-a1bf-4beb-8c2e-b28a796f2890 X-Archives-Hash: 734673ac8519140ea9c5fed721780710 commit: 3603015258476c34dde7d805abc9b5474fd6e4dd Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Feb 24 13:32:58 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Mar 1 13:29:08 2019 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=36030152 cmake-utils.eclass: Fix _cmake_modify-cmakelists, add QA output Bug: https://bugs.gentoo.org/674768 Reported-by: Fabio Rossi inwind.it> Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/cmake-utils.eclass | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 77c6d0481c..42a108976f 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -419,13 +419,17 @@ _cmake_modify-cmakelists() { grep -qs "<<< Gentoo configuration >>>" "${CMAKE_USE_DIR}"/CMakeLists.txt && return 0 # Comment out all set ( value) - # TODO Add QA checker - inform when variable being checked for below is set in CMakeLists.txt - find "${CMAKE_USE_DIR}" -name CMakeLists.txt \ - -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE.*)/{s/^/#IGNORE /g}' {} + \ - -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \ - -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX.*)/{s/^/#IGNORE /g}' {} + \ - -exec sed -i -e '/^[[:space:]]*[sS][eE][tT][[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE.*)/{s/^/#IGNORE /g}' {} + \ - || die "${LINENO}: failed to disable hardcoded settings" + find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec sed \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \ + -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE[[:space:]].*)/I{s/^/#G_cmake_modify_IGNORE /g}' \ + -i {} + || die "${LINENO}: failed to disable hardcoded settings" + local x + for x in $(find "${CMAKE_USE_DIR}" -name CMakeLists.txt -exec grep -l "^#_cmake_modify_IGNORE" {} +;); do + eqawarn "Hardcoded definition(s) removed in $(echo "${x}" | cut -c $((${#CMAKE_USE_DIR}+2))-):" + eqawarn "$(grep -se '^#_cmake_modify_IGNORE' ${x} | cut -c 22-99)" + done # NOTE Append some useful summary here cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_ || die