[PATCH] Add fftw-cmake

  • Done
  • quality assurance status badge
Details
2 participants
  • Mehmet Tekman
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Mehmet Tekman
Severity
normal
M
M
Mehmet Tekman wrote on 21 Nov 2023 21:56
(address . guix-patches@gnu.org)
87o7fmu8or.fsf@gmail.com
This patch is a dependency of krita 5.2.1, and is a clone of the fftw
gnu-build which does not provide a required CMake file for krita.

It is not clear if the CMake build provides the target optimizations, so
it does replace the existing fftw variable.
From 70fc6c6ada030c7b5d4d35da6da8a2f4f018ff74 Mon Sep 17 00:00:00 2001
From: mtekman <mtekman89@gmail.com>
Date: Tue, 21 Nov 2023 21:35:56 +0100
Subject: [PATCH] gnu: Add fftw-cmake

* gnu/packages/algebra.scm (fftw-cmake): New variable

This is a clone of the fftw function, but uses cmake to build in order for
the FFTW3LibraryDepends.cmake file to be built, neccesary for packages with
cmake builds that depend on fftw3.


This variable is cloned from the existing fftw3 in order to not break any
downstream packages that make use of the target optimizations given by the
gnu build.

Change-Id: Ied7920beae0494350445d3a1905fa37b2b83976a
---
gnu/packages/algebra.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index c0fe75ddfd..a31338ff6f 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -778,6 +778,33 @@ (define-public fftw
cosine/ sine transforms or DCT/DST).")
(license license:gpl2+)))
+(define-public fftw-cmake
+ (package
+ ;; Cmake compiling is experimental since 2017, and it is not clear if this
+ ;; build has the same target-specific optimizations as the fftw gnu build.
+ ;; See: https://fftw.org/release-notes.html
+ (name "fftw-cmake")
+ (version "3.3.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-" version
+ ".tar.gz"))
+ (sha256
+ (base32 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
+ (build-system cmake-build-system)
+ (native-inputs (list perl))
+ (home-page "https://fftw.org")
+ (synopsis "Computing the discrete Fourier transform")
+ (description
+ "FFTW is a C subroutine library for computing the discrete Fourier
+transform (DFT) in one or more dimensions, of arbitrary input size, and of
+both real and complex data (as well as of even/odd data---i.e. the discrete
+cosine/ sine transforms or DCT/DST). This CMake build offers the file
+FFTW3LibraryDepends.cmake required by some dependent packages, absent in the
+gnu build version.")
+ (license license:gpl2+)))
+
(define-public fftwf
(package/inherit fftw
(name "fftwf")
--
2.41.0
M
M
Mehmet Tekman wrote on 27 Nov 2023 23:59
(address . 67343@debbugs.gnu.org)
87o7feyf86.fsf@gmail.com
After talking with <futurile> via irc[0], it was explained to me that I can
inherit an existing package decleration instead of cloning it.


This is an update of the previous patch. Please use this patch instead
and ignore the previous one.
From b4a6539391ae1a5e241d6398f8f33a5e63e890e1 Mon Sep 17 00:00:00 2001
From: Mehmet Tekman <mtekman89@gmail.com>
Date: Mon, 27 Nov 2023 23:38:32 +0100
Subject: [PATCH] * gnu/packages/algebra.scm (fftw-cmake): New variable

This is a clone of the fftw function, but uses cmake to build in order for
the FFTW3LibraryDepends.cmake file to be built, neccesary for packages with
cmake builds that depend on fftw3.


This variable is cloned from the existing fftw3 in order to not break any
downstream packages that make use of the target optimizations given by the
gnu build.

Change-Id: I620d00d980421bc063c325718e0cafc4ae23e57e
---
gnu/packages/algebra.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index c0fe75ddfd..ecad6b2b21 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020, 2021, 2023 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Mehmet Tekman <mtekman89@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -733,6 +734,20 @@ (define-public kiss-fft-for-extempore
a C program.")
(license license:bsd-3)))
+(define-public fftw-cmake
+ (package/inherit fftw
+ ;; Cmake compiling is experimental since 2017, and it is not clear if this
+ ;; build has the same target-specific optimizations as the fftw gnu build.
+ ;; See: https://fftw.org/release-notes.html
+ (name "fftw-cmake")
+ (build-system cmake-build-system)
+ (arguments (default-keyword-arguments '()
+ '()))
+ (description (string-append (package-description fftw)
+ " This CMake build offers the file
+FFTW3LibraryDepends.cmake required by some dependent packages, absent in the
+gnu build version."))))
+
(define-public fftw
(package
(name "fftw")
--
2.41.0
M
S
S
Sharlatan Hellseher wrote on 29 Mar 17:47 +0100
(address . 67343-done@debbugs.gnu.org)
87r0ftc7dx.fsf@gmail.com
Pushed as 74d2c8304f3839efcbb048d23f366df9f33d7646 to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYG8JoACgkQdtcnv/Ys
0rWKjg//Q7i7kT0kVRdzE7w3yWcdiPRlNzo9To4A1kXGy3xgr6XInZvuZn3EpCug
MbWTbbWmX/6xsfzxH9X3P+FaXYA93fiAq4dw+VeY3YJWY70bhZAQK4zICex83f55
UZUU3clYSuskz4mJIunh5sx8PU2sJXvzZNzc2u1NW1cNjwIMS1pbCF34oXlKSgcM
uTCienL/UtPUayOPuoOe2GUURcFx/AqIRcTnk6wVKdCWQgyYgCqv0h3T+gJZVnFw
u+5IZqmxUaLh+1uClPv7UKwRuPr8hs7u0af/2CqaPa3LM4YzSRhEQ8VqSHDdr1+G
0GwMEU1ih8OeYRvHtvGZ7Zp5tjY7PX6qna2a6rPNf11kHaGBZgN1+Q3Ww3at7lU8
TYHGhp5OkicgFL/FyBKQ51SwV+BLuNzxi4ywHa3s/U/lAyoaB3lfG49bfYCUmSRj
Zm0UIkCLvBsLJtU7Kix6MiBH/Myfvb1to1UCD3DERvEpouJEfyaVDis3UxSSQdMZ
VL1+vyd0P4fpQNXtloX1fIaI5J5oOWx71JFjaumhWpSdqvFGjAsL+p0JkHwhxl76
k1wF99CJd0g3TlGpOzizda0UQ2VtAljPNDRHGi/GJMLBUkLRsKljH0tH7OupmQ+L
zUu6elfqL/nLvz3BpXWuma8gQyQpF39pOa0wt2TDrgwOI2DPkNo=
=N8w8
-----END PGP SIGNATURE-----

Closed
?