mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: libtool: Allow cross-compilation.
* gnu/packages/autotools.scm (libtool)[arguments]: Use #:phases argument only when building natively.
This commit is contained in:
parent
3871c9f500
commit
1984b43895
1 changed files with 23 additions and 21 deletions
|
@ -231,28 +231,30 @@ (define-public libtool
|
|||
|
||||
(arguments
|
||||
`(#:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
|
||||
#:phases (alist-cons-before
|
||||
'check 'pre-check
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; Run the test suite in parallel, if possible.
|
||||
(let ((ncores
|
||||
(cond
|
||||
((getenv "NIX_BUILD_CORES")
|
||||
=>
|
||||
(lambda (n)
|
||||
(if (zero? (string->number n))
|
||||
(number->string (current-processor-count))
|
||||
n)))
|
||||
(else "1"))))
|
||||
(setenv "TESTSUITEFLAGS"
|
||||
(string-append "-j" ncores)))
|
||||
,@(if (%current-target-system)
|
||||
'() ; no `check' phase when cross-building
|
||||
'(#:phases (alist-cons-before
|
||||
'check 'pre-check
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; Run the test suite in parallel, if possible.
|
||||
(let ((ncores
|
||||
(cond
|
||||
((getenv "NIX_BUILD_CORES")
|
||||
=>
|
||||
(lambda (n)
|
||||
(if (zero? (string->number n))
|
||||
(number->string (current-processor-count))
|
||||
n)))
|
||||
(else "1"))))
|
||||
(setenv "TESTSUITEFLAGS"
|
||||
(string-append "-j" ncores)))
|
||||
|
||||
;; Path references to /bin/sh.
|
||||
(let ((bash (assoc-ref inputs "bash")))
|
||||
(substitute* "tests/testsuite"
|
||||
(("/bin/sh")
|
||||
(string-append bash "/bin/bash")))))
|
||||
%standard-phases)))
|
||||
;; Path references to /bin/sh.
|
||||
(let ((bash (assoc-ref inputs "bash")))
|
||||
(substitute* "tests/testsuite"
|
||||
(("/bin/sh")
|
||||
(string-append bash "/bin/bash")))))
|
||||
%standard-phases)))))
|
||||
(inputs `(("patch/skip-tests"
|
||||
,(search-patch "libtool-skip-tests.patch"))))
|
||||
(synopsis "Generic shared library support tools")
|
||||
|
|
Loading…
Reference in a new issue