summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/acl.scm32
-rw-r--r--gnu/packages/attr.scm47
-rw-r--r--gnu/packages/gettext.scm29
3 files changed, 67 insertions, 41 deletions
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index 14579e9ea9..54c9116baf 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -45,18 +45,30 @@
'configure 'patch-makefile-SHELL
(lambda _
(patch-makefile-SHELL "include/buildmacros"))
- (alist-replace
- 'check
- (lambda _
- (system* "make" "tests" "-C" "test")
+ ,(if (%current-target-system)
+ '%standard-cross-phases
+ '(alist-replace 'check
+ (lambda _
+ (system* "make" "tests" "-C" "test")
- ;; XXX: Ignore the test result since this is
- ;; dependent on the underlying file system.
- #t)
- %standard-phases))))
+ ;; XXX: Ignore the test result since this is
+ ;; dependent on the underlying file system.
+ #t)
+ %standard-phases)))))
(inputs `(("attr" ,attr)
- ("gettext" ,guix:gettext)
- ("perl" ,perl)))
+
+ ;; Perl is needed to run tests; remove it from cross builds.
+ ,@(if (%current-target-system)
+ '()
+ `(("gettext" ,guix:gettext)
+ ("perl" ,perl)))))
+ (native-inputs
+ ;; FIXME: Upon next core-updates, make gettext a native input
+ ;; unconditionally.
+ (if (%current-target-system)
+ `(("gettext" ,guix:gettext))
+ '()))
+
(home-page
"http://savannah.nongnu.org/projects/acl")
(synopsis
diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm
index 254792f4ed..3fb15d235f 100644
--- a/gnu/packages/attr.scm
+++ b/gnu/packages/attr.scm
@@ -52,26 +52,37 @@
"install"
"install-lib"
"install-dev")))
- (alist-replace
- 'check
- (lambda _
- ;; Use the right shell.
- (substitute* "test/run"
- (("/bin/sh")
- (which "bash")))
- (system* "make" "tests" "-C" "test")
+ ;; When building natively, adjust the test cases.
+ ,(if (%current-target-system)
+ '%standard-cross-phases
+ '(alist-replace 'check
+ (lambda _
+ ;; Use the right shell.
+ (substitute* "test/run"
+ (("/bin/sh")
+ (which "bash")))
- ;; XXX: Ignore the test result since this is dependent on the
- ;; underlying file system.
- #t)
- %standard-phases)))))
- (inputs `(("perl" ,perl)
- ("gettext" ,guix:gettext)))
- (home-page
- "http://savannah.nongnu.org/projects/attr/")
- (synopsis
- "Library and tools for manipulating extended attributes")
+ (system* "make" "tests" "-C" "test")
+
+ ;; XXX: Ignore the test result since this is
+ ;; dependent on the underlying file system.
+ #t)
+ %standard-phases))))))
+ (inputs `(;; Perl is needed to run tests; remove it from cross builds.
+ ,@(if (%current-target-system)
+ '()
+ `(("perl" ,perl)
+ ("gettext" ,guix:gettext)))))
+ (native-inputs
+ ;; FIXME: Upon next core-updates, make gettext a native input
+ ;; unconditionally.
+ (if (%current-target-system)
+ `(("gettext" ,guix:gettext))
+ '()))
+
+ (home-page "http://savannah.nongnu.org/projects/attr/")
+ (synopsis "Library and tools for manipulating extended attributes")
(description
"Portable library and tools for manipulating extended attributes.")
(license (list gpl2+ lgpl2.1+))))
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 29ea54924a..e22b1ba6ff 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -38,19 +38,22 @@
(build-system gnu-build-system)
(arguments
`(#:patches (list (assoc-ref %build-inputs "patch/gets"))
- #:phases (alist-cons-before
- 'check 'patch-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- (substitute* (find-files "gettext-tools/tests"
- "^msgexec-[0-9]")
- (("#![[:blank:]]/bin/sh")
- (format #f "#!~a/bin/sh" bash)))
- (substitute* (find-files "gettext-tools/gnulib-tests"
- "posix_spawn")
- (("/bin/sh")
- (format #f "~a/bin/bash" bash)))))
- %standard-phases)))
+ #:phases ,(if (%current-target-system)
+ '%standard-cross-phases
+ '(alist-cons-before
+ 'check 'patch-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; TODO: Use (which "sh").
+ (let ((bash (assoc-ref inputs "bash")))
+ (substitute* (find-files "gettext-tools/tests"
+ "^msgexec-[0-9]")
+ (("#![[:blank:]]/bin/sh")
+ (format #f "#!~a/bin/sh" bash)))
+ (substitute* (find-files "gettext-tools/gnulib-tests"
+ "posix_spawn")
+ (("/bin/sh")
+ (format #f "~a/bin/bash" bash)))))
+ %standard-phases))))
(inputs
`(("patch/gets"
,(search-patch "gettext-gets-undeclared.patch"))))