gnu: zynaddsubfx: Update to 2.5.2.
[jackhill/guix/guix.git] / gnu / packages / music.scm
index c693f0f..a217a89 100644 (file)
@@ -346,6 +346,14 @@ Guile.")
                                                        (%current-system))))
                      '("--disable-sse")
                      '()))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before
+            'configure 'set-flags
+            (lambda _
+              ;; Compile with C++11, required by libsigc++.
+              (setenv "CXXFLAGS" "-std=c++11")
+              #t)))
          #:python ,python-2))
       (inputs
        `(("jack" ,jack-1)
@@ -766,7 +774,7 @@ browser.")
 (define-public zynaddsubfx
   (package
     (name "zynaddsubfx")
-    (version "2.5.1")
+    (version "2.5.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -774,8 +782,21 @@ browser.")
                     version "/zynaddsubfx-" version ".tar.gz"))
               (sha256
                (base32
-                "01c4v5lbzard6y00cjq3b6a50cafqwfwibzng9gdsajczhnbkqz2"))))
+                "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m"))))
     (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
      `(("liblo" ,liblo)
        ("ntk" ,ntk)