From ab5b4e4bee2b223b86fd2a504a70193efe027fbb Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 26 May 2025 20:28:48 +0200 Subject: [PATCH] sci-electronics/pulseview: Fix build w/ cmake-4 Closes: https://bugs.gentoo.org/955760 Signed-off-by: Andreas Sturmlechner --- .../files/pulseview-0.4.2-cmake4.patch | 47 +++++++++++++++++++ .../pulseview/pulseview-0.4.2-r1.ebuild | 3 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 sci-electronics/pulseview/files/pulseview-0.4.2-cmake4.patch diff --git a/sci-electronics/pulseview/files/pulseview-0.4.2-cmake4.patch b/sci-electronics/pulseview/files/pulseview-0.4.2-cmake4.patch new file mode 100644 index 0000000000000..1f4213ec4da12 --- /dev/null +++ b/sci-electronics/pulseview/files/pulseview-0.4.2-cmake4.patch @@ -0,0 +1,47 @@ +From: Soeren Apel +Date: Thu, 15 May 2025 14:38:53 +0000 (+0200) +Subject: CMakeLists.txt: Update version range from 2.8 to 3.31.5 to avoid abort +X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=c0676b3493fda29d97c271cfeb76267019b35695 + +CMakeLists.txt: Update version range from 2.8 to 3.31.5 to avoid abort + +The error with CMake 4 on the github CI looks like this: + +CMake Error at CMakeLists.txt:22 (cmake_minimum_required): + Compatibility with CMake < 3.5 has been removed from CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. + +CMakeLists.txt: Fix the version for the manual, too +--- + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec86073d..8580fa8e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ + ## along with this program. If not, see . + ## + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...3.31.5) + + project(pulseview C CXX) + +diff --git a/manual/CMakeLists.txt b/manual/CMakeLists.txt +index 3b881a56..d6c54d61 100644 +--- a/manual/CMakeLists.txt ++++ b/manual/CMakeLists.txt +@@ -17,7 +17,7 @@ + ## along with this program. If not, see . + ## + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...3.31.5) + + project(PV_MANUAL) + diff --git a/sci-electronics/pulseview/pulseview-0.4.2-r1.ebuild b/sci-electronics/pulseview/pulseview-0.4.2-r1.ebuild index 97332060d41fc..d2d4dda1374a1 100644 --- a/sci-electronics/pulseview/pulseview-0.4.2-r1.ebuild +++ b/sci-electronics/pulseview/pulseview-0.4.2-r1.ebuild @@ -41,7 +41,8 @@ DOCS=( HACKING NEWS README ) PATCHES=( "${FILESDIR}/${P}-qt-5.15.patch" - "${FILESDIR}"/${PN}-0.4.2-glib-2.68.patch + "${FILESDIR}"/${P}-glib-2.68.patch + "${FILESDIR}"/${P}-cmake4.patch # bug #955760 ) src_prepare() {