From 641a18d7b3e1bd0089b451150ad82417de7d3bb1 Mon Sep 17 00:00:00 2001
* gnu/packages/audio.scm (qm-dsp): New variable.
---
gnu/packages/audio.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
Toggle diff (80 lines)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index d489733bd1..516c5d57da 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -144,6 +144,7 @@ (define-module (gnu packages audio)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26))
@@ -614,6 +615,65 @@ (define-public aubio
streams from live audio.")
(license license:gpl3+)))
+(define-public qm-dsp
+ (package
+ (name "qm-dsp")
+ (version "1.7.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/c4dm/qm-dsp")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1vkb1xr2hjcaw88gig7rknlwsx01lm0w94d2z0rk5vz9ih4fslvv"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ `(,(string-append "-f" (assoc-ref %build-inputs "source") "/build/"
+ (if ,(string-match "x86_64-linux"
+ (or (%current-target-system)
+ (%current-system)))
+ "linux/Makefile.linux64"
+ (if ,(string-match "i686-linux"
+ (or (%current-target-system)
+ (%current-system)))
+ "linux/Makefile.linux32"
+ (if ,(string-match "mingw32"
+ (or (%current-target-system)
+ (%current-system)))
+ "mingw32/Makefile.mingw32"
+ "general/Makefile.inc"))))
+ ,(string-append "CC=" ,(cc-for-target)))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (include (string-append out "/include")))
+ (install-file "libqm-dsp.a" lib)
+ (mkdir-p include)
+ (for-each
+ (lambda (dir)
+ (for-each
+ (lambda (file)
+ (if (directory-exists? file)
+ (mkdir-p (string-append include "/" file))
+ (if (string-suffix? ".h" file)
+ (copy-file file (string-append include "/" file))
+ #t)))
+ (find-files dir #:directories? #t)))
+ '("base" "dsp" "ext" "hmm" "maths" "thread"))))))
+ #:test-target "tests"))
+ (home-page "https://code.soundsoftware.ac.uk/projects/qm-dsp")
+ (synopsis "C++ library of functions for DSP and Music Informatics purposes")
+ (description
+ "QM-DSP is a C++ library of functions for DSP and Music Informatics
+purposes developed at Queen Mary, University of London.")
+ (license license:gpl2+)))
+
(define (ardour-rpath-phase major-version)
`(lambda* (#:key outputs #:allow-other-keys)
(let ((libdir (string-append (assoc-ref outputs "out")
--
2.38.0