commit:     1e11a0ddc194b3e6943f18c4a2cfee8f2102ad9f
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: Sun Aug 21 18:18:10 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=1e11a0dd

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