diff mbox series

[bug#61865] gnu: libxtst: fix riscv64 cross-compile.

Message ID tencent_1FB884A0367A1335153AABE7EF4147A17C05@qq.com
State New
Headers show
Series [bug#61865] gnu: libxtst: fix riscv64 cross-compile. | expand

Commit Message

Z572 March 30, 2023, 2:46 p.m. UTC
* gnu/packages/xorg.scm(libxtst): fix riscv64 cross-compile
[arguments]: when target is riscv64, add phase to update config.{guess,sub}
[native-inputs]: when target is riscv64, add config.
---
 gnu/packages/xorg.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

Comments

Efraim Flashner June 4, 2023, 12:19 p.m. UTC | #1
This patch I changed (target-riscv64?) to
(and (target-riscv64?)
     (%current-target-system))

This way it only occurs when cross compiling.

On Thu, Mar 30, 2023 at 10:46:03PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/xorg.scm(libxtst): fix riscv64 cross-compile
> [arguments]: when target is riscv64, add phase to update config.{guess,sub}
> [native-inputs]: when target is riscv64, add config.
> ---
>  gnu/packages/xorg.scm | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
> index 55c9b53e1d..7d5e7c6f9c 100644
> --- a/gnu/packages/xorg.scm
> +++ b/gnu/packages/xorg.scm
> @@ -4509,13 +4509,28 @@ (define-public libxtst
>              "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
>      (build-system gnu-build-system)
>      (arguments
> -     '(#:configure-flags '("--disable-static")))
> +     `(#:configure-flags '("--disable-static")
> +       ,@(if (target-riscv64?)
> +             `(#: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))
> +     `(,@(if (target-riscv64?)
> +             (list config)
> +             '())
> +       ,pkg-config))
>      (home-page "https://www.x.org/wiki/")
>      (synopsis "Xorg library for Xtest and Record extensions")
>      (description
> -- 
> 2.39.2
> 
> 
> 
>
diff mbox series

Patch

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 55c9b53e1d..7d5e7c6f9c 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4509,13 +4509,28 @@  (define-public libxtst
             "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (target-riscv64?)
+             `(#: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))
+     `(,@(if (target-riscv64?)
+             (list config)
+             '())
+       ,pkg-config))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg library for Xtest and Record extensions")
     (description