summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-23 02:44:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-23 02:44:06 +0100
commitf019a919bf109460ee009a5f9210b99d0467db97 (patch)
tree5e62ee11b837b7b408bb93bf2f01eb74f7b8a73f /eclass
parent6a9905e269a1104c93dceb41e2627a8568642946 (diff)
gentoo auto-resync : 23:08:2022 - 02:44:06
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36984 -> 36991 bytes
-rw-r--r--eclass/ecm.eclass25
2 files changed, 19 insertions, 6 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index e55baaf1b387..f0b26900f25e 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 3cc586b82d82..8febb9d22850 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -362,19 +362,32 @@ ecm_punt_qt_module() {
}
# @FUNCTION: ecm_punt_bogus_dep
-# @USAGE: <prefix> <dependency>
+# @USAGE: <dependency> or <prefix> <dependency>
# @DESCRIPTION:
-# Removes a specified dependency from a find_package call with multiple
-# components.
+# Removes a specified dependency from a find_package call, optionally
+# supports prefix for find_package with multiple components.
ecm_punt_bogus_dep() {
- local prefix=${1}
- local dep=${2}
+
+ if [[ "$#" == 2 ]] ; then
+ local prefix=${1}
+ local dep=${2}
+ elif [[ "$#" == 1 ]] ; then
+ local dep=${1}
+ else
+ die "${FUNCNAME[0]} must be passed either one or two arguments"
+ fi
if [[ ! -e "CMakeLists.txt" ]]; then
return
fi
- pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
+ if [[ -z ${prefix} ]]; then
+ sed -e "/find_package\s*(\s*${dep}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by ecm.eclass - /" \
+ -i CMakeLists.txt || die
+ return
+ else
+ pcregrep -Mni "(?s)find_package\s*\(\s*${prefix}[^)]*?${dep}.*?\)" CMakeLists.txt > "${T}/bogus${dep}"
+ fi
# pcregrep returns non-zero on no matches/error
if [[ $? -ne 0 ]] ; then