You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local length=$(wc -l "${T}/bogus${dep}"| cut -d "" -f 1)
390
-
local first=$(head -n 1 "${T}/bogus${dep}"| cut -d ":" -f 1)
391
-
local last=$(( length + first -1))
392
-
393
-
sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
394
-
395
-
if [[ ${length}-eq 1 ]] ;then
396
-
sed -e "/find_package\s*(\s*${prefix}\([0-9]\|\${[A-Z0-9_]*}\)\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# '${dep}' removed by ecm.eclass - /" \
397
-
-i CMakeLists.txt || die
398
-
fi
399
-
}
400
-
401
370
# @FUNCTION: ecm_punt_kf_module
402
371
# @USAGE: <modulename>
403
372
# @DESCRIPTION:
404
373
# Removes a Frameworks (KF - matching any single-digit version)
405
374
# module from a find_package call with multiple components.
406
375
ecm_punt_kf_module() {
407
-
_ecm_punt_kfqt_module kf ${1}
376
+
cmake_punt_find_package kf ${1}
408
377
}
409
378
410
379
# @FUNCTION: ecm_punt_qt_module
@@ -413,7 +382,7 @@ ecm_punt_kf_module() {
413
382
# Removes a Qt (matching any single-digit version) module from a
414
383
# find_package call with multiple components.
415
384
ecm_punt_qt_module() {
416
-
_ecm_punt_kfqt_module qt ${1}
385
+
cmake_punt_find_package qt ${1}
417
386
}
418
387
419
388
# @FUNCTION: ecm_punt_bogus_dep
@@ -422,42 +391,7 @@ ecm_punt_qt_module() {
422
391
# Removes a specified dependency from a find_package call, optionally
423
392
# supports prefix for find_package with multiple components.
424
393
ecm_punt_bogus_dep() {
425
-
426
-
if [[ "$#"== 2 ]] ;then
427
-
local prefix=${1}
428
-
local dep=${2}
429
-
elif [[ "$#"== 1 ]] ;then
430
-
local dep=${1}
431
-
else
432
-
die "${FUNCNAME[0]} must be passed either one or two arguments"
433
-
fi
434
-
435
-
if [[ !-e"CMakeLists.txt" ]];then
436
-
return
437
-
fi
438
-
439
-
if [[ -z${prefix} ]];then
440
-
sed -e "/find_package\s*(\s*${dep}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by ecm.eclass - /" \
local length=$(wc -l "${T}/bogus${dep}"| cut -d "" -f 1)
453
-
local first=$(head -n 1 "${T}/bogus${dep}"| cut -d ":" -f 1)
454
-
local last=$(( length + first -1))
455
-
456
-
sed -e "${first},${last}s/${dep}//" -i CMakeLists.txt || die
457
-
458
-
if [[ ${length}-eq 1 ]] ;then
459
-
sed -e "/find_package\s*(\s*${prefix}\(\s\+\(REQUIRED\|CONFIG\|COMPONENTS\|\${[A-Z0-9_]*}\)\)\+\s*)/Is/^/# removed by ecm.eclass - /" -i CMakeLists.txt || die
0 commit comments