Subject: Re: [bug#61865] [PATCH 2/8] gnu: libxv: fix riscv64 cross-compile.

From: Efraim Flashner <[email-masked]>
Date: Sun, 4 Jun 2023 15:19:52 +0300

This patch is no longer necessary after updating libxv to a newer
version.

On Tue, Feb 28, 2023 at 04:33:34PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/xorg.scm(libxv): 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 | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
> index 32be732eef..2b6f9fa369 100644
> --- a/gnu/packages/xorg.scm
> +++ b/gnu/packages/xorg.scm
> @@ -4696,13 +4696,29 @@ (define-public libxv
>              "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j"))))
>      (build-system gnu-build-system)
>      (arguments
> -     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
> +     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")
> +       ,@(if (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 xorgproto))
>      (inputs
>        (list libxext libx11))
>      (native-inputs
> -      (list pkg-config))
> +     (append (if (target-riscv64?)
> +                 (list config)
> +                 '())
> +             (list pkg-config)))
>      (home-page "https://www.x.org/wiki/")
>      (synopsis "Xorg XVideo Extension library")
>      (description "Library for the X Video Extension to the X11 protocol.")
> -- 
> 2.39.1
> 
> 
> 
> 

-- 
Efraim Flashner   <[email-masked]>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted