From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B4A041580F6 for ; Tue, 20 May 2025 21:02:35 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8998D34318B for ; Tue, 20 May 2025 21:02:35 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id F0BF61103DE; Tue, 20 May 2025 21:02:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id E45B41103DE for ; Tue, 20 May 2025 21:02:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9DA79343179 for ; Tue, 20 May 2025 21:02:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 19D0F19E5 for ; Tue, 20 May 2025 21:02:08 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1747774305.f339ee5843ba31255239bce871c470cfef590bee.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: f339ee5843ba31255239bce871c470cfef590bee X-VCS-Branch: master Date: Tue, 20 May 2025 21:02:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ba0ea954-ae4b-42a7-bcf7-9b830008c3f4 X-Archives-Hash: 2065b5509c2cfc44a1ac539273101bc9 commit: f339ee5843ba31255239bce871c470cfef590bee Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat May 17 17:09:31 2025 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue May 20 20:51:45 2025 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=f339ee58 cmake.eclass: Add recursive CMakeLists.txt unsupported version detection We need to ramp up detection of unsupported CMake build systems with CMake 4. This will detect CMakeLists.txt files setting insufficient cmake_minimum_required VERSION level even in project subdirectories, putting out appropriate eqawarn message about the need to fix ${PN}. That makes us not rely on tinderbox runs w/ unmasked cmake-4 slowly being able to build everything up to leaf packages, and also helps detect insufficient subproject minimums that could otherwise be masked by USE flag choice. Bug: https://bugs.gentoo.org/951350 Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/cmake.eclass | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 083b566d26..59835b50f4 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -362,6 +362,17 @@ cmake_src_configure() { # Fix xdg collision with sandbox xdg_environment_reset + local file ver cmreq_isold + while read -d '' -r file ; do + ver=$(sed -ne "/cmake_minimum_required/ s/.*\(\.\.\.\|\s\)\([0-9.]*\)\([)]\|\s\).*$/\2/p" \ + "${file}" 2>/dev/null \ + ) + + if [[ -n $ver ]] && ver_test $ver -lt "3.5"; then + cmreq_isold=true + fi + done < <(find "${CMAKE_USE_DIR}" -type f -iname "CMakeLists.txt" -print0) + # Prepare Gentoo override rules (set valid compiler, append CPPFLAGS etc.) local build_rules=${BUILD_DIR}/gentoo_rules.cmake @@ -543,6 +554,13 @@ cmake_src_configure() { cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) fi + if [[ ${cmreq_isold} ]]; then + eqawarn "QA Notice: Compatibility with CMake < 3.5 has been removed from CMake 4," + eqawarn "${CATEGORY}/${PN} will fail to build w/o a fix." + eqawarn "See also tracker bug #951350; check existing bug or file a new one for" + eqawarn "this package." + fi + pushd "${BUILD_DIR}" > /dev/null || die debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}" echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}"