diff mbox series

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

Message ID tencent_D9FD5F8E4E40795F8974EDC666486A6E9606@qq.com
State New
Headers show
Series fix some packages cross-compile | expand

Commit Message

Z572 Feb. 28, 2023, 8:33 a.m. UTC
* 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(-)

Comments

Efraim Flashner June 4, 2023, 12:19 p.m. UTC | #1
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
> 
> 
> 
>
diff mbox series

Patch

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.")