This goes back to ancient cmake-utils.eclass,v 1.70 in CVS of 2011, or historical.git commit 70230d8d15c0d287b5e81b09a6e78b6aff01b1d6, and it was done to ensure use of downstream-modified versions of these modules shipped by Gentoo's cmake package over consumer packages' own copy overriding them.
After commit 04ce4a03554e3541c587db60013b9b796613c2c7 finally dropped this downstream modification for CMake >=4.2.1, we can also stop removing these modules by default. Bug: https://bugs.gentoo.org/736547 Signed-off-by: Andreas Sturmlechner <[email protected]> --- eclass/cmake.eclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index e7caa82b3a..d412fcf1df 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -77,10 +77,6 @@ inherit flag-o-matic multiprocessing ninja-utils toolchain-funcs xdg-utils if [[ ${CMAKE_REMOVE_MODULES_LIST} ]]; then [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* ]] || die "CMAKE_REMOVE_MODULES_LIST must be an array" -else - if ! [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* && ${#CMAKE_REMOVE_MODULES_LIST[@]} -eq 0 ]]; then - CMAKE_REMOVE_MODULES_LIST=( FindBLAS FindLAPACK ) - fi fi # @ECLASS_VARIABLE: CMAKE_USE_DIR @@ -497,6 +493,11 @@ cmake_prepare() { die "FATAL: Unable to find CMakeLists.txt" fi + if ! [[ ${CMAKE_REMOVE_MODULES_LIST@a} == *a* && ${#CMAKE_REMOVE_MODULES_LIST[@]} -eq 0 ]]; then + if has_version -b "<dev-build/cmake-4.2.1"; then + CMAKE_REMOVE_MODULES_LIST=( FindBLAS FindLAPACK ) + fi + fi local modules_list=( "${CMAKE_REMOVE_MODULES_LIST[@]}" ) local name -- 2.52.0
signature.asc
Description: This is a digitally signed message part.
