gnu: rtaudio: Fix include path.
authorVinicius Monego <monego@posteo.net>
Tue, 6 Jul 2021 18:36:24 +0000 (18:36 +0000)
committerLeo Famulari <leo@famulari.name>
Tue, 6 Jul 2021 23:13:13 +0000 (19:13 -0400)
* gnu/packages/audio.scm (rtaudio)[arguments]: Add phase 'fix-inc-path to move
the header to where pkg-config expects it.
* gnu/packages/music.scm (muse-sequencer)[arguments]{#:phases}: Remove
'fix-include. Don't return #t.

Signed-off-by: Leo Famulari <leo@famulari.name>
gnu/packages/audio.scm
gnu/packages/music.scm

index 7d7fb2b..3939d4b 100644 (file)
@@ -32,7 +32,7 @@
 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Jonathan Frederickson <jonathan@terracrypt.net>
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -2345,6 +2345,18 @@ implementation of the Open Sound Control (@dfn{OSC}) protocol.")
        (sha256
         (base32 "156c2dgh6jrsyfn1y89nslvaxm4yifmxridsb708yvkaym02w2l8"))))
     (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; The header that pkg-config expects is include/rtaudio/RtAudio.h,
+         ;; but this package installs it as include/RtAudio.h by default.
+         (add-after 'install 'fix-inc-path
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (inc (string-append out "/include")))
+               (mkdir-p (string-append inc "/rtaudio"))
+               (rename-file (string-append inc "/RtAudio.h")
+                            (string-append inc "/rtaudio/RtAudio.h"))))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
index 5100ec8..28661c5 100644 (file)
@@ -4841,12 +4841,7 @@ sample library.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'chdir
-           (lambda _ (chdir "src") #t))
-         (add-after 'chdir 'fix-include
-           (lambda _
-             (substitute* "muse/driver/rtaudio.h"
-               (("rtaudio/RtAudio.h") "RtAudio.h"))
-             #t)))))
+           (lambda _ (chdir "src"))))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("dssi" ,dssi)