commit:     849bf56bb3afc2bd4ec834ce789976437b471d13
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  5 14:24:23 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct  5 17:44:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=849bf56b

dev-libs/olm: Fix build w/ cmake-4, remove unused bundled dir

Raise cmake_minimum_required to 3.31

Closes: https://bugs.gentoo.org/955895
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/olm/files/olm-3.2.16-cmake4.patch | 23 +++++++++++++++++++++++
 dev-libs/olm/olm-3.2.16-r1.ebuild          |  8 ++++++++
 2 files changed, 31 insertions(+)

diff --git a/dev-libs/olm/files/olm-3.2.16-cmake4.patch 
b/dev-libs/olm/files/olm-3.2.16-cmake4.patch
new file mode 100644
index 000000000000..a480d8d2c552
--- /dev/null
+++ b/dev-libs/olm/files/olm-3.2.16-cmake4.patch
@@ -0,0 +1,23 @@
+From 6447282221084f46a7d39cf5a71ebd063a2302df Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Sun, 5 Oct 2025 16:21:57 +0200
+Subject: [PATCH] Raise cmake_minimum_required to 3.31 to fix build w/ cmake-4
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 951965f..24ca631 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.4)
++cmake_minimum_required(VERSION 3.31)
+ 
+ project(olm VERSION 3.2.16 LANGUAGES CXX C)
+ 
+-- 
+2.51.0
+

diff --git a/dev-libs/olm/olm-3.2.16-r1.ebuild 
b/dev-libs/olm/olm-3.2.16-r1.ebuild
index d00872b902cc..c14640533cfd 100644
--- a/dev-libs/olm/olm-3.2.16-r1.ebuild
+++ b/dev-libs/olm/olm-3.2.16-r1.ebuild
@@ -15,11 +15,19 @@ KEYWORDS="amd64 arm64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 
+BDEPEND=">=dev-build/cmake-3.31"
+
 PATCHES=(
        "${FILESDIR}/${P}-cmake.patch" # TODO: upstream
+       "${FILESDIR}/${P}-cmake4.patch" # bug 955895
        "${FILESDIR}/${P}-clang-19-const.patch"
 )
 
+src_prepare() {
+       rm -rv lib/doctest || die # unused bundled stuff using <CMake-3.5
+       cmake_src_prepare
+}
+
 src_configure() {
        local mycmakeargs=(
                -DBUILD_TESTING=$(usex test)

Reply via email to