[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/11: gnu: cdparanoia: Fix cross-compiling.
From: |
guix-commits |
Subject: |
07/11: gnu: cdparanoia: Fix cross-compiling. |
Date: |
Thu, 28 Dec 2023 04:36:48 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit eeb29e167be270f4febf2e1ea015e2ff15fb6e2f
Author: Zheng Junjie <zhengjunjie@iscas.ac.cn>
AuthorDate: Thu Dec 28 10:54:56 2023 +0800
gnu: cdparanoia: Fix cross-compiling.
* gnu/packages/cdrom.scm (cdparanoia)
[native-inputs]: when cross compiling to {riscv,aarch}64-linux-gnu, add
config.
[arguments]: when target {riscv,aarch}64-linux-gnu, add
update-config-scripts phase.
<#:configure-flags>: when cross-compiling, use `(assoc-ref %outputs "out")'.
Change-Id: I442c668c3d52c241f0d405f51ea8d995bfefd3fd
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
gnu/packages/cdrom.scm | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index aaa2e50293..d473ab41ed 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -233,10 +234,35 @@ files.")
`(#:tests? #f ; there is no check target
#:parallel-build? #f ;randomly fails to link
#:configure-flags ; Add $libdir to the RUNPATH of all the executables.
- (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+ (list (string-append "LDFLAGS=-Wl,-rpath="
+ ,(if (%current-target-system)
+ '(assoc-ref %outputs "out")
+ '%output)
+ "/lib"))
;; Building in parallel is flaky: “ld: […]/cachetest.c:393: undefined
;; reference to `paranoia_free'”.
- #:parallel-build? #f))
+ #:parallel-build? #f
+ ,@(if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '())))
+ (native-inputs
+ (if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ (list config)
+ '()))
(home-page "https://www.xiph.org/paranoia/")
(synopsis "Audio CD reading utility")
(description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
- branch master updated (931d893c55 -> bc509aba83), guix-commits, 2023/12/28
- 03/11: gnu: Add rust-compiletest-rs-0.10., guix-commits, 2023/12/28
- 05/11: gnu: Add rust-rpds-1., guix-commits, 2023/12/28
- 07/11: gnu: cdparanoia: Fix cross-compiling.,
guix-commits <=
- 11/11: gnu: Add python-ast-decompiler., guix-commits, 2023/12/28
- 09/11: gnu: Add python-pytest-cookies., guix-commits, 2023/12/28
- 01/11: gnu: Add rust-unsize-1., guix-commits, 2023/12/28
- 02/11: gnu: Add rust-triomphe-0.1., guix-commits, 2023/12/28
- 04/11: gnu: Add rust-archery-1., guix-commits, 2023/12/28
- 06/11: gnu: Add python-rpds-py., guix-commits, 2023/12/28
- 08/11: gnu: sssd: Update to 2.9.3., guix-commits, 2023/12/28
- 10/11: gnu: python-flake8-isort: Update to 6.1.0., guix-commits, 2023/12/28