From 5f0e39b419953408a68faa5b1429f0669a647b04 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Feb 2026 07:26:55 +0000 Subject: [PATCH] eclass/cmake: Sync with Gentoo It's from Gentoo commit d7318bdc9ad2d2991baa0a5a3037dd0e1ca9fcf9. Signed-off-by: Flatcar Buildbot --- .../portage-stable/eclass/cmake.eclass | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass b/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass index b087587868..643370f535 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cmake.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @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 @@ -250,7 +246,7 @@ cmake_comment_add_subdirectory() { for d in "$@"; do d=${d//\//\\/} - sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${d}[[:space:]]*)/I s/^/#DONOTBUILD /" \ + sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${d}\([[:space:]][a-Z_ ]*\|[[:space:]]*\))/I s/^/#DONOTBUILD /" \ -i ${filename} || die "failed to comment add_subdirectory(${d})" done } @@ -497,6 +493,11 @@ cmake_prepare() { die "FATAL: Unable to find CMakeLists.txt" fi + if [[ ${CMAKE_REMOVE_MODULES_LIST@a} != *a* ]]; then + if has_version -b "