commit:     71a84b3ebe9f23550cfc23ad35451a32926720ab
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 25 17:04:59 2025 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Mar 25 17:09:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71a84b3e

dev-cpp/doctest: fix comaptibility with cmake-4

The compatibility is fixed with the patch taken from upstream.

Upstream-PR: https://github.com/doctest/doctest/pull/888
Closes: https://bugs.gentoo.org/951674
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 dev-cpp/doctest/doctest-2.4.11.ebuild              |  8 ++++--
 .../files/doctest-2.4.11-cmake4-pr888.patch        | 31 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/dev-cpp/doctest/doctest-2.4.11.ebuild 
b/dev-cpp/doctest/doctest-2.4.11.ebuild
index bf495f020847..58604fa8f54c 100644
--- a/dev-cpp/doctest/doctest-2.4.11.ebuild
+++ b/dev-cpp/doctest/doctest-2.4.11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2022-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -14,7 +14,11 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 
sparc x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
-PATCHES=( "${FILESDIR}/${PN}-2.4.11-backport-pr770.patch" )
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.4.11-backport-pr770.patch"
+       "${FILESDIR}/${PN}-2.4.11-cmake4-pr888.patch"
+)
 
 src_prepare() {
        sed -i '/-Werror/d' scripts/cmake/common.cmake || die

diff --git a/dev-cpp/doctest/files/doctest-2.4.11-cmake4-pr888.patch 
b/dev-cpp/doctest/files/doctest-2.4.11-cmake4-pr888.patch
new file mode 100644
index 000000000000..22aa020c9926
--- /dev/null
+++ b/dev-cpp/doctest/files/doctest-2.4.11-cmake4-pr888.patch
@@ -0,0 +1,31 @@
+From 82689538db96e478b5cb9f7753acf4121383df63 Mon Sep 17 00:00:00 2001
+From: "Trzcinski, Karol" <[email protected]>
+Date: Mon, 27 Jan 2025 08:53:06 +0100
+Subject: [PATCH] Bump minimal cmake version to 3.5
+
+Since cmake 3.27 appears warning like:
+
+```text
+ Compatibility with CMake < 3.5 will be removed from a future version of
+  CMake.
+```
+
+Such information may found in cmake release notes:
+https://cmake.org/cmake/help/latest/release/3.27.html
+
+Gentoo-bug: https://bugs.gentoo.org/951674
+Upstream-PR: https://github.com/doctest/doctest/pull/888
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6d384fa96..0f6166b84 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.0)
++cmake_minimum_required(VERSION 3.5)
+ 
+ if(POLICY CMP0077)
+     cmake_policy(SET CMP0077 NEW)

Reply via email to