summaryrefslogtreecommitdiff
path: root/eclass/cmake.eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2025-06-13 18:14:00 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2025-06-14 12:47:47 +0200
commit48ca3646c68b8b6b802bd1f450ad1fa6b5241581 (patch)
tree096e5558fe77a9f248358e53200a7dbfc09d2617 /eclass/cmake.eclass
parente00e9692a9e469bfbc4dc8f099acd88296f24a5d (diff)
downloadkde-48ca3646c68b8b6b802bd1f450ad1fa6b5241581.tar.gz
kde-48ca3646c68b8b6b802bd1f450ad1fa6b5241581.tar.bz2
kde-48ca3646c68b8b6b802bd1f450ad1fa6b5241581.zip
cmake.eclass: Add src_install() check for CMake-4-incompatible modules
See examples: https://bugs.gentoo.org/953075 https://bugs.gentoo.org/957670 https://bugs.gentoo.org/957671 https://bugs.gentoo.org/957803 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
-rw-r--r--eclass/cmake.eclass19
1 files changed, 19 insertions, 0 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 6ff88d48ce7..520ac14eec1 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -717,6 +717,25 @@ cmake_src_install() {
einstalldocs
popd > /dev/null || die
fi
+
+ local file files=()
+ while read -d '' -r file ; do
+ # Detect unsupported minimum CMake versions unless CMAKE_QA_COMPAT_SKIP is set
+ if ! [[ ${CMAKE_QA_COMPAT_SKIP} ]]; then
+ _cmake_minreqver-lt "3.5" "${file}" && files+=( "${file#"${D}"}" )
+ fi
+ done < <(find "${D}" -type f -iname "*.cmake" -print0 || die)
+ if [[ ${#files[*]} -gt 0 ]]; then
+ eqawarn "QA Notice: Package installs CMake module(s) incompatible with CMake 4,"
+ eqawarn "breaking any packages relying on it:"
+ eqawarn
+ for file in "${files[@]}"; do
+ eqawarn " ${file}"
+ done
+ eqawarn
+ eqawarn "See also tracker bug #951350; check existing bug or file a new one for"
+ eqawarn "this package, and take it upstream."
+ fi
}
fi