summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-25 18:00:01 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-25 18:00:01 +0200
commit1984b43895dc8ef9f093482bc8ac5fb7e20054b8 (patch)
tree56fb44a2941770e3472375d8c4c6ecefb8576ac5 /gnu/packages
parent3871c9f50092b152367f6b2b570d481386e0d398 (diff)
downloadguix-1984b43895dc8ef9f093482bc8ac5fb7e20054b8.tar.gz
gnu: libtool: Allow cross-compilation.
* gnu/packages/autotools.scm (libtool)[arguments]: Use #:phases argument
  only when building natively.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/autotools.scm44
1 files changed, 23 insertions, 21 deletions
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 6fffa70634..ed789df1fc 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -231,28 +231,30 @@ Standards.  Automake requires the use of Autoconf.")
 
     (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")