summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2025-11-16 15:45:50 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2025-11-16 15:45:50 +0000
commitb7822bdcda8af561c9f3881094d4fc7b45701ad3 (patch)
treec2cd360c3e8a0867ee561d3ed56b101ecd9ebc1b
parent445bf1da2e20b2a15aa5ff7c3c2e278e7609ca44 (diff)
parent85760842ba46caf62dc26ea1342d152ef5f4e67f (diff)
downloadkde-b7822bdcda8af561c9f3881094d4fc7b45701ad3.tar.gz
kde-b7822bdcda8af561c9f3881094d4fc7b45701ad3.tar.bz2
kde-b7822bdcda8af561c9f3881094d4fc7b45701ad3.zip
Merge updates from master
-rw-r--r--eclass/cmake.eclass12
-rw-r--r--eclass/ecm.eclass62
-rw-r--r--kde-plasma/kscreenlocker/kscreenlocker-6.5.49.9999.ebuild5
-rw-r--r--kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild5
4 files changed, 48 insertions, 36 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 20a02768c80..6fa083b2ff2 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -409,6 +409,17 @@ _cmake_minreqver-info() {
fi
}
+# @FUNCTION: cmake_prepare-per-cmakelists
+# @USAGE: <path-to-current-CMakeLists.txt>
+# @DESCRIPTION:
+# Override this to be provided with a hook into the cmake_src_prepare loop
+# over all CMakeLists.txt below CMAKE_USE_DIR. Will be called from inside
+# that loop with <path-to-current-CMakeLists.txt> as single argument.
+# Used for recursive CMakeLists.txt detections and modifications.
+cmake_prepare-per-cmakelists() {
+ return
+}
+
# @FUNCTION: _cmake_modify-cmakelists
# @INTERNAL
# @DESCRIPTION:
@@ -450,6 +461,7 @@ _cmake_modify-cmakelists() {
_CMAKE_MINREQVER_CMAKE316+=( "${file#"${CMAKE_USE_DIR}/"}":"${ver}" )
fi
fi
+ cmake_prepare-per-cmakelists ${file}
done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0 || die)
# NOTE Append some useful summary here
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 298a06bdd2c..85cbdf90275 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -526,6 +526,30 @@ ecm_pkg_setup() {
}
fi
+# @FUNCTION: cmake_prepare-per-cmakelists
+# @DESCRIPTION:
+# For proper description see cmake.eclass manpage.
+cmake_prepare-per-cmakelists() {
+ debug-print-function ${FUNCNAME} "$@"
+ local cm="$1"
+
+ # only build unit tests when required - forceoptional, also cover non-kde categories
+ if ! { in_iuse test && use test; } ; then
+ if [[ ${ECM_TEST} == forceoptional ]]; then
+ cmake_comment_add_subdirectory -f "${cm}" appiumtests autotests test tests
+ elif [[ ${ECM_TEST} == forceoptional-recursive ]] ; then
+ local pf="${T}/${P}"-tests-optional.patch
+ touch ${pf} || die "Failed to touch patch file"
+ cp ${cm} ${cm}.old || die "Failed to prepare patch origfile"
+ sed -i ${cm} -e \
+ "/^#/! s/add_subdirectory\s*\(\s*.*\(appium|auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/I" \
+ || die
+ diff -Naur ${cm}.old ${cm} 1>>${pf}
+ rm ${cm}.old || die "Failed to clean up"
+ fi
+ fi
+}
+
# @FUNCTION: ecm_src_prepare
# @DESCRIPTION:
# Wrapper for cmake_src_prepare with lots of extra logic for magic
@@ -575,39 +599,25 @@ ecm_src_prepare() {
# only build unit tests when required
if ! { in_iuse test && use test; } ; then
- if [[ ${ECM_TEST} = forceoptional ]] ; then
- [[ ${_KFSLOT} = 5 ]] && ecm_punt_qt_module Test
- # if forceoptional, also cover non-kde categories
- cmake_comment_add_subdirectory appiumtests autotests test tests
- elif [[ ${ECM_TEST} = forceoptional-recursive ]] ; then
- [[ ${_KFSLOT} = 5 ]] && ecm_punt_qt_module Test
- local f pf="${T}/${P}"-tests-optional.patch
- touch ${pf} || die "Failed to touch patch file"
- for f in $(find . -type f -name "CMakeLists.txt" -exec \
- grep -li "^\s*add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)" {} \;); do
- cp ${f} ${f}.old || die "Failed to prepare patch origfile"
- pushd ${f%/*} > /dev/null || die
- ecm_punt_qt_module Test
- sed -i CMakeLists.txt -e \
- "/^#/! s/add_subdirectory\s*\(\s*.*\(auto|unit\)\?tests\?\s*)\s*\)/if(BUILD_TESTING)\n&\nendif()/I" \
- || die
- popd > /dev/null || die
- diff -Naur ${f}.old ${f} 1>>${pf}
- rm ${f}.old || die "Failed to clean up"
- done
- eqawarn "QA Notice: Build system modified by ECM_TEST=forceoptional-recursive."
- eqawarn "Unified diff file ready for pickup in:"
- eqawarn " ${pf}"
- eqawarn "Push it upstream to make this message go away."
- elif [[ -n ${_KDE_ORG_ECLASS} ]] ; then
+ if [[ ${ECM_TEST} == forceoptional* && ${_KFSLOT} == 5 ]]; then
+ ecm_punt_qt_module Test
+ fi
+ if [[ -n ${_KDE_ORG_ECLASS} && ${ECM_TEST} != forceoptional ]]; then
cmake_comment_add_subdirectory appiumtests autotests test tests
fi
fi
# in frameworks, tests = manual tests so never build them
- if [[ -n ${_FRAMEWORKS_KDE_ORG_ECLASS} ]] && [[ ${PN} != extra-cmake-modules ]]; then
+ if [[ -n ${_FRAMEWORKS_KDE_ORG_ECLASS} ]]; then
cmake_comment_add_subdirectory tests
fi
+
+ if ! { in_iuse test && use test; } && [[ ${ECM_TEST} == forceoptional-recursive ]]; then
+ eqawarn "QA Notice: Build system modified by ECM_TEST=forceoptional-recursive."
+ eqawarn "Unified diff file ready for pickup in:"
+ eqawarn " ${T}/${P}-tests-optional.patch"
+ eqawarn "Push it upstream to make this message go away."
+ fi
}
# @FUNCTION: ecm_src_configure
diff --git a/kde-plasma/kscreenlocker/kscreenlocker-6.5.49.9999.ebuild b/kde-plasma/kscreenlocker/kscreenlocker-6.5.49.9999.ebuild
index 2c16ff672d4..e5c747c2ab0 100644
--- a/kde-plasma/kscreenlocker/kscreenlocker-6.5.49.9999.ebuild
+++ b/kde-plasma/kscreenlocker/kscreenlocker-6.5.49.9999.ebuild
@@ -58,11 +58,6 @@ BDEPEND="
>=kde-frameworks/kcmutils-${KFMIN}:6
"
-src_prepare() {
- ecm_src_prepare
- use test || cmake_comment_add_subdirectory -f greeter autotests
-}
-
src_test() {
# requires running environment
local myctestargs=(
diff --git a/kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild b/kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild
index 5252497070e..b78cd353bc4 100644
--- a/kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild
+++ b/kde-plasma/kscreenlocker/kscreenlocker-9999.ebuild
@@ -58,11 +58,6 @@ BDEPEND="
>=kde-frameworks/kcmutils-${KFMIN}:6
"
-src_prepare() {
- ecm_src_prepare
- use test || cmake_comment_add_subdirectory -f greeter autotests
-}
-
src_test() {
# requires running environment
local myctestargs=(