commit: 5389fe4759e97d094afff61aef65bfb97698c5f4 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Fri Jun 13 16:14:00 2025 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sun Jun 22 10:57:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5389fe47
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 <AT> gentoo.org> eclass/cmake.eclass | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index d61992576565..109227edfe02 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -807,6 +807,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
