gnu: libgpg-error: Skip failing test on the Hurd.
* gnu/packages/gnupg.scm (libgpg-error)[arguments]: When building natively on the Hurd, add phase 'skip-tests'.
This commit is contained in:
parent
bfcfe53c72
commit
c5991dfb92
1 changed files with 48 additions and 34 deletions
|
@ -22,6 +22,7 @@
|
||||||
;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
|
;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
|
||||||
;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
|
;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
|
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -94,40 +95,42 @@
|
||||||
(version "1.45")
|
(version "1.45")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
|
(uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
|
||||||
version ".tar.bz2"))
|
version ".tar.bz2"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"09haz1kk48b8q0hd58g98whylah0fp121yfgjms7pzsbzgj8w3sp"))))
|
"09haz1kk48b8q0hd58g98whylah0fp121yfgjms7pzsbzgj8w3sp"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(if (%current-target-system)
|
(cond
|
||||||
`(#:modules ((guix build gnu-build-system)
|
((%current-target-system)
|
||||||
(guix build utils))
|
(list
|
||||||
#:phases
|
#:modules '((guix build gnu-build-system)
|
||||||
(modify-phases %standard-phases
|
(guix build utils))
|
||||||
;; If this is left out, some generated header
|
#:phases
|
||||||
;; files will be sprinkled with ‘\c’, which
|
#~(modify-phases %standard-phases
|
||||||
;; the compiler won't like.
|
;; If this is left out, some generated header
|
||||||
(add-after 'unpack 'fix-gen-lock-obj.sh
|
;; files will be sprinkled with ‘\c’, which
|
||||||
(lambda _
|
;; the compiler won't like.
|
||||||
(substitute* "src/gen-lock-obj.sh"
|
(add-after 'unpack 'fix-gen-lock-obj.sh
|
||||||
(("if test -n `echo -n`") "if ! test -n `echo -n`"))))
|
(lambda _
|
||||||
;; When cross-compiling, some platform specific properties cannot
|
(substitute* "src/gen-lock-obj.sh"
|
||||||
;; be detected. Create a symlink to the appropriate platform
|
(("if test -n `echo -n`") "if ! test -n `echo -n`"))))
|
||||||
;; file if required. Note that these platform files depend on
|
;; When cross-compiling, some platform specific properties cannot
|
||||||
;; both the operating system and architecture!
|
;; be detected. Create a symlink to the appropriate platform
|
||||||
;;
|
;; file if required. Note that these platform files depend on
|
||||||
;; See Cross-Compiling section at:
|
;; both the operating system and architecture!
|
||||||
;; https://github.com/gpg/libgpg-error/blob/master/README
|
;;
|
||||||
(add-after 'unpack 'cross-symlinks
|
;; See Cross-Compiling section at:
|
||||||
(lambda _
|
;; https://github.com/gpg/libgpg-error/blob/master/README
|
||||||
(define (link triplet source)
|
(add-after 'unpack 'cross-symlinks
|
||||||
(symlink (string-append "lock-obj-pub." triplet ".h")
|
(lambda _
|
||||||
(string-append "src/syscfg/lock-obj-pub."
|
(define (link triplet source)
|
||||||
source ".h")))
|
(symlink (string-append "lock-obj-pub." triplet ".h")
|
||||||
,(let* ((target (%current-target-system))
|
(string-append "src/syscfg/lock-obj-pub."
|
||||||
|
source ".h")))
|
||||||
|
#$(let* ((target (%current-target-system))
|
||||||
(architecture
|
(architecture
|
||||||
(string-take target (string-index target #\-))))
|
(string-take target (string-index target #\-))))
|
||||||
(cond ((target-linux? target)
|
(cond ((target-linux? target)
|
||||||
|
@ -140,8 +143,19 @@
|
||||||
;; configuration, as this is not correct for
|
;; configuration, as this is not correct for
|
||||||
;; all architectures.
|
;; all architectures.
|
||||||
(_ #t)))
|
(_ #t)))
|
||||||
(#t #t)))))))
|
(#t #t))))))))
|
||||||
'()))
|
((system-hurd?)
|
||||||
|
(list
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'skip-tests
|
||||||
|
(lambda _
|
||||||
|
(substitute*
|
||||||
|
"tests/t-syserror.c"
|
||||||
|
(("(^| )main *\\(.*" all)
|
||||||
|
(string-append all "{\n exit (77);//"))))))))
|
||||||
|
(else
|
||||||
|
'())))
|
||||||
(native-inputs (list gettext-minimal))
|
(native-inputs (list gettext-minimal))
|
||||||
(home-page "https://gnupg.org")
|
(home-page "https://gnupg.org")
|
||||||
(synopsis "Library of error values for GnuPG components")
|
(synopsis "Library of error values for GnuPG components")
|
||||||
|
|
Reference in a new issue