all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: mhw@netris.org
Cc: guix-devel@gnu.org
Subject: Re: [PATCHES] Add 'file' to %final-inputs; patch /usr/bin/file
Date: Sat, 30 Aug 2014 22:22:09 +0200	[thread overview]
Message-ID: <8761h9918u.fsf@gnu.org> (raw)
In-Reply-To: <87iollbzkm.fsf_-_@netris.org> (mhw@netris.org's message of "Thu, 21 Aug 2014 12:02:49 -0400")

mhw@netris.org skribis:

> +(define* (patch-usr-bin-file #:key native-inputs inputs #:allow-other-keys)
> +  "Patch occurrences of /usr/bin/file in configure script, if present."
> +  (let ((file "configure")
> +        (new (and=> (assoc-ref (or native-inputs inputs) "file")
> +                    (cut string-append <> "/bin/file"))))
> +    (when (and new (file-exists? file))
> +      (let ((st (stat file)))
> +        (substitute* file
> +          (("/usr/bin/file" old)
> +           (begin
> +             (format (current-error-port)
> +                     "patch-usr-bin-file: ~a: changing `~a' to `~a'~%"
> +                     file old new)
> +             new)))
> +        (set-file-time file st)))
> +    #t))

Having seen this commit:

  commit 6646747c020402fd077a719af99627d9cf3fe54d

      gnu: gawk: Patch /usr/bin/file in extension/configure on MIPS.

      * gnu/packages/gawk.scm (gawk): When building for MIPS, patch /usr/bin/file in
        extension/configure.

I was thinking that perhaps the ‘patch-usr-bin-file’ phase should
operate on all the executable ‘configure’ files found in the source
tree, recursively.  WDYT?

Also, perhaps the procedure that does the actual patching could be moved
to (guix build utils), and then called from ‘patch-usr-bin-file’.

(This change can wait for the next core-updates if this one is going to
be merged real soon.)

Thanks,
Ludo’.

      parent reply	other threads:[~2014-08-30 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 18:58 Making 'file' an implicit native input in core-updates mhw
2014-08-20 19:21 ` Eric Bavier
2014-08-20 21:33 ` Ludovic Courtès
2014-08-21 16:02   ` [PATCHES] Add 'file' to %final-inputs; patch /usr/bin/file mhw
2014-08-22  6:12     ` mhw
2014-08-22  9:09       ` Ludovic Courtès
2014-08-22  9:03     ` Ludovic Courtès
2014-08-30 20:22     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761h9918u.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.