Subject: [PATCH 1/2] gnu: muse-sequencer: Update to 3.1.1.
From: Vinicius Monego <[email-masked]>
To: [email-masked]
Cc: Vinicius Monego <[email-masked]>
Date: Sun, 23 Aug 2020 12:15:51 -0300
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/music.scm (muse-sequencer): Update to 3.1.1.
[arguments]: Set CMAKE_BUILD_TYPE to Release. Add stage to set LDFLAGS.
Add stage to wrap executable.
[inputs]: Sort alphabetically.
---
This package is broken in the CI. I had to update the version to fix.

There are still some rough edges, but it builds and is somewhat usable.
 gnu/packages/music.scm | 44 +++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index ae8579cb47..7cc6d7b1ea 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2020 Lars-Dominik Braun <[email-masked]>
 ;;; Copyright © 2020 Giacomo Leidi <[email-masked]>
 ;;; Copyright © 2020 Michael Rohleder <[email-masked]>
+;;; Copyright © 2020 Vinicius Monego <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4127,7 +4128,7 @@ sample library.")
 (define-public muse-sequencer
   (package
     (name "muse-sequencer")
-    (version "3.0.0")
+    (version "3.1.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -4139,7 +4140,7 @@ sample library.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1nninz8qyqlxxjdnrm79y3gr3056pga9l2fsqh674jd3cjvafya3"))))
+                "1rasp2v1ds2aw296lbf27rzw0l9fjl0cvbvw85d5ycvh6wkm301p"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ; there is no test target
@@ -4147,27 +4148,44 @@ sample library.")
        (list "-DENABLE_LV2_SUPPLIED=OFF"
              "-DENABLE_RTAUDIO=OFF"    ; FIXME: not packaged
              "-DENABLE_INSTPATCH=OFF"  ; FIXME: not packaged
-             "-DENABLE_VST_NATIVE=OFF")
+             "-DENABLE_VST_NATIVE=OFF"
+             "-DCMAKE_BUILD_TYPE=Release")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'chdir
-           (lambda _ (chdir "muse3"))))))
+           (lambda _ (chdir "muse3")))
+         ;; Fix validate-runpath stage.
+         (add-before 'configure 'set-LDFLAGS
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (setenv "LDFLAGS"
+                     (string-append
+                      "-Wl,-rpath=" (assoc-ref outputs "out")
+                      "/lib/muse-3.1/modules"))))
+         ;; Ensure that icons are found at runtime.
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/muse3")
+                 `("QT_PLUGIN_PATH" prefix
+                   ,(list (string-append (assoc-ref inputs "qtsvg")
+                                         "/lib/qt5/plugins/"))))))))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("lash" ,lash)
-       ("jack" ,jack-1)
-       ("liblo" ,liblo)
        ("dssi" ,dssi)
+       ("fluidsynth" ,fluidsynth)
+       ("jack" ,jack-1)
        ("ladspa" ,ladspa)
-       ("lv2" ,lv2)
-       ("lilv" ,lilv)
-       ("sord" ,sord)
-       ("libsndfile" ,libsndfile)
+       ("lash" ,lash)
+       ("liblo" ,liblo)
        ("libsamplerate" ,libsamplerate)
-       ("fluidsynth" ,fluidsynth)
+       ("libsndfile" ,libsndfile)
+       ("lilv" ,lilv)
+       ("lv2" ,lv2)
        ("pcre" ,pcre)
+       ("pulseaudio" ,pulseaudio)
        ("qtbase" ,qtbase)
-       ("qtsvg" ,qtsvg)))
+       ("qtsvg" ,qtsvg)
+       ("sord" ,sord)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("qttools" ,qttools)))
-- 
2.20.1