summary refs log tree commit diff
path: root/gnu/packages/xorg.scm
diff options
context:
space:
mode:
authorZheng Junjie <873216071@qq.com>2023-03-30 22:46:03 +0800
committerEfraim Flashner <efraim@flashner.co.il>2023-06-04 14:44:55 +0300
commit81515a4029bd95f5c1d0964f65789fe8e5892142 (patch)
tree025dae54e1d8fc83317ddc320ec8c2e3ff46398d /gnu/packages/xorg.scm
parentd84517805080ec51bab1921ac34c28adf3d88596 (diff)
downloadguix-81515a4029bd95f5c1d0964f65789fe8e5892142.tar.gz
gnu: libxtst: Fix cross-compiling to riscv64.
* gnu/packages/xorg.scm (libxtst)[arguments]: When cross-compiling to
riscv64, add phase to update config.{guess,sub}.
[native-inputs]: When cross-compiling to riscv64, add config.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/xorg.scm')
-rw-r--r--gnu/packages/xorg.scm24
1 files changed, 21 insertions, 3 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index d6c388739f..7632dac1c4 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4493,13 +4494,30 @@ cannot be adequately worked around on the client side of the wire.")
             "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (and (target-riscv64?)
+                  (%current-target-system))
+             `(#:phases
+               (modify-phases %standard-phases
+                 (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"))))))
+             '())))
     (propagated-inputs
      (list libxi xorgproto))
     (inputs
-      (list libx11))
+     (list libx11))
     (native-inputs
-      (list pkg-config))
+     (append (if (and (target-riscv64?)
+                      (%current-target-system))
+               (list config)
+               '())
+             (list pkg-config)))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg library for Xtest and Record extensions")
     (description