[bug#61865] gnu: libxtst: fix riscv64 cross-compile.
Commit Message
* 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
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
>
>
>
>
@@ -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