unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#64304] [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp.
@ 2023-06-26 16:56 Z572 via Guix-patches via
  2024-03-19 11:21 ` bug#64304: " 宋文武 via Guix-patches via
  0 siblings, 1 reply; 2+ messages in thread
From: Z572 via Guix-patches via @ 2023-06-26 16:56 UTC (permalink / raw)
  To: 64304

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 5490 bytes --]

* gnu/packages/music.scm(a2jmidid)[source]: add patch.
[arguments]: Use gexps.
* gnu/packages/patches/a2jmidid-enable-riscv-build.patch: new file.
* gnu/local.mk: register it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/music.scm                        | 27 ++++++------
 .../patches/a2jmidid-enable-riscv-build.patch | 44 +++++++++++++++++++
 3 files changed, 59 insertions(+), 13 deletions(-)
 create mode 100644 gnu/packages/patches/a2jmidid-enable-riscv-build.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4566f1b4a4..6833df10db 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -872,6 +872,7 @@ MODULES_NOT_COMPILED +=				\
 
 patchdir = $(guilemoduledir)/%D%/packages/patches
 dist_patch_DATA =						\
+  %D%/packages/patches/a2jmidid-enable-riscv-build.patch	\
   %D%/packages/patches/abcl-fix-build-xml.patch	\
   %D%/packages/patches/ableton-link-system-libraries-debian.patch	\
   %D%/packages/patches/abiword-explictly-cast-bools.patch	\
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5069e6f0df..9017966f2f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2023 Antero Mejr <antero@mailbox.org>
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7014,20 +7015,20 @@ (define-public a2jmidid
                     (commit version)))
               (sha256
                (base32 "1x6rcl3f4nklnx4p5jln9a7fpj9y7agjxs9rw7cccmwnski7pnsq"))
-              (file-name (git-file-name name version))))
+              (file-name (git-file-name name version))
+              ;; https://github.com/jackaudio/a2jmidid/pull/18
+              (patches (search-patches "a2jmidid-enable-riscv-build.patch"))))
     (arguments
-     `(#:tests? #f      ; No tests.
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-programs
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin/")))
-               (substitute* (string-append bin "a2j")
-                 (("a2j_control") (string-append bin "a2j_control")))
-               (wrap-program (string-append bin "a2j_control")
-                `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))
-               #t))))))
+     (list #:tests? #f      ; No tests.
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'wrap-programs
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let ((bin (string-append #$output "/bin/")))
+                     (substitute* (string-append bin "a2j")
+                       (("a2j_control") (string-append bin "a2j_control")))
+                     (wrap-program (string-append bin "a2j_control")
+                       `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))))))))
     (build-system meson-build-system)
     (inputs
      (list alsa-lib
diff --git a/gnu/packages/patches/a2jmidid-enable-riscv-build.patch b/gnu/packages/patches/a2jmidid-enable-riscv-build.patch
new file mode 100644
index 0000000000..2b9e2ed1c5
--- /dev/null
+++ b/gnu/packages/patches/a2jmidid-enable-riscv-build.patch
@@ -0,0 +1,44 @@
+From 2c3fbef6854743416d95d85b1565dde51668488c Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
+Date: Fri, 1 Oct 2021 16:15:29 +0200
+Subject: [PATCH] sigsegv: enable RISC-V build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Avoid build error
+
+../sigsegv.c:104:39: error: ‘mcontext_t’ has no member named ‘gregs’;
+did you mean ‘__gregs’?
+  104 |                 ucontext->uc_mcontext.gregs[i]
+      |                                       ^~~~~
+
+Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
+---
+ sigsegv.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sigsegv.c b/sigsegv.c
+index fb4456e..6930185 100644
+--- a/sigsegv.c
++++ b/sigsegv.c
+@@ -91,7 +91,9 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+     a2j_error("info.si_errno = %d", info->si_errno);
+     a2j_error("info.si_code  = %d (%s)", info->si_code, si_codes[info->si_code]);
+     a2j_error("info.si_addr  = %p", info->si_addr);
+-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__)
++#if !defined(__alpha__) && !defined(__ia64__) && \
++    !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && \
++    !defined(__sh__) && !defined(__aarch64__) && !defined(__riscv)
+     for(i = 0; i < NGREG; i++)
+         a2j_error("reg[%02d]       = 0x" REGFORMAT, i,
+ #if defined(__powerpc__) && !defined(__powerpc64__)
+@@ -108,7 +110,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+                 ucontext->uc_mcontext.gregs[i]
+ #endif
+                 );
+-#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 */
++#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64, riscv */
+ 
+ #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
+ # if defined(SIGSEGV_STACK_IA64)

base-commit: 269cfe341f242c2b5f37774cb9b1e17d9aa68e2c
-- 
2.40.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#64304: [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp.
  2023-06-26 16:56 [bug#64304] [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp Z572 via Guix-patches via
@ 2024-03-19 11:21 ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 2+ messages in thread
From: 宋文武 via Guix-patches via @ 2024-03-19 11:21 UTC (permalink / raw)
  To: Z572; +Cc: 64304-done

Z572 <873216071@qq.com> writes:


> [arguments]: Use gexps.

Pushed as commit a66a5d55c5.

> * gnu/packages/music.scm(a2jmidid)[source]: add patch.
> * gnu/packages/patches/a2jmidid-enable-riscv-build.patch: new file.
> * gnu/local.mk: register it.

As the patch is trivial, I replace it with 'snippet' as in commit
8dbc9b4658.

Thank you!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-19 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 16:56 [bug#64304] [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp Z572 via Guix-patches via
2024-03-19 11:21 ` bug#64304: " 宋文武 via Guix-patches via

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).