summary refs log tree commit diff
path: root/gnu/packages/xorg.scm
diff options
context:
space:
mode:
authorZheng Junjie <873216071@qq.com>2023-02-28 16:33:33 +0800
committerEfraim Flashner <efraim@flashner.co.il>2023-06-04 14:46:56 +0300
commit0ee6c9ea01d1f69b3b7b2c2d79d62b68ffd268ed (patch)
treef26f972a66f64e6bff6fd04526cc586d440ccc7d /gnu/packages/xorg.scm
parent81515a4029bd95f5c1d0964f65789fe8e5892142 (diff)
downloadguix-0ee6c9ea01d1f69b3b7b2c2d79d62b68ffd268ed.tar.gz
gnu: xcb-util-wm: Fix cross-compiling to riscv64.
* gnu/packages/xorg.scm (xcb-util-wm)[arguments]: Add
update-config-scripts phase when cross-compiling to riscv64.
[native-inputs]: Add config when cross-compiling to riscv64.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/xorg.scm')
-rw-r--r--gnu/packages/xorg.scm22
1 files changed, 20 insertions, 2 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 7632dac1c4..e1a7cf96f9 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5638,11 +5638,29 @@ The XCB util-renderutil module provides the following library:
                "0gra7hfyxajic4mjd63cpqvd20si53j1q3rbdlkqkahfciwq3gr8"))))
     (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-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"))))))
+           '())))
     (propagated-inputs
      (list libxcb))
     (native-inputs
-     (list m4 pkg-config))
+     (append (if (and (target-riscv64?)
+                      (%current-target-system))
+               (list config)
+               '())
+             (list m4 pkg-config)))
     (home-page "https://cgit.freedesktop.org/xcb/util-wm/")
     (synopsis "Client and window-manager helpers for ICCCM and EWMH")
     (description