GNU bug report logs - #54595
[PATCH 0/2] Fix cross-compilation for libfido2

Previous Next

Package: guix-patches;

Reported by: Sébastien Lerique <sl <at> eauchat.org>

Date: Sun, 27 Mar 2022 12:29:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Sébastien Lerique <sl <at> eauchat.org>, 54595 <at> debbugs.gnu.org,
 guix-patches <at> gnu.org
Subject: Re: [bug#54595] [PATCH 2/2] gnu: libfido2: Fix cross-compilation.
Date: Sun, 27 Mar 2022 15:04:09 +0100
[Message part 1 (text/plain, inline)]
Hi,

Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Sébastien Lerique schreef op zo 27-03-2022 om 21:29 [+0900]:
>> +                                                            ,(%current-target-system)
>> +                                                            "-pkg-config"))))
>
> This can be simplified with 'pkg-config-for-target':
>
>   #:configure-flags
>   (list (string-append "-DPKG_CONFIG_EXECUTABLE="
>                        (search-input-file %build-inputs
>                                           (string-append "/bin/" ,(pkg-config-for-target)))))

For my own benefit trying to get better at writing gexps, I was
wondering how to write in order to remove the %build-inputs reference.
I came up with the following:

--8<---------------cut here---------------start------------->8---
    (arguments
     (list
      #:configure-flags
      #~(list #$@(if (%current-target-system)
                     (list
                      #~(string-append
                         "-DPKG_CONFIG_EXECUTABLE="
                         #+pkg-config "/bin/"
                         #$(pkg-config-for-target)))
                     '()))
       #:phases
       #~(modify-phases %standard-phases
           ;; regress tests enabled only for debug builds
           (delete 'check))))
--8<---------------cut here---------------end--------------->8---

Would this a the better way to do this?  It looks a bit complex to me so
I wonder if there's a simpler way.  I'm also not entirely sure if it's
#+pkg-config or #$pkg-config, both seem to work, however I thought we
should be using #+ for native inputs and #$ for regular inputs.

Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.