unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Sughosha <Sughosha@proton.me>
Cc: "57984@debbugs.gnu.org" <57984@debbugs.gnu.org>
Subject: [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6
Date: Wed, 28 Sep 2022 13:21:25 -0400	[thread overview]
Message-ID: <8735cbwh2i.fsf_-_@gmail.com> (raw)
In-Reply-To: <XobkpXZG01hdDgB90jl_o3V7kRuoVP2o5amHTwKAXY3r7RK086F_W2pkSYln6ZpnZD2Bi-FLqyLn68Ln5Qwx_7ePIPe_uKMMiKXKAFNtFqo=@proton.me> (Sughosha@proton.me's message of "Wed, 21 Sep 2022 17:28:57 +0000")

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




  reply	other threads:[~2022-09-28 17:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Maxim Cournoyer [this message]
2022-09-28 20:30 ` [bug#57984] [PATCH] gnu: Update zynaddsubfx to 3.0.6 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735cbwh2i.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=57984@debbugs.gnu.org \
    --cc=Sughosha@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).