unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43317] [PATCH] gnu: Add surge-synth.
@ 2020-09-10 19:08 Alexandros Theodotou
  2020-09-19 20:51 ` bug#43317: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandros Theodotou @ 2020-09-10 19:08 UTC (permalink / raw)
  To: 43317


[-- Attachment #1.1: Type: text/plain, Size: 60 bytes --]

Hi,

This patch adds surge synthesizer.

Thanks,
Alex

[-- Attachment #1.2: 0001-gnu-Add-surge-synth.patch --]
[-- Type: text/x-patch, Size: 3634 bytes --]

From 613f46926fdf0453ec5ad5f5883130ed86bf6d9c Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Thu, 10 Sep 2020 20:07:32 +0100
Subject: [PATCH] gnu: Add surge-synth.

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

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 28c889019e..4cfefc472e 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -775,6 +775,75 @@ are helpful when working in problem spaces where timing is important (such as
 audio and video).")
     (license license:bsd-2)))
 
+(define-public surge-synth
+  (package
+   (name "surge-synth")
+   (version "1.7.1")
+   (source
+     (origin
+       (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/surge-synthesizer/surge")
+               (commit (string-append "release_" version))
+               (recursive? #t))) ; build system expects modules to be there
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1jhk8iaqh89dnci4446b47315v2lc8gclraygk8m9jl20zpjxl0l"))))
+   (build-system cmake-build-system)
+   (arguments
+    `(#:tests? #f ; no tests included
+      #:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'replace-python
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (begin
+              (substitute* "CMakeLists.txt"
+                           ((" python ") (string-append " " (assoc-ref inputs "python") "/bin/python3 ")))
+              #t)))
+        (add-after 'unpack 'fix-data-path
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (begin
+              (substitute* "src/common/SurgeStorage.cpp"
+                           (("/usr") (assoc-ref outputs "out")))
+              #t)))
+        (replace 'install ; no install target
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((src (assoc-ref inputs "source"))
+                   (out (assoc-ref outputs "out"))
+                   (share (string-append out "/share"))
+                   (lib (string-append out "/lib"))
+                   (lv2 (string-append lib "/lv2"))
+                   (vst3 (string-append lib "/vst3")))
+              (mkdir-p lv2)
+              (mkdir-p vst3)
+              ;; Install LV2 plugin.
+              (copy-recursively "surge_products/Surge.lv2"
+                                (string-append lv2 "/Surge.lv2"))
+              ;; Install VST3 plugin.
+              (copy-recursively "surge_products/Surge.vst3"
+                                (string-append vst3 "/Surge.vst3"))
+              ;; Install data.
+              (copy-recursively (string-append src "/resources/data")
+                                (string-append share "/Surge"))
+              #t))))))
+   (inputs
+    `(("cairo" ,cairo)
+      ("libxkbcommon" ,libxkbcommon)
+      ("python" ,python)
+      ("xcb-util" ,xcb-util)
+      ("xcb-util-cursor" ,xcb-util-cursor)
+      ("xcb-util-keysyms" ,xcb-util-keysyms)))
+   (native-inputs
+    `(("pkg-config" ,pkg-config)))
+   (home-page "https://surge-synthesizer.github.io/")
+   (synopsis "Synthesizer plugin")
+   (description
+    "Surge is a subtractive hybrid digital synthesizer.  Each patch contains
+two 'scenes' which are separate instances of the entire synthesis engine
+(except effects) that can be used for layering or split patches.")
+   (license license:gpl3+)))
+
 (define-public klick
   (package
     (name "klick")
-- 
2.27.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-19 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 19:08 [bug#43317] [PATCH] gnu: Add surge-synth Alexandros Theodotou
2020-09-19 20:51 ` bug#43317: " Ludovic Courtès

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).