Subject: bug#42278: closed (Re: [bug#42278] [PATCH] gnu: Add ninjas2.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 20 Jul 2020 21:58:02 +0000

Your bug report

#42278: [PATCH] gnu: Add ninjas2.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42278: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42278
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#42278] [PATCH] gnu: Add ninjas2.
From: Marius Bakke <[email-masked]>
To: Alexandros Theodotou <[email-masked]>, [email-masked]
Date: Mon, 20 Jul 2020 23:57:32 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Alexandros Theodotou <[email-masked]> writes:

> Hi,
>
> This patch adds ninjas2 (lv2 plugin).

Applied with these changes:

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 4943249705..989c65a932 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -923,17 +923,17 @@ Sega Master System/Mark III, Sega Genesis/Mega Drive, BBC Micro
         (git-reference
          (url "https://github.com/clearly-broken-software/ninjas2.git")
          (commit (string-append "v" version))
-         ;; bundles a specific commit of the DISTRHO plugin framework
+         ;; Bundles a specific commit of the DISTRHO plugin framework.
          (recursive? #t)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "1kwp6pmnfar2ip9693gprfbcfscklgri1k1ycimxzlqr61nkd2k9"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f                      ; no "check" target
+     `(#:tests? #f                      ;no tests
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
-             "CC=gcc")
+             (string-append "CC=" ,(cc-for-target)))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ;no configure target
@@ -973,7 +973,7 @@ Sega Master System/Mark III, Sega Genesis/Mega Drive, BBC Micro
     (description
      "Ninjas 2 is a rewrite of the Ninjas sample slicer audio plugin.
 Its goal is to be an easy to use sample slicer with quick slicing of samples
-and auto-mapping slices to midi note numbers.")
+and auto-mapping slices to MIDI note numbers.")
     (home-page "https://github.com/clearly-broken-software/ninjas2")
     (license license:gpl3+)))

Thanks!

Subject: [PATCH] gnu: Add ninjas2.
From: Alexandros Theodotou <[email-masked]>
To: Guix patches <[email-masked]>
Date: Wed, 08 Jul 2020 22:23:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

This patch adds ninjas2 (lv2 plugin).

Thanks,
Alex
From 0f7874ec8d547c7249c60beda2447a3f9c5f7b88 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <[email-masked]>
Date: Wed, 8 Jul 2020 22:22:19 +0100
Subject: [PATCH] gnu: Add ninjas2.

* gnu/packages/music.scm (ninjas2): New variable.
---
 gnu/packages/music.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6dc1229a54..7f1f3f3e9a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -912,6 +912,71 @@ Sega Master System/Mark III, Sega Genesis/Mega Drive, BBC Micro
                    ;; demo and player directories are under the Expat license
                    license:expat))))
 
+(define-public ninjas2
+  (package
+    (name "ninjas2")
+    (version "0.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/clearly-broken-software/ninjas2.git")
+         (commit (string-append "v" version))
+         ;; bundles a specific commit of the DISTRHO plugin framework
+         (recursive? #t)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kwp6pmnfar2ip9693gprfbcfscklgri1k1ycimxzlqr61nkd2k9"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no "check" target
+       #:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure target
+         (replace 'install              ;no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (lv2 (string-append out "/lib/lv2")))
+               ;; Install LV2.
+               (for-each
+                (lambda (file)
+                  (copy-recursively file
+                                    (string-append lv2 "/" (basename file))))
+                (find-files "bin" "\\.lv2$" #:directories? #t))
+               ;; Install executables.
+               (for-each
+                 (lambda (file)
+                   (install-file file bin))
+                 (find-files "bin"
+                             (lambda (name stat)
+                               (and
+                                 (equal? (dirname name) "bin")
+                                 (not (string-suffix? ".so" name))
+                                 (not (string-suffix? ".lv2" name))))))
+               #t))))))
+    (inputs
+     `(("fftwf" ,fftwf)
+       ("jack" ,jack-1)                 ; for the standalone JACK application
+       ("libsamplerate" ,libsamplerate)
+       ("mesa" ,mesa)
+       ("libsndfile" ,libsndfile)))
+    (native-inputs
+     `(("ladspa" ,ladspa)
+       ("lv2" ,lv2)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Sample slicer audio plugin")
+    (description
+     "Ninjas 2 is a rewrite of the Ninjas sample slicer audio plugin.
+Its goal is to be an easy to use sample slicer with quick slicing of samples
+and auto-mapping slices to midi note numbers.")
+    (home-page "https://github.com/clearly-broken-software/ninjas2")
+    (license license:gpl3+)))
+
 (define-public lilypond
   (package
     (name "lilypond")
-- 
2.27.0