aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2023-12-29 20:08:29 +0800
committerMathieu Othacehe <othacehe@gnu.org>2023-12-29 19:48:16 +0100
commit0f2164c577ef2329a95e1fce1c33947f4c6ae89c (patch)
tree10e3f491ad436af9768455ac62b19a3fa01e5cf3
parent2c371d2cd9a30bf88fe9aae53913526876b01bcc (diff)
downloadguix-0f2164c577ef2329a95e1fce1c33947f4c6ae89c.tar.gz
guix-0f2164c577ef2329a95e1fce1c33947f4c6ae89c.zip
gnu: libid3tag: Fix cross-compiling.
* gnu/packages/mp3.scm (libid3tag) [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. Change-Id: I715e20b7d0aeabe7eba76185b542d9d184167448 Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
-rw-r--r--gnu/packages/mp3.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 7ede16f4bb..3010e01432 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -161,7 +162,25 @@ This package contains the library.")
Version: ~a~@
Libs: -L${libdir} -lid3tag -lz~@
Cflags: -I${includedir}~%"
- out ,version)))))))))
+ out ,version))))))
+ ,@(if (and (%current-target-system)
+ (or (target-riscv64?)
+ (target-aarch64?)))
+ `((add-after 'unpack 'update-config
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (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 (%current-target-system)
+ (or (target-riscv64?)
+ (target-aarch64?)))
+ (list config)
+ '()))
(inputs (list zlib))
(synopsis "Library for reading ID3 tags")
(description