commit:     ceab82c96faa2907609ff415fa9d6d9ddb1d2fe7
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Aug 21 18:18:10 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Aug 31 14:23:26 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceab82c9

kde5-functions.eclass: Make punt_bogus_dep detect !CMakeLists.txt

 eclass/kde5-functions.eclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index da4cd1e..d2eb8a6 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -308,6 +308,10 @@ punt_bogus_dep() {
        local prefix=${1}
        local dep=${2}
 
+       if [[ ! -e "CMakeLists.txt" ]]; then
+               return
+       fi
+
        pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" 
CMakeLists.txt > "${T}/bogus${dep}"
 
        # pcregrep returns non-zero on no matches/error

Reply via email to