gnu: bzip2: Use invoke instead of system*.

* gnu/packages/compression.scm (bzip2)[arguments]: Use invoke.  In the custom
configure phase, change the 'if' to 'when' and move the #t outside, so that
it's always returned.
master
Mark H Weaver 2018-03-16 02:28:27 -04:00
parent b0559d241b
commit 3158bc043e
No known key found for this signature in database
GPG Key ID: 7CEF29847562C516
1 changed files with 14 additions and 14 deletions

View File

@ -249,23 +249,23 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'configure (replace 'configure
(lambda* (#:key target #:allow-other-keys) (lambda* (#:key target #:allow-other-keys)
(if ,(%current-target-system) (when ,(%current-target-system)
;; Cross-compilation: use the cross tools. ;; Cross-compilation: use the cross tools.
(substitute* (find-files "." "Makefile") (substitute* (find-files "." "Makefile")
(("CC=.*$") (("CC=.*$")
(string-append "CC = " target "-gcc\n")) (string-append "CC = " target "-gcc\n"))
(("AR=.*$") (("AR=.*$")
(string-append "AR = " target "-ar\n")) (string-append "AR = " target "-ar\n"))
(("RANLIB=.*$") (("RANLIB=.*$")
(string-append "RANLIB = " target "-ranlib\n")) (string-append "RANLIB = " target "-ranlib\n"))
(("^all:(.*)test" _ prerequisites) (("^all:(.*)test" _ prerequisites)
;; Remove 'all' -> 'test' dependency. ;; Remove 'all' -> 'test' dependency.
(string-append "all:" prerequisites "\n"))) (string-append "all:" prerequisites "\n"))))
#t))) #t))
(add-before 'build 'build-shared-lib (add-before 'build 'build-shared-lib
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(patch-makefile-SHELL "Makefile-libbz2_so") (patch-makefile-SHELL "Makefile-libbz2_so")
(zero? (system* "make" "-f" "Makefile-libbz2_so")))) (invoke "make" "-f" "Makefile-libbz2_so")))
(add-after 'install 'install-shared-lib (add-after 'install 'install-shared-lib
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))