[PATCH] gnu: extempore: Add rtmidi@4 to package inputs.

  • Open
  • quality assurance status badge
Details
One participant
  • Giacomo Leidi
Owner
unassigned
Submitted by
Giacomo Leidi
Severity
normal
G
G
Giacomo Leidi wrote on 31 Dec 2023 17:52
(address . guix-patches@gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20231231165240.18076-1-goodoldpaul@autistici.org
Some extempore code (libs/contrib/rtmidi.xtm specifically) depend on
rtmidi, this patch adds it to package inputs and hardcodes the soname
path.

* gnu/packages/music.scm (extempore)[inputs]: Add rtmidi-4.0;
[arguments]<hardcode-contrib-lib-paths>: new phase.

Change-Id: I16e055a68d48c813fb54dd55f686be102a0850af
---
gnu/packages/music.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 77e952d383..a79fb3e4ee 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1073,6 +1073,16 @@ (define-public extempore
("gl/glcore-directbind" "libGL.so" "mesa")
("gl/glcompat-directbind" "libGL.so" "mesa")))
#t))
+ (add-after 'hardcode-external-lib-paths 'hardcode-contrib-lib-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (use-modules (ice-9 match))
+ (for-each
+ (match-lambda
+ ((file-name lib pkg-name)
+ (substitute* (string-append "libs/contrib/" file-name ".xtm")
+ ((lib) (string-append (assoc-ref inputs pkg-name)
+ "/lib/" lib)))))
+ '(("rtmidi" "librtmidi.so" "rtmidi")))))
(add-after 'unpack 'use-own-llvm
(lambda* (#:key inputs #:allow-other-keys)
(setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm"))
@@ -1125,6 +1135,7 @@ (define-public extempore
("libffi" ,libffi)
("jack" ,jack-1)
("libsndfile" ,libsndfile)
+ ("rtmidi" ,rtmidi-4.0)
("glfw" ,glfw)
("apr" ,apr)
("stb-image"

base-commit: b7466215cd05c2a1cd7c7a18c92af30376d21043
--
2.41.0
G
G
Giacomo Leidi wrote on 31 Dec 2023 18:10
[PATCH v2] gnu: extempore: Add rtmidi@4 to package inputs.
(address . 68181@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20231231171002.23693-1-goodoldpaul@autistici.org
Some extempore code (libs/contrib/rtmidi.xtm specifically) depend on
rtmidi, this patch adds it to package inputs and hardcodes the soname
path.

* gnu/packages/music.scm (extempore)[inputs]: Add rtmidi-4.0;
[arguments]<hardcode-contrib-lib-paths>: new phase.

Change-Id: I16e055a68d48c813fb54dd55f686be102a0850af
---
gnu/packages/music.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 77e952d383..ece2c71385 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1073,6 +1073,12 @@ (define-public extempore
("gl/glcore-directbind" "libGL.so" "mesa")
("gl/glcompat-directbind" "libGL.so" "mesa")))
#t))
+ (add-after 'hardcode-external-lib-paths 'hardcode-contrib-lib-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "libs/contrib/rtmidi.xtm"
+ (("librtmidic.so")
+ (string-append (assoc-ref inputs "rtmidi")
+ "/lib/librtmidi.so")))))
(add-after 'unpack 'use-own-llvm
(lambda* (#:key inputs #:allow-other-keys)
(setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm"))
@@ -1125,6 +1131,7 @@ (define-public extempore
("libffi" ,libffi)
("jack" ,jack-1)
("libsndfile" ,libsndfile)
+ ("rtmidi" ,rtmidi-4.0)
("glfw" ,glfw)
("apr" ,apr)
("stb-image"

base-commit: b7466215cd05c2a1cd7c7a18c92af30376d21043
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 68181@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68181
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch