kde5-functions.eclass: Improve punt_bogus_dep
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Thu, 9 Jun 2016 08:25:41 +0000 (10:25 +0200)
committerMichael Palimaka <kensington@gentoo.org>
Thu, 16 Jun 2016 17:56:24 +0000 (03:56 +1000)
The variable holding the min version requirement can be named anything.
This should catch most cases, most importantly Qt5 modules.

eclass/kde5-functions.eclass

index 435c8384658a4507c8f44846724b7a5c7ee36954..b20d406721dd40fab2d4fe9461eeaf7911dcf478 100644 (file)
@@ -279,7 +279,7 @@ punt_bogus_dep() {
        sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
 
        if [[ ${length} = 1 ]] ; then
-               sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${KF5_VERSION}\)\)\+\s*)/Is/^/# removed by kde5-functions.eclass - /" -i CMakeLists.txt || die
+               sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by kde5-functions.eclass - /" -i CMakeLists.txt || die
        fi
 }