gnu: libgit2: Allow cross-compilation.

With commit 8394619bac, the label for
'pkg-config' when cross-compiling changed to "TRIPLET-pkg-config",
thereby breaking the 'assoc-ref' call.  This commit fixes it by avoiding
referring to the label.

* gnu/packages/version-control.scm (libgit2)[arguments]: Adjust
"-DPKG_CONFIG_EXECUTABLE=" option.
This commit is contained in:
Ludovic Courtès 2021-12-14 20:10:48 +01:00
parent a284e56de4
commit 8da6dfb0bb
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -811,8 +811,10 @@ (define-public libgit2
,@(if (%current-target-system)
`((string-append
"-DPKG_CONFIG_EXECUTABLE="
(assoc-ref %build-inputs "pkg-config")
"/bin/" ,(%current-target-system) "-pkg-config"))
(search-input-file
%build-inputs
(string-append "/bin/" ,(%current-target-system)
"-pkg-config"))))
'()))
#:phases
(modify-phases %standard-phases