gnu: mit-krb5: Fix cross-compilation.
* gnu/packages/kerberos.scm (mit-krb5)[arguments]: Disable tests when cross-compiling. Add cross-compilation specific configure-flags and make-flags. Search for perl in native-inputs or inputs.master
parent
283fb64851
commit
b5ebab8023
|
@ -8,6 +8,7 @@
|
||||||
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
|
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
|
||||||
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -68,9 +69,21 @@
|
||||||
("perl" ,perl)))
|
("perl" ,perl)))
|
||||||
(arguments
|
(arguments
|
||||||
`(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
|
`(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
|
||||||
;; while running the tests in 'src/tests'.
|
;; while running the tests in 'src/tests'. Also disable tests when
|
||||||
#:tests? ,(string=? (%current-system) "x86_64-linux")
|
;; cross-compiling.
|
||||||
|
#:tests? ,(and (not (%current-target-system))
|
||||||
|
(string=? (%current-system) "x86_64-linux"))
|
||||||
|
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
'(#:configure-flags
|
||||||
|
(list "krb5_cv_attr_constructor_destructor=yes"
|
||||||
|
"ac_cv_func_regcomp=yes"
|
||||||
|
"ac_cv_printf_positional=yes"
|
||||||
|
"ac_cv_file__etc_environment=yes"
|
||||||
|
"ac_cv_file__etc_TIMEZONE=no")
|
||||||
|
#:make-flags
|
||||||
|
(list "CFLAGS+=-DDESTRUCTOR_ATTR_WORKS=1"))
|
||||||
|
'())
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'enter-source-directory
|
(add-after 'unpack 'enter-source-directory
|
||||||
|
@ -78,8 +91,8 @@
|
||||||
(chdir "src")
|
(chdir "src")
|
||||||
#t))
|
#t))
|
||||||
(add-before 'check 'pre-check
|
(add-before 'check 'pre-check
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
||||||
(let ((perl (assoc-ref inputs "perl")))
|
(let ((perl (assoc-ref (or native-inputs inputs) "perl")))
|
||||||
(substitute* "plugins/kdb/db2/libdb2/test/run.test"
|
(substitute* "plugins/kdb/db2/libdb2/test/run.test"
|
||||||
(("/bin/cat") (string-append perl "/bin/perl"))
|
(("/bin/cat") (string-append perl "/bin/perl"))
|
||||||
(("D/bin/sh") (string-append "D" (which "sh")))
|
(("D/bin/sh") (string-append "D" (which "sh")))
|
||||||
|
|
Reference in New Issue