commit:     1b04826a7ba347f649b083cf476d6f9a870496ed
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 21:35:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 29 21:44:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b04826a

dev-libs/libebml: fix build w/ cmake-4

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libebml/files/libebml-1.4.5-cmake-4.patch | 30 ++++++++++++++++++++++
 dev-libs/libebml/libebml-1.4.5-r1.ebuild           | 18 +++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/dev-libs/libebml/files/libebml-1.4.5-cmake-4.patch 
b/dev-libs/libebml/files/libebml-1.4.5-cmake-4.patch
new file mode 100644
index 000000000000..aca409db17e1
--- /dev/null
+++ b/dev-libs/libebml/files/libebml-1.4.5-cmake-4.patch
@@ -0,0 +1,30 @@
+https://github.com/Matroska-Org/libebml/commit/695d152cef04a07da9d57e853bba2f192ae9b865
+
+From 695d152cef04a07da9d57e853bba2f192ae9b865 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <[email protected]>
+Date: Fri, 9 May 2025 07:34:46 +0200
+Subject: [PATCH] CMake: bump minimum CMake version
+
+It fails to build in the CI because older versions support has been dropped in 
newer CMake.
+
+```
+CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
+  Compatibility with CMake < 3.5 has been removed from CMake.
+
+  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
+  to tell CMake that the project requires at least <min> but has been updated
+  to work with policies introduced by <max> or earlier.
+
+  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
+```
+
+(cherry picked from commit 6725c5f0169981cb0bd2ee124fbf0d8ca30b762d)
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.1.2)
++cmake_minimum_required(VERSION 3.5)
+ 
+ project(ebml VERSION 1.4.5)
+ 
+

diff --git a/dev-libs/libebml/libebml-1.4.5-r1.ebuild 
b/dev-libs/libebml/libebml-1.4.5-r1.ebuild
new file mode 100644
index 000000000000..43484feb0ef6
--- /dev/null
+++ b/dev-libs/libebml/libebml-1.4.5-r1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Extensible binary format library (kinda like XML)"
+HOMEPAGE="https://www.matroska.org/ https://github.com/Matroska-Org/libebml/";
+SRC_URI="https://dl.matroska.org/downloads/${PN}/${P}.tar.xz";
+
+LICENSE="LGPL-2.1"
+SLOT="0/5" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.5-cmake-4.patch
+)

Reply via email to