guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: gnu: fftw: Factorize creation of the --enable-threads variant.


From: Ludovic Courtès
Subject: 03/04: gnu: fftw: Factorize creation of the --enable-threads variant.
Date: Mon, 2 Jan 2017 15:39:37 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 1a49a10a94e90dc8bb4ce80d2dc2fa21acf76424
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 2 14:52:30 2017 +0100

    gnu: fftw: Factorize creation of the --enable-threads variant.
    
    * gnu/packages/algebra.scm (pthread-variant): New procedure.
    (fftw-with-threads, fftwf-with-threads): Use it.
---
 gnu/packages/algebra.scm |   21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 892b6cf..d09e2e8 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -577,23 +577,22 @@ cosine/ sine transforms or DCT/DST).")
      (string-append (package-description fftw)
                     "  Single-precision version."))))
 
-;; FIXME: These packages are used temporarily by packages like Ardour until
-;; "--enable-flags" is added to the fftw and fftwf packages.
-(define-public fftw-with-threads
-  (package (inherit fftw)
-    (name "fftw-pthreads")
+(define (pthread-variant p)
+  (package
+    (inherit p)
+    (name (string-append (package-name p) "-pthreads"))
     (arguments
      (substitute-keyword-arguments (package-arguments fftw)
        ((#:configure-flags flags)
         `(cons "--enable-threads" ,flags))))))
 
+;; FIXME: These packages are used temporarily by packages like Ardour until
+;; "--enable-flags" is added to the fftw and fftwf packages.
+(define-public fftw-with-threads
+  (pthread-variant fftw))
+
 (define-public fftwf-with-threads
-  (package (inherit fftwf)
-    (name "fftwf-pthreads")
-    (arguments
-     (substitute-keyword-arguments (package-arguments fftwf)
-       ((#:configure-flags flags)
-        `(cons "--enable-threads" ,flags))))))
+  (pthread-variant fftwf))
 
 (define-public fftw-openmpi
   (package (inherit fftw)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]