aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <873216071@qq.com>2023-06-04 14:55:11 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-06-04 14:56:09 +0300
commit188da31fe5305a960bea88e1452ceeccfb53e1de (patch)
tree574d2975541931f43f5fe9e8757a4290b8245836
parent0ee6c9ea01d1f69b3b7b2c2d79d62b68ffd268ed (diff)
downloadguix-188da31fe5305a960bea88e1452ceeccfb53e1de.tar.gz
guix-188da31fe5305a960bea88e1452ceeccfb53e1de.zip
gnu: mtdev: Fix cross-compiling to riscv64.
* gnu/packages/xdisorg.scm (mtdev)[arguments]: When cross-compiling to riscv64 add a phase to update config.{guess,sub}. [native-inputs]: When cross-compiling to riscv64 add config.
-rw-r--r--gnu/packages/xdisorg.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 462ac082f5..b8671d1cf6 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -41,7 +41,7 @@
;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2020 James Smith <jsubuntuxp@disroot.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
-;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2020, 2021, 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
@@ -768,7 +768,28 @@ and Matrox.")
(base32
"1q700h9dqcm3zl6c3gj0qxxjcx6ibw2c51wjijydhwdcm26v5mqm"))))
(build-system gnu-build-system)
- (arguments '(#:configure-flags '("--disable-static")))
+ (arguments
+ `(#:configure-flags
+ '("--disable-static")
+ ,@(if (and (target-riscv64?)
+ (%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-aux"))
+ '("config.guess" "config.sub"))))))
+ '())))
+ (native-inputs
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list config)
+ '()))
(home-page "https://bitmath.org/code/mtdev/")
(synopsis "Multitouch protocol translation library")
(description "Mtdev is a stand-alone library which transforms all