commit:     d7f81a7f79b424fedc4548f1640db3f5a7ba56f9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 30 17:13:21 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 30 18:46:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7f81a7f

sci-libs/kissfft: Fix kissfft-config.cmake module w/ CMake-4

Only changes a cmake module used by revdeps, not dropping stable keywords.

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

 .../kissfft/files/kissfft-131.1.0-cmake4.patch     | 26 +++++++
 sci-libs/kissfft/kissfft-131.1.0-r3.ebuild         | 87 ++++++++++++++++++++++
 2 files changed, 113 insertions(+)

diff --git a/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch 
b/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch
new file mode 100644
index 000000000000..263b8f88fd36
--- /dev/null
+++ b/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch
@@ -0,0 +1,26 @@
+Taken from: https://github.com/mborgerding/kissfft/pull/101
+
+From d42d353de36e843b7145b7be4aee0758040f92d1 Mon Sep 17 00:00:00 2001
+From: Christophe Marin <[email protected]>
+Date: Wed, 2 Apr 2025 11:39:34 +0200
+Subject: [PATCH] Bump minimum CMake version in kissfft-config.cmake
+
+CMake 4 dropped support for CMake versions <= 3.5.
+We'll use 3.6, which is the minimum version required to build kissfft.
+---
+ kissfft-config.cmake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kissfft-config.cmake.in b/kissfft-config.cmake.in
+index cd7139a..fd9553c 100644
+--- a/kissfft-config.cmake.in
++++ b/kissfft-config.cmake.in
+@@ -24,7 +24,7 @@
+ 
+ @PACKAGE_INIT@
+ 
+-cmake_minimum_required(VERSION 3.3)
++cmake_minimum_required(VERSION 3.6)
+ 
+ # Set include glob of config files using SHARED/static component, 
BUILD_SHARED_LIBS by default
+ set(_kissfft_shared_detected OFF)

diff --git a/sci-libs/kissfft/kissfft-131.1.0-r3.ebuild 
b/sci-libs/kissfft/kissfft-131.1.0-r3.ebuild
new file mode 100644
index 000000000000..b464797e5edb
--- /dev/null
+++ b/sci-libs/kissfft/kissfft-131.1.0-r3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit cmake multibuild python-any-r1 toolchain-funcs
+
+DESCRIPTION="A Fast Fourier Transform (FFT) library that tries to Keep it 
Simple, Stupid"
+HOMEPAGE="https://github.com/mborgerding/kissfft";
+
+if [[ ${PV} == *9999 ]] ; then
+       EGIT_REPO_URI="https://github.com/mborgerding/kissfft";
+       inherit git-r3
+else
+       SRC_URI="https://github.com/mborgerding/kissfft/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="amd64 ~arm arm64 ~riscv x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="alloca cpu_flags_x86_sse double int16 int32 openmp test tools"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       test? (
+               sci-libs/fftw:3.0
+               $(python_gen_any_dep '
+                       dev-python/numpy[${PYTHON_USEDEP}]
+               ')
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-131.1.0-cross.patch
+       "${FILESDIR}"/${PN}-131.1.0-cmake{,4}.patch # bug #957670, PR pending
+)
+
+python_check_deps() {
+       python_has_version -d "dev-python/numpy[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       MULTIBUILD_VARIANTS=(
+               float
+               $(usev double)
+               $(usev int16 int16_t)
+               $(usev int32 int32_t)
+               $(usev cpu_flags_x86_sse simd)
+       )
+
+       use test && python-any-r1_pkg_setup
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+kissfft_configure() {
+       local mycmakeargs=(
+               -DKISSFFT_OPENMP=$(usex openmp 1 0)
+               -DKISSFFT_TEST=$(usex test)
+               -DKISSFFT_TOOLS=$(usex tools)
+               -DKISSFFT_USE_ALLOCA=$(usex alloca)
+               -DKISSFFT_DATATYPE=${MULTIBUILD_VARIANT}
+       )
+
+       cmake_src_configure
+}
+
+src_configure() {
+       multibuild_foreach_variant kissfft_configure
+}
+
+src_compile() {
+       multibuild_foreach_variant cmake_src_compile
+}
+
+src_test() {
+       multibuild_foreach_variant cmake_src_test
+}
+
+src_install() {
+       multibuild_foreach_variant cmake_src_install
+}

Reply via email to