unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: David Elsing <david.elsing@posteo.net>
To: 64114@debbugs.gnu.org
Cc: David Elsing <david.elsing@posteo.net>
Subject: [bug#64114] [PATCH v2 2/2] gnu: Add fftw-documentation.
Date: Sun, 14 Jan 2024 15:55:14 +0000	[thread overview]
Message-ID: <20240114155516.12457-3-david.elsing@posteo.net> (raw)
In-Reply-To: <9ae0d0f6a21a74fc0b36c52f23bbbd44b251d039.1686934712.git.david.elsing@posteo.net>

* gnu/packages/algebra.scm (fftw-documentation): New variable.
---
 gnu/packages/algebra.scm | 42 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index dbed683bef..1b2694400d 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -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")
-- 
2.41.0





      parent reply	other threads:[~2024-01-14 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 17:16 [bug#64114] [PATCH] gnu: fftw: Update to 3.3.10 and build entirely from source David Elsing
2024-01-14 15:55 ` [bug#64114] [PATCH v2 0/2] Build fftw " David Elsing
2024-01-14 15:55 ` [bug#64114] [PATCH v2 1/2] gnu: fftw: Build " David Elsing
2024-01-14 15:55 ` David Elsing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240114155516.12457-3-david.elsing@posteo.net \
    --to=david.elsing@posteo.net \
    --cc=64114@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).