@@ -807,6 +807,48 @@ (define-public fftw
cosine/ sine transforms or DCT/DST).")
(license license:gpl2+)))
+;; Separate package to prevent dependency cycle
+(define-public fftw-documentation
+ (package/inherit fftw
+ (name "fftw-documentation")
+ (arguments
+ (substitute-keyword-arguments (package-arguments fftw)
+ ((#:tests? _ #f) #f)
+ ((#:phases phases '%standard-phases)
+ #~(modify-phases #$phases
+ (replace 'build
+ (lambda _
+ ;; Reproducibility
+ (substitute* "doc/FAQ/m-html.pl"
+ (("- \\$html_date\\\\n") "")
+ (("\\$html_year \\$user_copyholder")
+ "2021 $user_copyholder"))
+ (substitute* "doc/FAQ/fftw-faq.bfnn"
+ ((".*`date.*") ""))
+ (invoke "make" "-C" "doc")
+ (invoke "make" "-C" "doc" "html")
+ (invoke "make" "-C" "doc/FAQ" "faq")))
+ (replace 'install
+ (let ((doc (string-append #$output "/share/doc/"
+ #$(package-name this-package) "-"
+ #$(package-version this-package))))
+ (lambda _
+ (copy-recursively "doc/html" (string-append doc "/html"))
+ (copy-recursively "doc/FAQ/fftw-faq.html"
+ (string-append doc "/fftw-faq.html"))
+ (install-file "doc/FAQ/fftw-faq.ascii" doc))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs fftw)
+ (prepend ghostscript texinfo fig2dev)))
+ (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).")
+ (license license:gpl2+)))
+
(define-public fftwf
(package/inherit fftw
(name "fftwf")