summaryrefslogtreecommitdiff
path: root/sci-libs/kissfft
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/kissfft')
-rw-r--r--sci-libs/kissfft/Manifest1
-rw-r--r--sci-libs/kissfft/files/kissfft-131.1.0-cmake.patch3
-rw-r--r--sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch17
-rw-r--r--sci-libs/kissfft/files/kissfft-131.2.0-fix_python.patch15
-rw-r--r--sci-libs/kissfft/kissfft-131.2.0.ebuild92
-rw-r--r--sci-libs/kissfft/kissfft-9999.ebuild7
6 files changed, 116 insertions, 19 deletions
diff --git a/sci-libs/kissfft/Manifest b/sci-libs/kissfft/Manifest
index 12e96cdb00eb..26d7997008ec 100644
--- a/sci-libs/kissfft/Manifest
+++ b/sci-libs/kissfft/Manifest
@@ -1 +1,2 @@
DIST kissfft-131.1.0.tar.gz 52383 BLAKE2B 74e6d2e7d132a311b31c28a468e13d9772a53f0ea0abed0e0f49d8db9c183fb0646f58fd38df3e797b8577285899daf6b80446b149ce2582bb828410656d96df SHA512 bd715868ce0e93a291a0592fb1f8b960e832fc64efe863755e52b67d5addff9bcb444a1bf2570d1914c52b41dad1023d0d86400f5ea30c9fb84cd6b4f7210708
+DIST kissfft-131.2.0.tar.gz 52477 BLAKE2B 79c4f98ce09dfad13ac0b440422a6a0905a4fa9c7d7234bdab79cacf6ab3f28c034f136587fae72eccb27c7369c486dcc7a95b279d76584d6a7ea0ddc24de0d8 SHA512 5d02802a9e191e7cb77c26e9a34659a5d47c4e85bcfdf86a7cffdda66d8b79261f7fe5795ffabd78644b6094c01b32a84841669fbc0009ac9268ae1ba521af9e
diff --git a/sci-libs/kissfft/files/kissfft-131.1.0-cmake.patch b/sci-libs/kissfft/files/kissfft-131.1.0-cmake.patch
index a3cb3e468e17..24eae3a4313e 100644
--- a/sci-libs/kissfft/files/kissfft-131.1.0-cmake.patch
+++ b/sci-libs/kissfft/files/kissfft-131.1.0-cmake.patch
@@ -1,5 +1,4 @@
-diff --git a/kissfft-config.cmake.in b/kissfft-config.cmake.in
-index cd7139a..7d6c7a2 100644
+PR pending https://github.com/mborgerding/kissfft/pull/92.patch
--- a/kissfft-config.cmake.in
+++ b/kissfft-config.cmake.in
@@ -66,14 +66,19 @@ foreach(_kissfft_datatype simd int16 int32 float double)
diff --git a/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch b/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch
index 263b8f88fd36..235c4c409f54 100644
--- a/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch
+++ b/sci-libs/kissfft/files/kissfft-131.1.0-cmake4.patch
@@ -1,18 +1,5 @@
-Taken from: https://github.com/mborgerding/kissfft/pull/101
-
-From d42d353de36e843b7145b7be4aee0758040f92d1 Mon Sep 17 00:00:00 2001
-From: Christophe Marin <christophe@krop.fr>
-Date: Wed, 2 Apr 2025 11:39:34 +0200
-Subject: [PATCH] Bump minimum CMake version in kissfft-config.cmake
-
+Taken from: https://github.com/mborgerding/kissfft/pull/101.patch (merged)
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 @@
@@ -20,7 +7,7 @@ index cd7139a..fd9553c 100644
@PACKAGE_INIT@
-cmake_minimum_required(VERSION 3.3)
-+cmake_minimum_required(VERSION 3.6)
++cmake_minimum_required(VERSION 3.10)
# 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/files/kissfft-131.2.0-fix_python.patch b/sci-libs/kissfft/files/kissfft-131.2.0-fix_python.patch
new file mode 100644
index 000000000000..44f5bf8ad0fa
--- /dev/null
+++ b/sci-libs/kissfft/files/kissfft-131.2.0-fix_python.patch
@@ -0,0 +1,15 @@
+backport PR merged to fix python detection
+https://github.com/mborgerding/kissfft/pull/119.patch
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -53,8 +53,8 @@ if(KISSFFT_DATATYPE MATCHES "^simd$")
+ endif()
+ endif()
+
+-find_package(Python REQUIRED)
+-add_test(NAME testkiss.py COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/testkiss.py")
++find_package(Python3 COMPONENTS Interpreter REQUIRED)
++add_test(NAME testkiss.py COMMAND "${Python3_INTERPRETER}" "${CMAKE_CURRENT_SOURCE_DIR}/testkiss.py")
+ list(APPEND TESTKISS_PY_ENV "KISSFFT_DATATYPE=${KISSFFT_DATATYPE}")
+ list(APPEND TESTKISS_PY_ENV "KISSFFT_OPENMP=${KISSFFT_OPENMP}")
+ set_tests_properties(testkiss.py PROPERTIES
diff --git a/sci-libs/kissfft/kissfft-131.2.0.ebuild b/sci-libs/kissfft/kissfft-131.2.0.ebuild
new file mode 100644
index 000000000000..3e3fe3b61b3d
--- /dev/null
+++ b/sci-libs/kissfft/kissfft-131.2.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+
+inherit cmake multibuild python-any-r1 toolchain-funcs
+
+DESCRIPTION="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 )"
+
+RDEPEND="tools? ( media-libs/libpng:= )"
+DEPEND="
+ ${RDEPEND}
+ test? (
+ sci-libs/fftw:3.0
+ $(python_gen_any_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+PATCHES=(
+ # both merged after 131.2.0
+ "${FILESDIR}"/${PN}-131.1.0-cross.patch
+ "${FILESDIR}"/${PN}-131.2.0-fix_python.patch
+ # PR pending https://github.com/mborgerding/kissfft/pull/92
+ "${FILESDIR}"/${PN}-131.1.0-cmake.patch
+)
+
+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
+}
diff --git a/sci-libs/kissfft/kissfft-9999.ebuild b/sci-libs/kissfft/kissfft-9999.ebuild
index b86bd9cfb69a..150ba41c4605 100644
--- a/sci-libs/kissfft/kissfft-9999.ebuild
+++ b/sci-libs/kissfft/kissfft-9999.ebuild
@@ -3,11 +3,11 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
inherit cmake multibuild python-any-r1 toolchain-funcs
-DESCRIPTION="A Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid"
+DESCRIPTION="Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid"
HOMEPAGE="https://github.com/mborgerding/kissfft"
if [[ ${PV} == *9999 ]] ; then
@@ -23,7 +23,9 @@ SLOT="0"
IUSE="alloca cpu_flags_x86_sse double int16 int32 openmp test tools"
RESTRICT="!test? ( test )"
+RDEPEND="tools? ( media-libs/libpng:= )"
DEPEND="
+ ${RDEPEND}
test? (
sci-libs/fftw:3.0
$(python_gen_any_dep '
@@ -33,6 +35,7 @@ DEPEND="
"
PATCHES=(
+ # PR pending https://github.com/mborgerding/kissfft/pull/92
"${FILESDIR}"/${PN}-131.1.0-cmake.patch
)