diff options
author | Alexandros Theodotou <alex@zrythm.org> | 2020-04-04 22:06:27 +0100 |
---|---|---|
committer | Guix Patches Tester <> | 2020-04-04 22:16:08 +0100 |
commit | 91522c5475fe0d0aa5d9d367a7a1c3778718348f (patch) | |
tree | 4c6135c233117ef73456a45d8ae09004151920c9 | |
parent | 3aec420dd140f46131f748fa853fdd08392d508f (diff) | |
download | patches-series-3439.tar patches-series-3439.tar.gz |
gnu: Add zynfusion.series-3439
* gnu/packages/music.scm (zynfusion): New variable.
-rw-r--r-- | gnu/packages/music.scm | 69 |
1 files changed, 69 insertions, 0 deletions
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."))) |