all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#40441] [PATCH 3/3] gnu: Add zynfusion.
@ 2020-04-04 21:14 Alexandros Theodotou
  0 siblings, 0 replies; only message in thread
From: Alexandros Theodotou @ 2020-04-04 21:14 UTC (permalink / raw)
  To: 40441


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

Hi,

This patch adds zynfusion. The LV2 plugin seems to work well and its
LV2 presets also work.

Some problems that are still pending:
- the binary (standalone) version doesn't work (needs some rtpath-
related patch I'm not sure how to do)
- preset banks are not found by the plugin, even though I patched what
appears to be the paths it looks at

Feel free to edit it.

Thanks,
Alex

[-- Attachment #1.2: 0003-gnu-Add-zynfusion.patch --]
[-- Type: text/x-patch, Size: 4178 bytes --]

From 8bf94ba51559ae4357b6619d61ef13b48e886940 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Sat, 4 Apr 2020 22:06:27 +0100
Subject: [PATCH 3/3] gnu: Add zynfusion.

* gnu/packages/music.scm (zynfusion): 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 7d0cfe8665..2b5c6cc462 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -128,6 +128,7 @@
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tcl)
@@ -5383,3 +5384,71 @@ filtered, pitch shifted and ultimately disintegrated.  This is an unofficial
 port of the Regrader plugin created by Igorski.  It is available as an LV2
 plugin and a standalone JACK application.")
     (license license:expat)))
+
+(define-public zynfusion
+  (package/inherit zynaddsubfx
+    (name "zynfusion")
+    (arguments
+     `(#:configure-flags
+       ;; Enable ZynFusion mode
+       '("-DGuiModule=zest" "-DDemoMode=false")
+       #:phases
+       (modify-phases %standard-phases
+         ;; Move SSE compiler optimization flags from generic target to
+         ;; athlon64 and core2 targets, because otherwise the build would fail
+         ;; on non-Intel machines.
+         (add-after 'unpack 'remove-sse-flags-from-generic-target
+          (lambda _
+            (substitute* "src/CMakeLists.txt"
+              (("-msse -msse2 -mfpmath=sse") "")
+              (("-march=(athlon64|core2)" flag)
+               (string-append flag " -msse -msse2 -mfpmath=sse")))
+            #t))
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((zest (assoc-ref inputs "mruby-zest"))
+                   (out (assoc-ref %outputs "out")))
+             ;; Patch zest path so that the ZynFusion UI can be found
+              (substitute* "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+                           (("\\./libzest\\.so")
+                            (string-append zest "/lib/zynfusion/libzest.so")))
+              (substitute* "src/main.cpp"
+                           (("\\./zyn-fusion")
+                            (string-append zest "/lib/zynfusion/zyn-fusion")))
+              (substitute* "src/main.cpp"
+                           (("\\\"zyn-fusion\\\"")
+                            (string-append "\"" zest "/lib/zynfusion/zyn-fusion\"")))
+              ;; Patch banks path FIXME banks are still not found
+              (substitute* "src/Misc/Config.cpp"
+                           (("cfg.bankRootDirList\\[4\\] =.*$")
+                            (string-append "cfg.bankRootDirList[4] = \""
+                                           out "/share/zynaddsubfx/banks\";\n")))
+               #t)))
+         ;; Rename to avoid clashes with the zynaddsubfx package
+         (add-after 'install 'rename-to-zyn-fusion
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (share (string-append out "/share")))
+               (rename-file (string-append bin "/zynaddsubfx")
+                            (string-append bin "/zynfusion"))
+               (substitute* (find-files (string-append share "/applications")
+                                        "\\.desktop$")
+                            (("Exec=zynaddsubfx")
+                             "Exec=zynfusion"))
+               #t))))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("cairo" ,cairo)
+       ("fftw" ,fftw)
+       ("jack" ,jack-1)
+       ("liblo" ,liblo)
+       ("libxpm" ,libxpm)
+       ("mesa" ,mesa)
+       ("minixml" ,minixml)
+       ("mruby-zest" ,mruby-zest)
+       ("ruby" ,ruby)
+       ("zlib" ,zlib)))
+    (description
+     "ZynFusion is an alternative, modern UI for the ZynAddSubFX
+synthesizer.")))
-- 
2.26.0


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-04 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 21:14 [bug#40441] [PATCH 3/3] gnu: Add zynfusion Alexandros Theodotou

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.