* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
@ 2022-09-21 17:21 Sughosha via Guix-patches via
2022-09-21 17:28 ` [bug#57984] Fix typo in commit message Sughosha via Guix-patches via
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2022-09-21 17:21 UTC (permalink / raw)
To: 57984
[-- Attachment #1.1: Type: text/plain, Size: 13 bytes --]
Empty Message
[-- Attachment #1.2: Type: text/html, Size: 24 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Update-zynaddsubfx-to-3.0.6.patch --]
[-- Type: text/x-patch; name=0001-gnu-Update-zynaddsubfx-to-3.0.6.patch, Size: 6908 bytes --]
From 77f364a304e4510baafe86f5a641bdf84952bf06 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Wed, 21 Sep 2022 19:15:47 +0200
Subject: [PATCH] gnu: Update zynaddsubfx to 3.0.6
gnu/packages/music.scm (mruby-zest): New variable.
* gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
Upgrade to Zyn-Fusion with new UI called zest.
---
gnu/packages/music.scm | 96 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 88 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 66b4beae0c..c9081bfb69 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages music)
#: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 serialization)
#:use-module (gnu packages sphinx)
@@ -2989,10 +2990,69 @@ (define-public vmpk
instrument or MIDI file player.")
(license license:gpl3+)))
+(define mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags `("CC=gcc" "CONFIG_SHELL=bash")
+ #:phases (modify-phases %standard-phases
+ ;; no configure rule available
+ (delete 'configure)
+ ;; no install rule available
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append (assoc-ref outputs "out")
+ "/opt/zest")))
+ (install-file "zest" out)
+ (install-file "libzest.so" out)
+ (install-file "mruby/bin/mruby" out)
+ (install-file "deps/nanovg/example/entypo.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Bold.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Light.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Regular.ttf"
+ (string-append out "/font"))
+ (copy-recursively "src/mruby-zest/qml"
+ (string-append out "/qml"))
+ (copy-recursively "src/mruby-zest/example"
+ (string-append out "/qml"))
+ (invoke "touch"
+ (string-append out "/qml/MainWindow.qml"))
+ (copy-recursively "src/osc-bridge/schema"
+ (string-append out "/schema"))
+ (copy-file "completions/zyn-fusion"
+ (string-append out "/completions"))
+ (wrap-program (string-append out "/zest")
+ `("LD_LIBRARY_PATH" =
+ (,out)))))))))
+ (native-inputs (list ruby libuv pkg-config))
+ (inputs (list libx11 mesa bash-minimal))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Widget classes for the mruby-zest framework")
+ (description
+ "This repository contains all of the widgets needed to create the
+@code{zyn-fusion} user interface for ZynAddSubFX.")
+ (license license:lgpl2.1)))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version (package-version mruby-zest))
(source (origin
(method url-fetch)
(uri (string-append
@@ -3000,10 +3060,11 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3014,20 +3075,39 @@ (define-public zynaddsubfx
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
(string-append flag " -msse -msse2 -mfpmath=sse")))
- #t)))))
+ #t))
+ (add-after 'install 'link-zest
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((zestdir (string-append (assoc-ref inputs
+ "mruby-zest")
+ "/opt/zest"))
+ (bindir (string-append (assoc-ref outputs "out")
+ "/bin"))
+ (libdir (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (symlink (string-append zestdir "/libzest.so")
+ (string-append libdir "/libzest.so"))
+ (symlink (string-append zestdir "/zest")
+ (string-append bindir "/zyn-fusion"))
+ (symlink (string-append zestdir "/font")
+ (string-append libdir "/font"))
+ (symlink (string-append zestdir "/qml")
+ (string-append libdir "/qml"))
+ (symlink (string-append zestdir "/schema")
+ (string-append libdir "/schema"))))))))
(inputs
(list liblo
- ntk
+ mruby-zest
mesa
alsa-lib
jack-1
- fftw
+ fftwf
minixml
libxpm
zlib))
(native-inputs
- (list pkg-config))
- (home-page "http://zynaddsubfx.sf.net/")
+ (list pkg-config ruby doxygen))
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#57984] Fix typo in commit message
2022-09-21 17:21 [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Sughosha via Guix-patches via
@ 2022-09-21 17:28 ` Sughosha via Guix-patches via
2022-09-28 17:21 ` [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Maxim Cournoyer
2022-09-28 20:30 ` Maxim Cournoyer
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2022-09-21 17:28 UTC (permalink / raw)
To: 57984@debbugs.gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 45 bytes --]
Sorry, one small typos in the commit message.
[-- Attachment #1.2: Type: text/html, Size: 122 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Update-zynaddsubfx-to-3.0.6.patch --]
[-- Type: text/x-patch; name=0001-gnu-Update-zynaddsubfx-to-3.0.6.patch, Size: 6910 bytes --]
From 77f364a304e4510baafe86f5a641bdf84952bf06 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Wed, 21 Sep 2022 19:15:47 +0200
Subject: [PATCH] gnu: Update zynaddsubfx to 3.0.6
* gnu/packages/music.scm (mruby-zest): New variable.
* gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
Upgrade to Zyn-Fusion with new UI called zest.
---
gnu/packages/music.scm | 96 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 88 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 66b4beae0c..c9081bfb69 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages music)
#: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 serialization)
#:use-module (gnu packages sphinx)
@@ -2989,10 +2990,69 @@ (define-public vmpk
instrument or MIDI file player.")
(license license:gpl3+)))
+(define mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags `("CC=gcc" "CONFIG_SHELL=bash")
+ #:phases (modify-phases %standard-phases
+ ;; no configure rule available
+ (delete 'configure)
+ ;; no install rule available
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append (assoc-ref outputs "out")
+ "/opt/zest")))
+ (install-file "zest" out)
+ (install-file "libzest.so" out)
+ (install-file "mruby/bin/mruby" out)
+ (install-file "deps/nanovg/example/entypo.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Bold.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Light.ttf"
+ (string-append out "/font"))
+ (install-file "deps/nanovg/example/Roboto-Regular.ttf"
+ (string-append out "/font"))
+ (copy-recursively "src/mruby-zest/qml"
+ (string-append out "/qml"))
+ (copy-recursively "src/mruby-zest/example"
+ (string-append out "/qml"))
+ (invoke "touch"
+ (string-append out "/qml/MainWindow.qml"))
+ (copy-recursively "src/osc-bridge/schema"
+ (string-append out "/schema"))
+ (copy-file "completions/zyn-fusion"
+ (string-append out "/completions"))
+ (wrap-program (string-append out "/zest")
+ `("LD_LIBRARY_PATH" =
+ (,out)))))))))
+ (native-inputs (list ruby libuv pkg-config))
+ (inputs (list libx11 mesa bash-minimal))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Widget classes for the mruby-zest framework")
+ (description
+ "This repository contains all of the widgets needed to create the
+@code{zyn-fusion} user interface for ZynAddSubFX.")
+ (license license:lgpl2.1)))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version (package-version mruby-zest))
(source (origin
(method url-fetch)
(uri (string-append
@@ -3000,10 +3060,11 @@ (define-public zynaddsubfx
version "/zynaddsubfx-" version ".tar.bz2"))
(sha256
(base32
- "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"))))
+ "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags `("-DGuiModule=zest")
+ #:phases
(modify-phases %standard-phases
;; Move SSE compiler optimization flags from generic target to
;; athlon64 and core2 targets, because otherwise the build would fail
@@ -3014,20 +3075,39 @@ (define-public zynaddsubfx
(("-msse -msse2 -mfpmath=sse") "")
(("-march=(athlon64|core2)" flag)
(string-append flag " -msse -msse2 -mfpmath=sse")))
- #t)))))
+ #t))
+ (add-after 'install 'link-zest
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((zestdir (string-append (assoc-ref inputs
+ "mruby-zest")
+ "/opt/zest"))
+ (bindir (string-append (assoc-ref outputs "out")
+ "/bin"))
+ (libdir (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (symlink (string-append zestdir "/libzest.so")
+ (string-append libdir "/libzest.so"))
+ (symlink (string-append zestdir "/zest")
+ (string-append bindir "/zyn-fusion"))
+ (symlink (string-append zestdir "/font")
+ (string-append libdir "/font"))
+ (symlink (string-append zestdir "/qml")
+ (string-append libdir "/qml"))
+ (symlink (string-append zestdir "/schema")
+ (string-append libdir "/schema"))))))))
(inputs
(list liblo
- ntk
+ mruby-zest
mesa
alsa-lib
jack-1
- fftw
+ fftwf
minixml
libxpm
zlib))
(native-inputs
- (list pkg-config))
- (home-page "http://zynaddsubfx.sf.net/")
+ (list pkg-config ruby doxygen))
+ (home-page "https://zynaddsubfx.sourceforge.io/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-09-21 17:28 ` [bug#57984] Fix typo in commit message Sughosha via Guix-patches via
@ 2022-09-28 17:21 ` Maxim Cournoyer
0 siblings, 0 replies; 15+ messages in thread
From: Maxim Cournoyer @ 2022-09-28 17:21 UTC (permalink / raw)
To: Sughosha; +Cc: 57984@debbugs.gnu.org
Hello,
Sughosha <Sughosha@proton.me> writes:
> Sorry, one small typos in the commit message.
> From 77f364a304e4510baafe86f5a641bdf84952bf06 Mon Sep 17 00:00:00 2001
> From: Sughosha <sughosha@proton.me>
> Date: Wed, 21 Sep 2022 19:15:47 +0200
> Subject: [PATCH] gnu: Update zynaddsubfx to 3.0.6
>
> * gnu/packages/music.scm (mruby-zest): New variable.
>
> * gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
>
> Upgrade to Zyn-Fusion with new UI called zest.
> ---
> gnu/packages/music.scm | 96 ++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 88 insertions(+), 8 deletions(-)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 66b4beae0c..c9081bfb69 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -167,6 +167,7 @@ (define-module (gnu packages music)
> #: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 serialization)
> #:use-module (gnu packages sphinx)
> @@ -2989,10 +2990,69 @@ (define-public vmpk
> instrument or MIDI file player.")
> (license license:gpl3+)))
>
> +(define mruby-zest
> + (package
> + (name "mruby-zest")
> + (version "3.0.6")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/mruby-zest/mruby-zest-build")
> + (commit version)
> + (recursive? #t)))
Recursive git clones are typically synonymous with bundled libraries or
other undesired, hence it needs to be explained in a comment. If there
are bundled libraries, they should be packaged separately ideally, or if
that's too much work to do, at least a TODO should be added mentioning
which bundled libraries are currently used.
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))))
> + (build-system gnu-build-system)
> + (arguments
Please use gexps for new packages, e.g. (arguments (list #:make-flags
#~(list "CC=gcc" ...) ...))
> + `(#:tests? #f
Disabling the tests warrants a comment, which can be as simple as the ";no
test suite" inline comment.
> + #:make-flags `("CC=gcc" "CONFIG_SHELL=bash")
> + #:phases (modify-phases %standard-phases
> + ;; no configure rule available
Please use complete sentences for standalone comments, e.g. "There is no
configure script."
> + (delete 'configure)
> + ;; no install rule available
Ditto.
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (string-append (assoc-ref outputs "out")
> + "/opt/zest")))
After this is turned into a gexp, you can use #$output to refer to the
main output directly.
> + (install-file "zest" out)
> + (install-file "libzest.so" out)
> + (install-file "mruby/bin/mruby" out)
> + (install-file "deps/nanovg/example/entypo.ttf"
> + (string-append out "/font"))
> + (install-file "deps/nanovg/example/Roboto-Bold.ttf"
> + (string-append out "/font"))
> + (install-file "deps/nanovg/example/Roboto-Light.ttf"
> + (string-append out "/font"))
> + (install-file "deps/nanovg/example/Roboto-Regular.ttf"
> + (string-append out "/font"))
Can't it use the fonts provided by the system? Packages shouldn't
include any font, ideally, as they're heavy and should be
user-configurable.
> + (copy-recursively "src/mruby-zest/qml"
> + (string-append out "/qml"))
> + (copy-recursively "src/mruby-zest/example"
> + (string-append out "/qml"))
> + (invoke "touch"
> + (string-append out "/qml/MainWindow.qml"))
Why is this empty file needed? A comment would be useful.
> + (copy-recursively "src/osc-bridge/schema"
> + (string-append out "/schema"))
> + (copy-file "completions/zyn-fusion"
> + (string-append out "/completions"))
> + (wrap-program (string-append out "/zest")
> + `("LD_LIBRARY_PATH" =
> + (,out)))))))))
> + (native-inputs (list ruby libuv pkg-config))
> + (inputs (list libx11 mesa bash-minimal))
Please order dependencies lexicographically.
> + (home-page "https://github.com/mruby-zest/mruby-zest-build")
> + (synopsis "Widget classes for the mruby-zest framework")
> + (description
> + "This repository contains all of the widgets needed to create the
> +@code{zyn-fusion} user interface for ZynAddSubFX.")
> + (license license:lgpl2.1)))
> +
> (define-public zynaddsubfx
> (package
> (name "zynaddsubfx")
> - (version "3.0.5")
> + (version (package-version mruby-zest))
> (source (origin
> (method url-fetch)
> (uri (string-append
> @@ -3000,10 +3060,11 @@ (define-public zynaddsubfx
> version "/zynaddsubfx-" version ".tar.bz2"))
> (sha256
> (base32
> - "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"))))
> + "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
> (build-system cmake-build-system)
> (arguments
> - `(#:phases
> + `(#:configure-flags `("-DGuiModule=zest")
> + #:phases
> (modify-phases %standard-phases
> ;; Move SSE compiler optimization flags from generic target to
> ;; athlon64 and core2 targets, because otherwise the build would fail
> @@ -3014,20 +3075,39 @@ (define-public zynaddsubfx
> (("-msse -msse2 -mfpmath=sse") "")
> (("-march=(athlon64|core2)" flag)
> (string-append flag " -msse -msse2 -mfpmath=sse")))
> - #t)))))
> + #t))
Trailing #t are no longer needed; remove them.
> + (add-after 'install 'link-zest
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let ((zestdir (string-append (assoc-ref inputs
> + "mruby-zest")
> + "/opt/zest"))
> + (bindir (string-append (assoc-ref outputs "out")
> + "/bin"))
> + (libdir (string-append (assoc-ref outputs "out")
> + "/lib")))
> + (symlink (string-append zestdir "/libzest.so")
> + (string-append libdir "/libzest.so"))
> + (symlink (string-append zestdir "/zest")
> + (string-append bindir "/zyn-fusion"))
> + (symlink (string-append zestdir "/font")
> + (string-append libdir "/font"))
> + (symlink (string-append zestdir "/qml")
> + (string-append libdir "/qml"))
> + (symlink (string-append zestdir "/schema")
> + (string-append libdir "/schema"))))))))
> (inputs
> (list liblo
> - ntk
> + mruby-zest
> mesa
> alsa-lib
> jack-1
> - fftw
> + fftwf
> minixml
> libxpm
> zlib))
> (native-inputs
> - (list pkg-config))
> - (home-page "http://zynaddsubfx.sf.net/")
> + (list pkg-config ruby doxygen))
Please mind the ordering.
> + (home-page "https://zynaddsubfx.sourceforge.io/")
> (synopsis "Software synthesizer")
> (description
> "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
Could you send a v2 with the requested changes? You can do so with 'git
send-email -v2 --to=57984@debbugs.gnu.org -1' from the checkout which
has this v2 as last commit.
Thank you!
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-09-21 17:21 [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Sughosha via Guix-patches via
2022-09-21 17:28 ` [bug#57984] Fix typo in commit message Sughosha via Guix-patches via
@ 2022-09-28 20:30 ` Maxim Cournoyer
2022-10-15 13:37 ` Sughosha via Guix-patches via
2022-09-28 22:06 ` Maxime Devos
2022-10-26 12:04 ` Maxime Devos
3 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2022-09-28 20:30 UTC (permalink / raw)
To: Sughosha; +Cc: 57984
Hi,
Sughosha <Sughosha@proton.me> writes:
> Empty Message
> From 77f364a304e4510baafe86f5a641bdf84952bf06 Mon Sep 17 00:00:00 2001
> From: Sughosha <sughosha@proton.me>
> Date: Wed, 21 Sep 2022 19:15:47 +0200
> Subject: [PATCH] gnu: Update zynaddsubfx to 3.0.6
>
> gnu/packages/music.scm (mruby-zest): New variable.
>
> * gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
Also, please separate your commits; each package should go to their
individual commit.
Lastly, I see there exists a previous effort to package mruby-zest, with
similar outstanding comments as I made here; see: #40440
(https://issues.guix.gnu.org/40440). These comments should also be
taken into consideration.
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-09-21 17:21 [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Sughosha via Guix-patches via
2022-09-21 17:28 ` [bug#57984] Fix typo in commit message Sughosha via Guix-patches via
2022-09-28 20:30 ` Maxim Cournoyer
@ 2022-09-28 22:06 ` Maxime Devos
2022-10-26 12:04 ` Maxime Devos
3 siblings, 0 replies; 15+ messages in thread
From: Maxime Devos @ 2022-09-28 22:06 UTC (permalink / raw)
To: Sughosha, 57984
[-- Attachment #1.1.1: Type: text/plain, Size: 308 bytes --]
See comments by Maxim, and ...
> "CC=gcc"
When cross-compilation, you need to TARGET-gcc such that it is compiled
for the right architecture. This is done automatically by
(string-append "CC=" #$(cc-for-target)), which should have plenty of
examples in the source code.
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-09-28 20:30 ` Maxim Cournoyer
@ 2022-10-15 13:37 ` Sughosha via Guix-patches via
2022-10-15 14:13 ` Sughosha via Guix-patches via
0 siblings, 1 reply; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2022-10-15 13:37 UTC (permalink / raw)
To: 57984; +Cc: Maxime Devos, Maxim Cournoyer
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
Thank you Maxim and Maxime for your detailed review. I considered all of the changes you pointed out, and here are the attatchments of the new patch files. Regarding recursive clone, I packages the runtime dependencies seperately but I left the mruby gems, since they seem to be needed just as source (without needing to be compiled) as they are to be configured by mruby for mruby-zest. I am also not familier with mruby or ruby.
Thanks,
Sughosha
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-nanovg.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-nanovg.patch, Size: 11915 bytes --]
From 7e70f3c2eaae43367db6c4915cb43817cdee814c Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Wed, 21 Sep 2022 19:15:47 +0200
Subject: [PATCH 1/4] gnu: Add nanovg
* gnu/packages/music.scm (nanovg): New variable.
---
gnu/packages/music.scm | 209 +++++++++++++++++++++++++++++++++++------
1 file changed, 180 insertions(+), 29 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6b37c79389..5d3c19bc78 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages music)
#: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 serialization)
#:use-module (gnu packages sphinx)
@@ -2989,45 +2990,195 @@ (define-public vmpk
instrument or MIDI file player.")
(license license:gpl3+)))
+(define-public nanovg
+ (let ((commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28")
+ (revision "268"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target) "src/nanovg.c" "-c"
+ "-fPIC")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib")))
+ (mkdir-p lib)
+ (invoke "ar" "rc"
+ (string-append lib "/libnanovg.a")
+ "nanovg.o")))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "Antialiased 2D vector drawing library")
+ (description
+ "NanoVG is small antialiased vector graphics rendering library for
+OpenGL. It has lean API modeled after HTML5 canvas API.")
+ (license license:zlib))))
+
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; TODO: package mruby gems seperately.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'use-installed-libs
+ (lambda _
+ (substitute* "Makefile"
+ (("cd deps/nanovg")
+ "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#\\$\\(AR\\) rc deps/libnanovg\\.a")
+ (("cd deps/mruby-file-stat")
+ "#cd deps/mruby-file-stat")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ (string-append #$nanovg "/lib/libnanovg\\.a")))))
+ (add-after 'unpack 'disable-unused-deps
+ (lambda _
+ (substitute* "build_config.rb"
+ (("conf\\.gem 'deps/mruby-file-stat'")
+ "#"))
+ (substitute* "deps/mruby-dir-glob/mrbgem.rake"
+ (("spec\\.add_dependency 'mruby-file-stat'")
+ "#"))))
+ (replace 'install
+ (lambda _
+ (let* ((lib (string-append #$output
+ "/lib/zyn-fusion"))
+ (font (string-append lib "/font"))
+ (qml (string-append lib "/qml"))
+ (roboto (string-append #$font-google-roboto
+ "/share/fonts/truetype"))
+ (bin (string-append #$output "/bin")))
+ ;; Hardcoded to use these font in this path.
+ (mkdir-p (string-append lib "/font"))
+ (symlink (string-append #$font-entypo
+ "/share/fonts/truetype"
+ "/entypo.ttf")
+ (string-append font "/entypo.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Bold.ttf")
+ (string-append font "/Roboto-Bold.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Light.ttf")
+ (string-append font "/Roboto-Light.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Regular.ttf")
+ (string-append font
+ "/Roboto-Regular.ttf"))
+ (copy-recursively "src/mruby-zest/qml" qml)
+ (copy-recursively "src/mruby-zest/example" qml)
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append lib "/schema"))
+ (install-file "libzest.so" lib)
+ ;; zynaddsubfx requires this name.
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" bin)
+ (install-file "completions/zyn-fusion"
+ (string-append #$output
+ "/share/bash-completion/completions")))))
+ (add-after 'install 'wrap
+ (lambda _
+ (wrap-program (string-append #$output
+ "/bin/zyn-fusion")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append #$output
+ "/lib/zyn-fusion")))))))))
+ (native-inputs (list mruby pkg-config ruby))
+ (inputs (list font-entypo
+ font-google-roboto
+ bash-minimal
+ libuv
+ libx11
+ mesa
+ nanovg))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Widget classes for the mruby-zest framework")
+ (description
+ "This repository contains all of the widgets needed to create the
+@code{zyn-fusion} user interface for ZynAddSubFX.")
+ (license license:lgpl2.1)))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version (package-version mruby-zest))
(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"))
+ #:phases #~(modify-phases %standard-phases
+ (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-path
+ (lambda _
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (string-append #$mruby-zest
+ "/bin/zyn-fusion")))
+ (substitute*
+ "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (string-append #$mruby-zest
+ "/lib/zyn-fusion/libzest.so"))))))))
+ (inputs (list alsa-lib
+ fftwf
+ jack-1
+ liblo
+ libxpm
+ mesa
+ minixml
+ mruby-zest
+ zlib))
+ (native-inputs (list doxygen 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-font-entypo.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-font-entypo.patch, Size: 1631 bytes --]
From f0f95c3a9478c38eb7cba1b9ffb0a9e9396e8034 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:03:57 +0200
Subject: [PATCH 2/4] gnu: Add font-entypo
* gnu/packages/fonts.scm (font-entypo): New variable.
---
gnu/packages/fonts.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2d653abf32..639d2fa2b9 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2882,3 +2882,27 @@ (define-public font-chiron-hei-hk
Kong variant of Adobe’s Source Han Sans. The font aims at providing a modern,
region-agnostic glyph set adopting the “modern” glyph style that is similar to
prevalent typefaces in Traditional Chinese regions.")))
+
+(define-public font-entypo
+ (let ((commit "f94e077449daa87321aa0df5643889460ba8291b")
+ (revision "117"))
+ (package
+ (name "font-entypo")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/danielbruce/entypo")
+ (commit commit)))
+ (sha256
+ (base32
+ "0kgy2ia15q93ksh6kbj8p5n44mmmax95w6a5byimbvcqajmvv7m6"))))
+ (build-system font-build-system)
+ (home-page "https://entypo.com")
+ (synopsis "Entypo font")
+ (description
+ "Entypo font is a pictogram suite.")
+ ;; Icons are distributed under CC-BY-SA 3.0 and fonts are distributed
+ ;; under SIL OFL.
+ (license (list license:cc-by-sa3.0 license:silofl1.1)))))
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-mruby-zest.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-mruby-zest.patch, Size: 4106 bytes --]
From 1493a9215bfe32b848d3ec44edcb9c6245d60714 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:06:23 +0200
Subject: [PATCH 3/4] gnu: Add mruby-zest
* gnu/packages/fonts.scm (mruby-zest): New variable.
---
gnu/packages/music.scm | 68 ++++++++++++++++++------------------------
1 file changed, 29 insertions(+), 39 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5d3c19bc78..a09eb6528d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3133,52 +3133,42 @@ (define-public mruby-zest
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version (package-version mruby-zest))
+ (version "3.0.5")
(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
- "1bkirvcg0lz1i7ypnz3dyh218yhrqpnijxs8n3wlgwbcixvn1lfb"))))
+ "0qwzg14h043rmyf9jqdylxhyfy4sl0vsr0gjql51wjhid0i34ivl"))))
(build-system cmake-build-system)
(arguments
- (list #:configure-flags #~(list "-DGuiModule=zest"
- (string-append "-DZYN_DATADIR="
- #$output
- "/share/zynaddsubfx"))
- #:phases #~(modify-phases %standard-phases
- (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-path
- (lambda _
- (substitute* "src/main.cpp"
- (("\\./zyn-fusion")
- (string-append #$mruby-zest
- "/bin/zyn-fusion")))
- (substitute*
- "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
- (("\\./libzest\\.so")
- (string-append #$mruby-zest
- "/lib/zyn-fusion/libzest.so"))))))))
- (inputs (list alsa-lib
- fftwf
- jack-1
- liblo
- libxpm
- mesa
- minixml
- mruby-zest
- zlib))
- (native-inputs (list doxygen pkg-config ruby))
- (home-page "https://zynaddsubfx.sourceforge.io/")
+ `(#: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/")
(synopsis "Software synthesizer")
(description
"ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-zynaddsubfx-Update-to-3.0.6-and-switch-to-zyn-fusion.patch --]
[-- Type: text/x-patch; name=0004-gnu-zynaddsubfx-Update-to-3.0.6-and-switch-to-zyn-fusion.patch, Size: 4278 bytes --]
From 17adfad1899b58edb51e5c6fd56b5200ca8f4cdc Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:16:30 +0200
Subject: [PATCH 4/4] gnu: zynaddsubfx: Update to 3.0.6 and switch to
zyn-fusion
* gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
[arguments]: Switch from NTK to Zest and use gexp.
[inputs]: Replace ntk with mruby-zest.
[native-inputs]: New dependencies.
---
gnu/packages/music.scm | 68 ++++++++++++++++++++++++------------------
1 file changed, 39 insertions(+), 29 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index a09eb6528d..5d3c19bc78 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3133,42 +3133,52 @@ (define-public mruby-zest
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version (package-version mruby-zest))
(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"))
+ #:phases #~(modify-phases %standard-phases
+ (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-path
+ (lambda _
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (string-append #$mruby-zest
+ "/bin/zyn-fusion")))
+ (substitute*
+ "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (string-append #$mruby-zest
+ "/lib/zyn-fusion/libzest.so"))))))))
+ (inputs (list alsa-lib
+ fftwf
+ jack-1
+ liblo
+ libxpm
+ mesa
+ minixml
+ mruby-zest
+ zlib))
+ (native-inputs (list doxygen 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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-15 13:37 ` Sughosha via Guix-patches via
@ 2022-10-15 14:13 ` Sughosha via Guix-patches via
2022-10-15 14:14 ` Sughosha via Guix-patches via
0 siblings, 1 reply; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2022-10-15 14:13 UTC (permalink / raw)
To: 57984; +Cc: Maxime Devos, Maxim Cournoyer
Oops, sorry for messing with the patches. I was switching branches and messed somewhere. Here are the proper patches.
Thank you.
Sughosha
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-15 14:13 ` Sughosha via Guix-patches via
@ 2022-10-15 14:14 ` Sughosha via Guix-patches via
2022-10-24 17:02 ` Maxime Devos
0 siblings, 1 reply; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2022-10-15 14:14 UTC (permalink / raw)
To: 57984; +Cc: Maxime Devos, Maxim Cournoyer
[-- Attachment #1: Type: text/plain, Size: 13 bytes --]
Empty Message
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-font-entypo.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-font-entypo.patch, Size: 1631 bytes --]
From 2830ada1a24ec2051d865ed84fbf18ec07fedbc7 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:54:10 +0200
Subject: [PATCH 2/4] gnu: Add font-entypo
* gnu/packages/music.scm (font-entypo): New variable.
---
gnu/packages/fonts.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2d653abf32..639d2fa2b9 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2882,3 +2882,27 @@ (define-public font-chiron-hei-hk
Kong variant of Adobe’s Source Han Sans. The font aims at providing a modern,
region-agnostic glyph set adopting the “modern” glyph style that is similar to
prevalent typefaces in Traditional Chinese regions.")))
+
+(define-public font-entypo
+ (let ((commit "f94e077449daa87321aa0df5643889460ba8291b")
+ (revision "117"))
+ (package
+ (name "font-entypo")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/danielbruce/entypo")
+ (commit commit)))
+ (sha256
+ (base32
+ "0kgy2ia15q93ksh6kbj8p5n44mmmax95w6a5byimbvcqajmvv7m6"))))
+ (build-system font-build-system)
+ (home-page "https://entypo.com")
+ (synopsis "Entypo font")
+ (description
+ "Entypo font is a pictogram suite.")
+ ;; Icons are distributed under CC-BY-SA 3.0 and fonts are distributed
+ ;; under SIL OFL.
+ (license (list license:cc-by-sa3.0 license:silofl1.1)))))
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-gnu-Add-nanovg.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-nanovg.patch, Size: 2323 bytes --]
From 221e0b7ff0c80b6cb08c33738aed85a6da82b5da Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:52:19 +0200
Subject: [PATCH 1/4] gnu: Add nanovg
* gnu/packages/music.scm (nanovg): New variable.
---
gnu/packages/music.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6b37c79389..42d853fc8c 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2989,6 +2989,43 @@ (define-public vmpk
instrument or MIDI file player.")
(license license:gpl3+)))
+(define-public nanovg
+ (let ((commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28")
+ (revision "268"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke #$(cc-for-target) "src/nanovg.c" "-c"
+ "-fPIC")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib")))
+ (mkdir-p lib)
+ (invoke "ar" "rc"
+ (string-append lib "/libnanovg.a")
+ "nanovg.o")))))))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "Antialiased 2D vector drawing library")
+ (description
+ "NanoVG is small antialiased vector graphics rendering library for
+OpenGL. It has lean API modeled after HTML5 canvas API.")
+ (license license:zlib))))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-mruby-zest.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-mruby-zest.patch, Size: 6838 bytes --]
From 5fe2faa09f06f9a0231907522291926e93036509 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:56:23 +0200
Subject: [PATCH 3/4] gnu: Add mruby-zest
* gnu/packages/music.scm (mruby-zest): New variable.
---
gnu/packages/music.scm | 104 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 42d853fc8c..1ae54033c0 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages music)
#: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 serialization)
#:use-module (gnu packages sphinx)
@@ -3026,6 +3027,109 @@ (define-public nanovg
OpenGL. It has lean API modeled after HTML5 canvas API.")
(license license:zlib))))
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; TODO: package mruby gems seperately.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'use-installed-libs
+ (lambda _
+ (substitute* "Makefile"
+ (("cd deps/nanovg")
+ "#cd deps/nanovg")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a")
+ "#\\$\\(AR\\) rc deps/libnanovg\\.a")
+ (("cd deps/mruby-file-stat")
+ "#cd deps/mruby-file-stat")
+ (("\\./deps/libnanovg\\.a")
+ "-lnanovg"))
+ (substitute* "build_config.rb"
+ (("#\\{`pwd`\\.strip\\}/\\.\\./deps/libnanovg\\.a")
+ (string-append #$nanovg "/lib/libnanovg\\.a")))))
+ (add-after 'unpack 'disable-unused-deps
+ (lambda _
+ (substitute* "build_config.rb"
+ (("conf\\.gem 'deps/mruby-file-stat'")
+ "#"))
+ (substitute* "deps/mruby-dir-glob/mrbgem.rake"
+ (("spec\\.add_dependency 'mruby-file-stat'")
+ "#"))))
+ (replace 'install
+ (lambda _
+ (let* ((lib (string-append #$output
+ "/lib/zyn-fusion"))
+ (font (string-append lib "/font"))
+ (qml (string-append lib "/qml"))
+ (roboto (string-append #$font-google-roboto
+ "/share/fonts/truetype"))
+ (bin (string-append #$output "/bin")))
+ ;; Hardcoded to use these font in this path.
+ (mkdir-p (string-append lib "/font"))
+ (symlink (string-append #$font-entypo
+ "/share/fonts/truetype"
+ "/entypo.ttf")
+ (string-append font "/entypo.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Bold.ttf")
+ (string-append font "/Roboto-Bold.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Light.ttf")
+ (string-append font "/Roboto-Light.ttf"))
+ (symlink (string-append roboto
+ "/Roboto-Regular.ttf")
+ (string-append font
+ "/Roboto-Regular.ttf"))
+ (copy-recursively "src/mruby-zest/qml" qml)
+ (copy-recursively "src/mruby-zest/example" qml)
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append lib "/schema"))
+ (install-file "libzest.so" lib)
+ ;; zynaddsubfx requires this name.
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" bin)
+ (install-file "completions/zyn-fusion"
+ (string-append #$output
+ "/share/bash-completion/completions")))))
+ (add-after 'install 'wrap
+ (lambda _
+ (wrap-program (string-append #$output
+ "/bin/zyn-fusion")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append #$output
+ "/lib/zyn-fusion")))))))))
+ (native-inputs (list mruby pkg-config ruby))
+ (inputs (list font-entypo
+ font-google-roboto
+ bash-minimal
+ libuv
+ libx11
+ mesa
+ nanovg))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Widget classes for the mruby-zest framework")
+ (description
+ "This repository contains all of the widgets needed to create the
+@code{zyn-fusion} user interface for ZynAddSubFX.")
+ (license license:lgpl2.1)))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-zynaddsubfx-Update-to-3.0.6-and-switch-to-zyn-fu.patch --]
[-- Type: text/x-patch; name=0004-gnu-zynaddsubfx-Update-to-3.0.6-and-switch-to-zyn-fu.patch, Size: 4649 bytes --]
From 7770a8393629eac18a706957757bead1e392776c 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 and switch to
zyn-fusion
* gnu/packages/music.scm (zynaddsubfx): Update to 3.0.6.
[arguments]: Use gexp for simplicity.
Switch from NTK to Zest.
[inputs]: Replace ntk with mruby-zest.
[native-inputs]: New dependencies.
---
gnu/packages/music.scm | 70 ++++++++++++++++++++++++------------------
1 file changed, 40 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 1ae54033c0..5d3c19bc78 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,7 +167,7 @@ (define-module (gnu packages music)
#:use-module (gnu packages rdf)
#:use-module (gnu packages readline)
#:use-module (gnu packages rsync)
- #:use-module (gnu packages ruby)
+ #:use-module (gnu packages ruby)
#:use-module (gnu packages sdl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
@@ -3133,42 +3133,52 @@ (define-public mruby-zest
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
- (version "3.0.5")
+ (version (package-version mruby-zest))
(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"))
+ #:phases #~(modify-phases %standard-phases
+ (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-path
+ (lambda _
+ (substitute* "src/main.cpp"
+ (("\\./zyn-fusion")
+ (string-append #$mruby-zest
+ "/bin/zyn-fusion")))
+ (substitute*
+ "src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp"
+ (("\\./libzest\\.so")
+ (string-append #$mruby-zest
+ "/lib/zyn-fusion/libzest.so"))))))))
+ (inputs (list alsa-lib
+ fftwf
+ jack-1
+ liblo
+ libxpm
+ mesa
+ minixml
+ mruby-zest
+ zlib))
+ (native-inputs (list doxygen 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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-15 14:14 ` Sughosha via Guix-patches via
@ 2022-10-24 17:02 ` Maxime Devos
2022-10-24 19:03 ` Maxime Devos
2022-10-25 13:36 ` Maxime Devos
0 siblings, 2 replies; 15+ messages in thread
From: Maxime Devos @ 2022-10-24 17:02 UTC (permalink / raw)
To: Sughosha, 57984; +Cc: Maxim Cournoyer
[-- Attachment #1.1.1: Type: text/plain, Size: 85 bytes --]
On 15-10-2022 16:14, Sughosha wrote:
> [...]
/me looks at revised patches now
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-24 17:02 ` Maxime Devos
@ 2022-10-24 19:03 ` Maxime Devos
2022-10-25 13:36 ` Maxime Devos
1 sibling, 0 replies; 15+ messages in thread
From: Maxime Devos @ 2022-10-24 19:03 UTC (permalink / raw)
To: Sughosha, 57984; +Cc: Maxim Cournoyer
[-- Attachment #1.1.1: Type: text/plain, Size: 166 bytes --]
On 24-10-2022 19:02, Maxime Devos wrote:
>
> On 15-10-2022 16:14, Sughosha wrote:
>> [...]
>
> /me looks at revised patches now
Now at the third patch
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-24 17:02 ` Maxime Devos
2022-10-24 19:03 ` Maxime Devos
@ 2022-10-25 13:36 ` Maxime Devos
1 sibling, 0 replies; 15+ messages in thread
From: Maxime Devos @ 2022-10-25 13:36 UTC (permalink / raw)
To: Sughosha, 57984; +Cc: Maxim Cournoyer
[-- Attachment #1.1.1: Type: text/plain, Size: 17 bytes --]
Now at patch 4.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-09-21 17:21 [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Sughosha via Guix-patches via
` (2 preceding siblings ...)
2022-09-28 22:06 ` Maxime Devos
@ 2022-10-26 12:04 ` Maxime Devos
2022-10-27 13:18 ` Maxim Cournoyer
3 siblings, 1 reply; 15+ messages in thread
From: Maxime Devos @ 2022-10-26 12:04 UTC (permalink / raw)
To: 57984, Maxim Cournoyer, Sughosha
[-- Attachment #1.1.1: Type: text/plain, Size: 5618 bytes --]
> Regarding recursive clone, I packages the runtime dependencies
> seperately but I left the mruby gems, since they seem to be needed
> just as source (without needing to be compiled) as they are to be
> configured by mruby for mruby-zest. [...]
Bundling things that aren't compiled is still bundling. Also, now both
mruby-zest and zynaddsubfx bundle rtosc, which is worse than a package
bundling a dependent that isn't used anywhere else.
I've looked at the latest patches and did some changes (see attached
patches), though the bundling still remains.
In nanovg, I changed the 'revision' to 0 -- its just a monotonically
increasing number for each package update, it's not a 'how many commits
have there been', see (guix)Version Numbers.
I also changed "ar" to #$(ar-for-target) -- using the 'wrong' ar
sometimes works, but not always, e.g. IIRC it failed when
cross-compiling from some 64-bit arch to a 32-bit ach?
Upstream appears to use 'premake4' as a build system, so I adjusted the
package definition accordingly.
I set the 'file-name' field for to be more informative.
---
I corrected the revision in font-entypo as with nanovg.
I expanded the description a little, and added a TODO
on building the font from source (it seems to have been
neglected for font packages because of node dependencies).
The license combination seemed a bit odd to me so I added
some more text there.
---
mruby-zest:
I changed 'TODO: package mruby gems separately' to 'TODO: unbundle mruby
gems' as that seems easier to search for. Some things were actually
packaged, so I removed those from 'deps' in a snippet. It turned out
that the Makefile tried to build mruby, so I patched that out.
As mruby isn't included anymore, you could give removing some of the
bundled mruby gems a try, especially given that they aren't actually
installed.
I removed '#:tests? #false' because a test suite exists -- the makefile
has a 'test' and 'rtest' target. I choose the 'rtest' target (because
'test' is for testing mruby, not mruby-zest). It turned out the test
suite requires 'ruby-ruby-prof' so I added that as a native-input.
You have done #$some-input in the 'install' phase -- package
transformation don't know to adjust those, so I replaced it with a
search-input-file equivalent.
Putting the fonts in the output of mruby-zest doesn't lookk quite right
to me, so I instead moved things to a post-unpack phase and used
'substitute*' instead of 'symlink'.
I noticed that pcre was bundled (deps/mruby-regexp-pcre/pcre'), so I
removed that.
By looking at
<https://github.com/archlinux/svntogit-community/tree/packages/zynaddsubfx/trunk>,
I noticed it looks for libzest.so in /opt/zyn-fusion/libzest.so, which
is incorrect in Guix (and other distros too).
I removed the wrapping because:
* no reason was listed for wrapping
* presumably the incorrect reference was the thing that
LD_LIBRARY_PATH was a work-around for, but that reference has now
been corrected.
* LD_LIBRARY_PATH is leaky and hence to be avoided
(if zest spawns a subprocess, then that subprocess would get
LD_LIBRARY_PATH too)
As a bonus, this allowed removing 'bash-minimal' from the inputs.
From
<https://github.com/archlinux/svntogit-community/blob/packages/zynaddsubfx/trunk/zynaddsubfx-mruby-zest-build-3.0.6-system_wide_location.patch>,
I noticed that apparently some references to schema/test.json and
MainWindow.qml were incorrect. These are now patched.
I simplified the unbundling substitutions a little.
For example, it turned out that build_config.rb did not need any
substitutions somehow.
The makefile uses pkg-config instead of TARGET-pkg-config, which is
incorrect when cross-compiling, so I patched that.
On the fonts: I noticed that the fonts don't become part of the closure
(with "guix gc --references"). As such, maybe the source files that
use the fonts are actually unused. I propose to give installing the
examples that use the fonts a try, or alternatively explicitly choose
to not install the (font-using) examples.
---
I changed the version of zynaddsubfx from (package-version mruby-zest)
to "3.0.6", otherwise the package would break after a mruby-zest update.
I re-added the comment of 'remove-sse-flags-from-generic-target' that
was removed.
I changed #$mruby-zest to a search-input-file equivalent, for the same
reason as with previous patches.
You forgot to mention the home page, so I adjusted the commit message.
You are fixing a file name, not a path, so I adjusted the new phase name.
By removing the 'ntk' input, zynaddsubfx now has one less interface,
so I re-added it, with a comment.
It appeared that doxygen documentation wasn't actually build
(there is no .html in the output, and the configuraiton script
complained about some missing component), so I removed the new doxygen
(native-)input.
bash completions weren't installed in the new version even though they
were in the previous version, so I made some changes to support that.
I adjusted the substitution of libzest.so to substitute all cases,
in case somehow the first dlopen fails.
I compared the diff between old and new source code, there doesn't
appear to be anything 'suspicious' though its just a cursory look
and it would be easy to hide things:
guix shell diffoscope -- diffoscope
/gnu/store/9j09zj472211nrrs5jmyxdsq2lpfd36q-zynaddsubfx-3.0.5.tar.bz2
/gnu/store/xyjiq3nmk372ap4vq7sl7n7f9rc5xshs-zynaddsubfx-3.0.6.tar.bz2
[-- Attachment #1.1.2: 0001-gnu-Add-nanovg.patch --]
[-- Type: text/x-patch, Size: 4583 bytes --]
From 4e64b03242b1f83319abd1d91125644846f6e628 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:52:19 +0200
Subject: [PATCH 1/4] gnu: Add nanovg
* gnu/packages/music.scm (nanovg): New variable.
Modified-by: Maxime Devos <maximedevos@telenet.be>
---
gnu/packages/music.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 66b4beae0c..31e2bd651d 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2989,6 +2989,61 @@ (define-public vmpk
instrument or MIDI file player.")
(license license:gpl3+)))
+(define-public nanovg
+ (let ((commit "b83cf926525e7cea8d2483da2a75852b8c7b6d28")
+ (revision "0"))
+ (package
+ (name "nanovg")
+ (version (git-version "0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/memononen/nanovg")
+ (commit commit)))
+ (sha256
+ (base32
+ "1zp355pw6xnb5mjarz67cxkglv7j1s0qzv705fz1wf0gl0sjhy8f"))
+ (file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove bundling and images for which no permission appears
+ ;; to have been obtained.
+ '(for-each delete-file-recursively
+ '("example/entypo.ttf"
+ "example/Roboto-Bold.ttf"
+ "example/Roboto-Light.ttf"
+ "example/Roboto-Regular.ttf"
+ "example/images")))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ ;; For cross-compilation.
+ #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "AR=" #$(ar-for-target))
+ ;; compile with optimisations
+ (string-append "config=release")
+ ;; allow linking into shared libraries
+ (string-append "CFLAGS=-fPIC")
+ "-C" "build"
+ ;; Examples can't find nanovg.h, so only
+ ;; build the library.
+ "-f" "nanovg.make")
+ #:phases #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "premake4" "gmake")))
+ (replace 'install
+ (lambda _
+ (let ((lib (string-append #$output "/lib")))
+ (install-file "build/libnanovg.a" lib)))))))
+ (native-inputs (list premake4))
+ (home-page "https://github.com/memononen/nanovg")
+ (synopsis "Antialiased 2D vector drawing library")
+ (description
+ "NanoVG is small antialiased vector graphics rendering library for
+OpenGL. It has lean API modeled after HTML5 canvas API.")
+ (license license:zlib))))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
base-commit: 31a56967e2869c916b7a5e8ee570e8e10f0210a5
prerequisite-patch-id: 2712efb97bf33985fd0658e4dd8e936dc08be5fe
prerequisite-patch-id: 9d2409b480a8bff0fef029b4b095922d4957e06f
prerequisite-patch-id: 51a32abca3efec1ba67ead59b8694c5ea3129ad3
prerequisite-patch-id: 9092927761a340c07a99f5f3ed314a6add04cdee
prerequisite-patch-id: d0af09fbd5ee0ef60bdee53b87d729e46c1db2ca
prerequisite-patch-id: 4fee177b2d8c9478c6a7b8ce1ca9072942f39863
prerequisite-patch-id: c2b101598fa5b6f93470ae41d51a983dcb931b04
prerequisite-patch-id: 8fe65a852a4463203ea6b92abb3968bd819475b1
prerequisite-patch-id: 7585c78056095ec991615cbbe877e06f713aada9
prerequisite-patch-id: a9fb1bf1718ad8de6fc26d97a7dc5baf41dc38bd
prerequisite-patch-id: 1e5c9ef57d1df286042f4ae3eb420394c8b3b045
prerequisite-patch-id: 1913f770775c7b13549f6bbe5cb6f8e51990d1a0
prerequisite-patch-id: 75f1d34de3d9281f2645511396373778090c0bdc
prerequisite-patch-id: c8741c63c400a75edd2432c495ec85960e771474
prerequisite-patch-id: ce54131c43d3bf59273a65f226fcb4ab101e891d
prerequisite-patch-id: 841c8386c4ada8bfc4d062e11f04ebb5ec464e69
prerequisite-patch-id: fa36a5bd2e38c521341d2f95ff604605158e35c8
--
2.38.0
[-- Attachment #1.1.3: 0002-gnu-Add-font-entypo.patch --]
[-- Type: text/x-patch, Size: 1962 bytes --]
From 5935d9f1c2c2850dd27cd52a8da65838272938b7 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:54:10 +0200
Subject: [PATCH 2/4] gnu: Add font-entypo
* gnu/packages/music.scm (font-entypo): New variable.
Modified-by: Maxime Devos <maximedevos@telenet.be>
---
gnu/packages/fonts.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 39242f0bec..f88f4cd511 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2817,3 +2817,31 @@ (define-public font-chiron-hei-hk
Kong variant of Adobe’s Source Han Sans. The font aims at providing a modern,
region-agnostic glyph set adopting the “modern” glyph style that is similar to
prevalent typefaces in Traditional Chinese regions.")))
+
+;; TODO: once we <https://github.com/danielbruce/entypo>, build the font
+;; from source.
+(define-public font-entypo
+ (let ((commit "f94e077449daa87321aa0df5643889460ba8291b")
+ (revision "0"))
+ (package
+ (name "font-entypo")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/danielbruce/entypo")
+ (commit commit)))
+ (sha256
+ (base32
+ "0kgy2ia15q93ksh6kbj8p5n44mmmax95w6a5byimbvcqajmvv7m6"))))
+ (build-system font-build-system)
+ (home-page "https://entypo.com")
+ (synopsis "Pictogram font")
+ (description
+ "Entypo is a special-purpose font, consisting solely of pictograms.")
+ ;; According to the README.md, icons are distributed under
+ ;; CC-BY-SA 3.0 and fonts are distributed under SIL OFL.
+ ;; As the icons are part of the font, the exact distinction it a bit
+ ;; unclear, but it appears to be free.
+ (license (list license:cc-by-sa3.0 license:silofl1.1)))))
--
2.38.0
[-- Attachment #1.1.4: 0003-gnu-Add-mruby-zest.patch --]
[-- Type: text/x-patch, Size: 7757 bytes --]
From b090f29ba9452bdd9ed59b725a7f10f3d50d7c78 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sat, 15 Oct 2022 15:56:23 +0200
Subject: [PATCH 3/4] gnu: Add mruby-zest
* gnu/packages/music.scm (mruby-zest): New variable.
Modified-by: Maxime Devos <maximedevos@telenet.be>
---
gnu/packages/music.scm | 120 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 120 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 31e2bd651d..63c66b17d5 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -167,6 +167,7 @@ (define-module (gnu packages music)
#: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 serialization)
#:use-module (gnu packages sphinx)
@@ -3044,6 +3045,125 @@ (define-public nanovg
OpenGL. It has lean API modeled after HTML5 canvas API.")
(license license:zlib))))
+;; TODO: https://github.com/archlinux/svntogit-community/tree/packages/zynaddsubfx/trunk
+(define-public mruby-zest
+ (package
+ (name "mruby-zest")
+ (version "3.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mruby-zest/mruby-zest-build")
+ (commit version)
+ ;; TODO: package mruby gems seperately.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dz4zv1km9805lji2q2qqdd8s8hgfd723dxdzcivbhm612szm1mc"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (use-modules (ice-9 ftw))
+ (delete-file-recursively "mruby")
+ (delete-file-recursively "deps/mruby-regexp-pcre/pcre")
+ (for-each
+ (lambda (x)
+ (unless (or (string-prefix? "mruby-" x)
+ (member x '("pugl" "rtosc" "." "..")))
+ (delete-file-recursively (string-append "deps/" x))))
+ (scandir "deps"))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ "CONFIG_SHELL=bash")
+ #:test-target "rtest" ; The 'test' tests mruby instead of mruby-zest
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'unbundle
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("cd (deps/nanovg|mruby)") "#")
+ (("\\$\\(AR\\) rc deps/libnanovg\\.a") "#")
+ (("cd deps/mruby-file-stat") "#")
+ (("\\./deps/libnanovg\\.a") "-lnanovg"))))
+ (add-after 'unpack 'disable-unused-deps
+ (lambda _
+ (substitute* "build_config.rb"
+ (("conf\\.gem 'deps/mruby-file-stat'")
+ "#"))
+ (substitute* "deps/mruby-dir-glob/mrbgem.rake"
+ (("spec\\.add_dependency 'mruby-file-stat'")
+ "#"))))
+ ;; It is unknown if this is sufficient, because at
+ ;; time of writing, the dependency mesa failed to
+ ;; cross-compile.
+ (add-after 'unpack 'fix-cross-compilation
+ (lambda _
+ (substitute* '("Makefile" "build_config.rb")
+ (("pkg-config\\b") #$(pkg-config-for-target)))))
+ (add-after 'unpack 'hardcode-file-names
+ ;; TODO: fonts do not appear in the references,
+ ;; why is the Ruby code not installed?
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "." "\\.rb$")
+ (("search \\+ \"font/([a-zA-Z-]+\\.ttf)\"(.*)$" _ font-basename)
+ (string-append
+ "\""
+ (search-input-file
+ inputs
+ (string-append "share/fonts/truetype/"
+ font-basename))
+ "\"]"))
+ (("'([a-zA-Z-]+\\.ttf)'" _ font-basename)
+ (string-append
+ "'"
+ (search-input-file
+ inputs
+ (string-append "share/fonts/truetype/"
+ font-basename))
+ "'")))
+ (substitute* "test-libversion.c"
+ (("\"(.*libzest)\\.so\"")
+ (format #f "\"~a/lib/libzest.so\"" #$output)))
+ (substitute* "src/osc-bridge/src/bridge.c"
+ (("./qml/MainWindow.qml")
+ (string-append #$output "/lib/zyn-fusion/qml/MainWindow.qml")))
+ (substitute* "src/mruby-widget-lib/mrblib/script.rb"
+ (("schema/test.json")
+ (string-append #$output "/lib/zyn-fusion/schema/test.json")))))
+ (replace 'install
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((lib (string-append #$output
+ "/lib/zyn-fusion"))
+ (qml (string-append lib "/qml"))
+ (bin (string-append #$output "/bin")))
+ (copy-recursively "src/mruby-zest/qml" qml)
+ (copy-recursively "src/mruby-zest/example" qml)
+ (install-file "src/osc-bridge/schema/test.json"
+ (string-append lib "/schema"))
+ (install-file "libzest.so" lib)
+ ;; zynaddsubfx requires this name.
+ (rename-file "zest" "zyn-fusion")
+ (install-file "zyn-fusion" bin)
+ (install-file "completions/zyn-fusion"
+ (string-append #$output
+ "/share/bash-completion/completions"))))))))
+ (native-inputs (list mruby pkg-config ruby ruby-ruby-prof))
+ (inputs (list font-entypo
+ font-google-roboto
+ libuv
+ libx11
+ mesa
+ nanovg))
+ (home-page "https://github.com/mruby-zest/mruby-zest-build")
+ (synopsis "Widget classes for the mruby-zest framework")
+ (description
+ "This repository contains all of the widgets needed to create the
+@code{zyn-fusion} user interface for ZynAddSubFX.")
+ (license license:lgpl2.1)))
+
(define-public zynaddsubfx
(package
(name "zynaddsubfx")
--
2.38.0
[-- Attachment #1.1.5: 0004-gnu-zynaddsubfx-Update-to-3.0.6.patch --]
[-- Type: text/x-patch, Size: 4878 bytes --]
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(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 63c66b17d5..0f82c85bcb 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -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
[-- Attachment #1.1.6: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-26 12:04 ` Maxime Devos
@ 2022-10-27 13:18 ` Maxim Cournoyer
2022-10-27 15:11 ` Maxime Devos
0 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2022-10-27 13:18 UTC (permalink / raw)
To: Maxime Devos; +Cc: Sughosha, 57984
Hi Maxime,
Impressive work. Are there outstanding things worthy of being fixed in
your opinion, or do you think this version is ready to be merged and we
can iterate improvements on top in time? To my cursory look, I'd think
it looks in a good enough shape, but I thought I'd ask before merging.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-27 13:18 ` Maxim Cournoyer
@ 2022-10-27 15:11 ` Maxime Devos
2023-05-03 23:15 ` Sughosha via Guix-patches via
0 siblings, 1 reply; 15+ messages in thread
From: Maxime Devos @ 2022-10-27 15:11 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: Sughosha, 57984
[-- Attachment #1.1.1: Type: text/plain, Size: 1442 bytes --]
On 27-10-2022 15:18, Maxim Cournoyer wrote:
> Hi Maxime,
>
> Impressive work. Are there outstanding things worthy of being fixed in
> your opinion, or do you think this version is ready to be merged and we
> can iterate improvements on top in time? To my cursory look, I'd think
> it looks in a good enough shape, but I thought I'd ask before merging.
My primary concern is that while it builds, I haven't tested whether
zynaddsubfx still works after my modifications. There are two secondary
concerns:
(*) The bundling. Both zynaddsubfx and the new mruby-zest bundle rtosc.
Having multiple versions of the same library in the same program is
known to potentially cause trouble, see e.g.
<https://issues.guix.gnu.org/47115>.
The other bundling could be considered as 'can iterate improvements on
top over time' I suppose.
(*) The fonts don't appear to be actually used (at least in the current
configuration), so as you appear to prefer no font inputs, that seems
feasible to me:
> On the fonts: I noticed that the fonts don't become part of the closure
> (with "guix gc --references"). As such, maybe the source files that
> use the fonts are actually unused. I propose to give installing the
> examples that use the fonts a try, or alternatively explicitly choose
> to not install the (font-using) examples.
(Alternatively, maybe I messed up the substitutions)
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
2022-10-27 15:11 ` Maxime Devos
@ 2023-05-03 23:15 ` Sughosha via Guix-patches via
0 siblings, 0 replies; 15+ messages in thread
From: Sughosha via Guix-patches via @ 2023-05-03 23:15 UTC (permalink / raw)
To: 57984; +Cc: Maxime Devos, Maxim Cournoyer
I opened a new issue #63254 with the new patches to add mruby-zest,
unbundle nanovg and rtosc and then patch the source files:
https://issues.guix.gnu.org/63254
Sughosha
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-05-03 23:16 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21 17:21 [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Sughosha via Guix-patches via
2022-09-21 17:28 ` [bug#57984] Fix typo in commit message Sughosha via Guix-patches via
2022-09-28 17:21 ` [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 Maxim Cournoyer
2022-09-28 20:30 ` Maxim Cournoyer
2022-10-15 13:37 ` Sughosha via Guix-patches via
2022-10-15 14:13 ` Sughosha via Guix-patches via
2022-10-15 14:14 ` Sughosha via Guix-patches via
2022-10-24 17:02 ` Maxime Devos
2022-10-24 19:03 ` Maxime Devos
2022-10-25 13:36 ` Maxime Devos
2022-09-28 22:06 ` Maxime Devos
2022-10-26 12:04 ` Maxime Devos
2022-10-27 13:18 ` Maxim Cournoyer
2022-10-27 15:11 ` Maxime Devos
2023-05-03 23:15 ` Sughosha via Guix-patches via
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).