From 3feccc0f627a2bb44c5f03bd54fa9d08198c1702 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:59:55 +0200
Subject: [PATCH 4/4] gnu: zynaddsubfx: Update to 3.0.6.
Upstream has switched from ntk to mruby-zest.
* gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
Update package style.
[arguments]{#:phases}[fix-zyn-fusion-location]: New phase for new dependency.
[inputs]: Add mruby-zest.
[home-page]: Update home page.
Modified-by: Maxime Devos <maximedevos@telenet.be>
---
gnu/packages/music.scm | 74 +++++++++++++++++++++++++-----------------
1 file changed, 45 insertions(+), 29 deletions(-)
@@ -3167,42 +3167,58 @@ (define-public mruby-zest
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version "3.0.6")
(source (origin
(method url-fetch)
(uri (string-append
- "mirror://sourceforge/zynaddsubfx/zynaddsubfx/"
- version "/zynaddsubfx-" version ".tar.bz2"))
+ "mirror://sourceforge/zynaddsubfx/zynaddsubfx/" version
+ "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
(build-system cmake-build-system)
(arguments
- `(#: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)))))
- (inputs
- (list liblo
- ntk
- mesa
- alsa-lib
- jack-1
- fftw
- minixml
- libxpm
- zlib))
- (native-inputs
- (list pkg-config))
- (home-page "http://zynaddsubfx.sf.net/")
+ (list #:configure-flags #~(list "-DGuiModule=zest"
+ (string-append "-DZYN_DATADIR="
+ #$output
+ "/share/zynaddsubfx")
+ (string-append "-DBASHCOMP_PKG_PATH="
+ #$output
+ "/share/bash-completion/completions"))
+ #: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")))))
+ (add-after 'unpack 'fix-zyn-fusion-location
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (search-input-file inputs "bin/zyn-fusion")))
+ (substitute*
+ "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("(\\./|/opt/zyn-fusion/|)libzest.so")
+ (search-input-file inputs
+ "lib/zyn-fusion/libzest.so"))))))))
+ (inputs (list alsa-lib
+ fftwf
+ jack-1
+ liblo
+ libxpm
+ mesa
+ minixml
+ mruby-zest
+ ntk ; optional, alternative interface
+ zlib))
+ (native-inputs (list pkg-config ruby))
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
--
2.38.0