mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: libgpg-error: Fix cross compilation.
* gnu/packages/gnupg.scm (libgpg-error)[arguments]: Add a lock-obj header to the target platform when cross-compiling, [native-inputs]: add gettext that is needed when cross-compiling.
This commit is contained in:
parent
c3d523b048
commit
e373adc139
1 changed files with 25 additions and 0 deletions
|
@ -96,6 +96,31 @@ (define-public libgpg-error
|
|||
(("namespace=errnos") "pkg_namespace=errnos"))
|
||||
#t))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
(if (%current-target-system)
|
||||
`(#:modules ((ice-9 match)
|
||||
(guix build gnu-build-system)
|
||||
(guix build utils))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; When cross-compiling, some platform specific properties cannot
|
||||
;; be detected. Create a symlink to the appropriate platform
|
||||
;; file. See Cross-Compiling section at:
|
||||
;; https://github.com/gpg/libgpg-error/blob/master/README
|
||||
(add-after 'unpack 'cross-symlinks
|
||||
(lambda* (#:key target inputs #:allow-other-keys)
|
||||
(let ((triplet
|
||||
(match (string-take target
|
||||
(string-index target #\-))
|
||||
("armhf" "arm-unknown-linux-gnueabi")
|
||||
(x
|
||||
(string-append x "-unknown-linux-gnu")))))
|
||||
(symlink
|
||||
(string-append "lock-obj-pub." triplet ".h")
|
||||
"src/syscfg/lock-obj-pub.linux-gnu.h"))
|
||||
#t))))
|
||||
'()))
|
||||
(native-inputs `(("gettext" ,gettext-minimal)))
|
||||
(home-page "https://gnupg.org")
|
||||
(synopsis "Library of error values for GnuPG components")
|
||||
(description
|
||||
|
|
Loading…
Reference in a new issue