From patchwork Mon Jun 26 16:56:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 <873216071@qq.com> X-Patchwork-Id: 51360 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3627E27BBE2; Mon, 26 Jun 2023 17:58:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT, MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2BCBC27BBE9 for ; Mon, 26 Jun 2023 17:58:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDpXS-0000t1-3n; Mon, 26 Jun 2023 12:58:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDpXO-0000sa-Tv for guix-patches@gnu.org; Mon, 26 Jun 2023 12:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDpXO-0004Lt-IO for guix-patches@gnu.org; Mon, 26 Jun 2023 12:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qDpXO-0005t5-2N for guix-patches@gnu.org; Mon, 26 Jun 2023 12:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64304] [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp. Resent-From: Z572 <873216071@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 26 Jun 2023 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64304 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64304@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168779862322565 (code B ref -1); Mon, 26 Jun 2023 16:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jun 2023 16:57:03 +0000 Received: from localhost ([127.0.0.1]:46936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDpWQ-0005ri-AL for submit@debbugs.gnu.org; Mon, 26 Jun 2023 12:57:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:52366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <873216071@qq.com>) id 1qDpWL-0005rQ-Jr for submit@debbugs.gnu.org; Mon, 26 Jun 2023 12:57:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1qDpWG-0000S5-U6 for guix-patches@gnu.org; Mon, 26 Jun 2023 12:56:53 -0400 Received: from out203-205-251-82.mail.qq.com ([203.205.251.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <873216071@qq.com>) id 1qDpW8-00040l-MD for guix-patches@gnu.org; Mon, 26 Jun 2023 12:56:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1687798585; bh=a+cSkrnxhvKd7wjCfM+ChH2VB/vVIP4G3x2OIzc+aGE=; h=From:To:Subject:Date; b=iAUguxzbqs4Q4J0cmO+4E452AkqkLeKAN6itKFgyal3pbUIaQnLT/lHtGRPgNxJlN 83MszTUIb7wPtYTOnmUsJl37EaOZF6OHQdolS7D5lzPEJGkSNr7alxd6pcrPPgGXLj qfYXlYDaTcejeo7aTwmdsBXCNGnQlruu7vC82/KI= Received: from localhost.localdomain ([111.0.51.105]) by newxmesmtplogicsvrszb6-0.qq.com (NewEsmtp) with SMTP id E1736C5C; Tue, 27 Jun 2023 00:56:23 +0800 X-QQ-mid: xmsmtpt1687798583t6oi15y00 Message-ID: X-QQ-XMAILINFO: MB5+LsFw85NoI0qMlJkik8H9oqnS8qrgWGRy8yN3T6yaOz5cXIObl5NBDTFUhI gP02XF6y55dwpC9O8mR9ThL/gA4yTuFEhOI5EIy6lZWjiuRcu28yFuhn5zIA4WwiJPmOrc3lP9UF O0+JjipCH4e9ThfM3N26RDMyJ9+DUcxMZu2foxyZqh5kmItstT/P5led3b2U+GC0HfwyqvU6ZHMv zB4taJc3jdS5WSbpr0RUIR2ViboMIp8/8k2gZ2qVWRErXObEaqH/SKOb0u3E2+qA0/8mitvjJjCd b9C1WLnyna80epCCpckihqFTT6t8ANRGF6x5/8ZecBa4W/L1J9XmmET4wgBg7vMJ2IIoNAsj1UUR qVXqi0AaQj9wU1Rf3no7dm4CDaIqaqt86N1MsoiReLbsRyQOwoCjmMMkJ7nheK7laCQovNhD/ARi I61HLHORPUJuKI/WvBhQp0H09k0aJ51vmz7XsMPPTVL4WsVancRny27UgH7zH4J4H9SFzlPk2NTG AIFwlQZCaGIkf/lte8uMuRaq0N49tqdlA8I0u3XcpC8gq5Ie3JWaDfFAw3zEFay4AHQolL/NqpHi tb4bd5J8PYxmlh2IL2Ccfe5/dzaRzAn/yLnCLKIznPAz7s4NUATgKPaLpoeuprfc3IzfmkyVINaE fVUEfltggZyNqW3zXVNG4YgwNYJwwOfPRlU6KAWFr/Nc5sBA6N6arNzKXeiLBfG8JaNRj/Mo31SR HtomBM0k0IMTbDKcsuk8gFLI1L7WFjPEgihadiKpDkB48no7GDGYpBNkkRob/BDhYuKbPpNV96Bx N2rNwW0JyOrLAdM9tzCaSHTuSLzryGMg5uY+Dl60huyqzCwj4N+IAVRTTFkuNDEnUowAT+msZqfs 5lLF5BZAMrX8ccNrnmTQzFtXWV5mxVcXrVSxGldnHo0ksZv4ONq7Q= X-QQ-XMRINFO: NCQ7ozi4LvUoVqkz+pruLjDQ6q+SApi/jw== Date: Tue, 27 Jun 2023 00:56:23 +0800 X-OQ-MSGID: <56da54fc1ae031d59184c3d47d908c850ddd8445.1687798576.git.873216071@qq.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Received-SPF: pass client-ip=203.205.251.82; envelope-from=873216071@qq.com; helo=out203-205-251-82.mail.qq.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Z572 <873216071@qq.com> X-ACL-Warn: , Z572 via Guix-patches X-Patchwork-Original-From: Z572 via Guix-patches via From: Z572 <873216071@qq.com> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 base-commit: 269cfe341f242c2b5f37774cb9b1e17d9aa68e2c 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 ;;; Copyright © 2023 Sharlatan Hellseher ;;; Copyright © 2023 Yovan Naumovski +;;; 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 +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 +--- + 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)