all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#62432] [PATCH] gnu: libicns: fix riscv64 cross-build.
@ 2023-03-25  4:50 Z572 via Guix-patches via
  2023-04-03 11:04 ` 宋文武 via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Z572 via Guix-patches via @ 2023-03-25  4:50 UTC (permalink / raw)
  To: 62432

* gnu/packages/image.scm (libicns): fix riscv64 cross-build.
[arguments]: when target-riscv64, add phase to update-config-scripts
[native-inputs]: when target-riscv64, add config.
---
 gnu/packages/image.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 0da990e63a..81cdcd778e 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -549,6 +549,22 @@ (define-public libicns
                (base32
                 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
     (build-system gnu-build-system)
+    (arguments (if (target-riscv64?)
+                   (list #:phases
+                         #~(modify-phases %standard-phases
+                             (add-after 'unpack 'update-config-scripts
+                               (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"))))) )
+                   '()))
+    (native-inputs
+     (if (target-riscv64?)
+         (list config)
+         '()))
     (inputs
      (list libpng jasper))
     (home-page "https://icns.sourceforge.io/")
-- 
2.39.2





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

* [bug#62432] [PATCH] gnu: libicns: fix riscv64 cross-build.
  2023-03-25  4:50 [bug#62432] [PATCH] gnu: libicns: fix riscv64 cross-build Z572 via Guix-patches via
@ 2023-04-03 11:04 ` 宋文武 via Guix-patches via
  2023-06-04 12:29   ` bug#62432: " Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-04-03 11:04 UTC (permalink / raw)
  To: Z572; +Cc: 62432

Z572 <873216071@qq.com> writes:

> * gnu/packages/image.scm (libicns): fix riscv64 cross-build.

Hello, this message is already in the commit message title, So I think
there is no need to repeat it here.  Also look in the guix commit log,
I think it should be 'gnu: libicns: Fix cross-compilation for riscv64'.


> +    (arguments (if (target-riscv64?)
> +                   (list #:phases
> +                         #~(modify-phases %standard-phases
> +                             (add-after 'unpack 'update-config-scripts
> +                               (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"))))) )
> +                   '()))
> +    (native-inputs
> +     (if (target-riscv64?)
> +         (list config)
> +         '()))

This updates 'config.guess' and 'config.sub' in a package to fix
cross-compilation for riscv64 seems like a common practice (eg: also in
your patches #62433, #62544).  How about make a procedure for it to
save some typing?  It could be:

```
(define (autotools-config-updated-package p)
  "Return package P with @command{config.guess} and
@command{config.sub} updated by the @code{config} package"
  (package (inherit p)
    ...))
```

Which could go into (guix transformations).




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

* bug#62432: [PATCH] gnu: libicns: fix riscv64 cross-build.
  2023-04-03 11:04 ` 宋文武 via Guix-patches via
@ 2023-06-04 12:29   ` Efraim Flashner
  0 siblings, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2023-06-04 12:29 UTC (permalink / raw)
  To: 宋文武; +Cc: 62432-done, Z572

[-- Attachment #1: Type: text/plain, Size: 2390 bytes --]

On Mon, Apr 03, 2023 at 07:04:18PM +0800, 宋文武 via Guix-patches via wrote:
> Z572 <873216071@qq.com> writes:
> 
> > * gnu/packages/image.scm (libicns): fix riscv64 cross-build.
> 
> Hello, this message is already in the commit message title, So I think
> there is no need to repeat it here.  Also look in the guix commit log,
> I think it should be 'gnu: libicns: Fix cross-compilation for riscv64'.
> 
> 
> > +    (arguments (if (target-riscv64?)
> > +                   (list #:phases
> > +                         #~(modify-phases %standard-phases
> > +                             (add-after 'unpack 'update-config-scripts
> > +                               (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"))))) )
> > +                   '()))
> > +    (native-inputs
> > +     (if (target-riscv64?)
> > +         (list config)
> > +         '()))
> 
> This updates 'config.guess' and 'config.sub' in a package to fix
> cross-compilation for riscv64 seems like a common practice (eg: also in
> your patches #62433, #62544).  How about make a procedure for it to
> save some typing?  It could be:
> 
> ```
> (define (autotools-config-updated-package p)
>   "Return package P with @command{config.guess} and
> @command{config.sub} updated by the @code{config} package"
>   (package (inherit p)
>     ...))
> ```
> 
> Which could go into (guix transformations).

I would certainly like something like this. I suppose it could be made
more general by using find-file to find all occurrences of config.guess
and config.sub and replacing those.

In the meantime I've pushed this patch after replacing (target-riscv64?)
with (and (target-riscv64?) (%current-target-system)).


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-06-04 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25  4:50 [bug#62432] [PATCH] gnu: libicns: fix riscv64 cross-build Z572 via Guix-patches via
2023-04-03 11:04 ` 宋文武 via Guix-patches via
2023-06-04 12:29   ` bug#62432: " Efraim Flashner

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.