unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68084] [PATCH] gnu: xcb-util-render-util: Fix cross-compiling to riscv64-linux.
@ 2023-12-28 14:22 Zheng Junjie
  2023-12-28 14:26 ` [bug#68084] [PATCH v2] gnu: xcb-util-renderutil: " Zheng Junjie
  0 siblings, 1 reply; 3+ messages in thread
From: Zheng Junjie @ 2023-12-28 14:22 UTC (permalink / raw)
  To: 68084

* gnu/packages/xorg.scm (xcb-util-render-util)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config-scripts phase.

Change-Id: I906a2b7b7691ae53592cfa35ba64fc7e7d735664
---
 gnu/packages/xorg.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 382075237a..4f85a5de8b 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5675,11 +5675,29 @@ (define-public xcb-util-renderutil
                "0nza1csdvvxbmk8vgv8vpmq7q8h05xrw3cfx9lwxd1hjzd47xsf6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (and (%current-target-system)
+                  (target-riscv64?))
+             `(#: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 pkg-config))
+     (append (if (and (%current-target-system)
+                      (target-riscv64?))
+                 (list config)
+                 '())
+             (list pkg-config)))
     (home-page "https://cgit.freedesktop.org/xcb/util-renderutil/")
     (synopsis "Convenience functions for the Render extension")
     (description

base-commit: bc509aba838780502b83f7fc3d2aee72903656f2
prerequisite-patch-id: dfd1784933361e11899b06d065adaa69c6a41c85
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#68084] [PATCH v2] gnu: xcb-util-renderutil: Fix cross-compiling to riscv64-linux.
  2023-12-28 14:22 [bug#68084] [PATCH] gnu: xcb-util-render-util: Fix cross-compiling to riscv64-linux Zheng Junjie
@ 2023-12-28 14:26 ` Zheng Junjie
  2023-12-29 17:08   ` bug#68084: " Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: Zheng Junjie @ 2023-12-28 14:26 UTC (permalink / raw)
  To: 68084

* gnu/packages/xorg.scm (xcb-util-renderutil)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config-scripts phase.

Change-Id: I906a2b7b7691ae53592cfa35ba64fc7e7d735664
---
 gnu/packages/xorg.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 382075237a..4f85a5de8b 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5675,11 +5675,29 @@ (define-public xcb-util-renderutil
                "0nza1csdvvxbmk8vgv8vpmq7q8h05xrw3cfx9lwxd1hjzd47xsf6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (and (%current-target-system)
+                  (target-riscv64?))
+             `(#: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 pkg-config))
+     (append (if (and (%current-target-system)
+                      (target-riscv64?))
+                 (list config)
+                 '())
+             (list pkg-config)))
     (home-page "https://cgit.freedesktop.org/xcb/util-renderutil/")
     (synopsis "Convenience functions for the Render extension")
     (description

base-commit: bc509aba838780502b83f7fc3d2aee72903656f2
prerequisite-patch-id: dfd1784933361e11899b06d065adaa69c6a41c85
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#68084: [PATCH v2] gnu: xcb-util-renderutil: Fix cross-compiling to riscv64-linux.
  2023-12-28 14:26 ` [bug#68084] [PATCH v2] gnu: xcb-util-renderutil: " Zheng Junjie
@ 2023-12-29 17:08   ` Mathieu Othacehe
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Othacehe @ 2023-12-29 17:08 UTC (permalink / raw)
  To: Zheng Junjie; +Cc: 68084-done


> * gnu/packages/xorg.scm (xcb-util-renderutil)
> [native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
> [arguments]: When target riscv64-linux-gnu, add update-config-scripts phase.

Applied, thanks,

Mathieu




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-29 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-28 14:22 [bug#68084] [PATCH] gnu: xcb-util-render-util: Fix cross-compiling to riscv64-linux Zheng Junjie
2023-12-28 14:26 ` [bug#68084] [PATCH v2] gnu: xcb-util-renderutil: " Zheng Junjie
2023-12-29 17:08   ` bug#68084: " Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).