From dc70626d26c23b986fa4ae9f41a1187539cd470f Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Jan 2017 15:24:27 +0000 Subject: gnu: libtool: Use 'modify-phases'. * gnu/packages/autotools.scm (libtool): Use 'modify-phases'. [arguments]: Use 'modify-phases'. Signed-off-by: Leo Famulari --- gnu/packages/autotools.scm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'gnu/packages/autotools.scm') diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 72492e70eb..16ab2b8719 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 David Thompson +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -313,21 +314,21 @@ (define-public libtool (or (%current-target-system) (%current-system)))) - #:phases (alist-cons-before - 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - ;; Run the test suite in parallel, if possible. - (setenv "TESTSUITEFLAGS" - (string-append - "-j" - (number->string (parallel-job-count)))) + #:phases + (modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Run the test suite in parallel, if possible. + (setenv "TESTSUITEFLAGS" + (string-append + "-j" + (number->string (parallel-job-count)))) + ;; Path references to /bin/sh. + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "tests/testsuite" + (("/bin/sh") + (string-append bash "/bin/bash"))))))))) - ;; Path references to /bin/sh. - (let ((bash (assoc-ref inputs "bash"))) - (substitute* "tests/testsuite" - (("/bin/sh") - (string-append bash "/bin/bash"))))) - %standard-phases))) (synopsis "Generic shared library support tools") (description "GNU Libtool helps in the creation and use of shared libraries, by -- cgit v1.2.3 From 98341757c8c45fca8d2b53f9972f5c6a32cf2c95 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 1 Jan 2017 15:24:28 +0000 Subject: gnu: libtool: Restore ltmain.sh shebang. This fixes * gnu/packages/autotools.scm (libtool)[arguments]: Add new phase 'restore-ltmain-shebang'. [native-inputs]: Add help2man. Signed-off-by: Leo Famulari --- gnu/packages/autotools.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/autotools.scm') diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 16ab2b8719..83018ca8ff 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -27,6 +27,7 @@ (define-module (gnu packages autotools) #:use-module (gnu packages) #:use-module (gnu packages perl) #:use-module (gnu packages m4) + #:use-module (gnu packages man) #:use-module (gnu packages bash) #:use-module (guix utils) #:use-module (guix packages) @@ -301,6 +302,7 @@ (define-public libtool (propagated-inputs `(("m4" ,m4))) (native-inputs `(("m4" ,m4) ("perl" ,perl) + ("help2man" ,help2man) ;because we modify ltmain.sh ("automake" ,automake) ;some tests rely on 'aclocal' ("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te' @@ -328,6 +330,10 @@ (define-public libtool (substitute* "tests/testsuite" (("/bin/sh") (string-append bash "/bin/bash"))))))))) + (add-after 'patch-source-shebangs 'restore-ltmain-shebang + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "build-aux/ltmain.in" + (("^#!.*/bin/sh$") "/bin/sh"))))))) (synopsis "Generic shared library support tools") (description -- cgit v1.2.3 From c5862bda95e3171c1addf6ff198a953bcda785b4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 4 Jan 2017 19:44:27 -0500 Subject: gnu: libtool: Don't replace 'sh' reference with 'bash'. Bash behaves differently based on how it is invoked (see Invocation in bash(1)). * gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead of /bin/bash in 'pre-check' phase. Fix typo in comment. --- gnu/packages/autotools.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/autotools.scm') diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 83018ca8ff..8ff7b8cf6d 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -325,11 +325,11 @@ (define-public libtool (string-append "-j" (number->string (parallel-job-count)))) - ;; Path references to /bin/sh. + ;; Patch references to /bin/sh. (let ((bash (assoc-ref inputs "bash"))) (substitute* "tests/testsuite" (("/bin/sh") - (string-append bash "/bin/bash"))))))))) + (string-append bash "/bin/sh")))))) (add-after 'patch-source-shebangs 'restore-ltmain-shebang (lambda* (#:key inputs #:allow-other-keys) (substitute* "build-aux/ltmain.in" -- cgit v1.2.3 From 78c172a56ef22b3145b9e8e78816a9607cb01b9b Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 5 Jan 2017 10:44:43 -0500 Subject: gnu: libtool: Make sure all phases return a successful value. * gnu/packages/autotools.scm (libtool)[arguments]: Return #t from 'pre-check' and 'restore-ltmain-shebang' phases. --- gnu/packages/autotools.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnu/packages/autotools.scm') diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 8ff7b8cf6d..a2c1f3dd2e 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -329,11 +329,13 @@ (define-public libtool (let ((bash (assoc-ref inputs "bash"))) (substitute* "tests/testsuite" (("/bin/sh") - (string-append bash "/bin/sh")))))) + (string-append bash "/bin/sh"))) + #t))) (add-after 'patch-source-shebangs 'restore-ltmain-shebang (lambda* (#:key inputs #:allow-other-keys) (substitute* "build-aux/ltmain.in" - (("^#!.*/bin/sh$") "/bin/sh"))))))) + (("^#!.*/bin/sh$") "/bin/sh")) + #t))))) (synopsis "Generic shared library support tools") (description -- cgit v1.2.3 From 92e779592d269ca1924f184496eb4ca832997b12 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 5 Jan 2017 11:31:34 -0500 Subject: gnu: libtool: Correct replacement shebang. * gnu/packages/autotools.scm (libtool)[arguments]: Correct replacement shebang in 'restore-ltmain-shebang' phase. --- gnu/packages/autotools.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/autotools.scm') diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index a2c1f3dd2e..442c87c1f1 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -334,7 +334,7 @@ (define-public libtool (add-after 'patch-source-shebangs 'restore-ltmain-shebang (lambda* (#:key inputs #:allow-other-keys) (substitute* "build-aux/ltmain.in" - (("^#!.*/bin/sh$") "/bin/sh")) + (("^#!.*/bin/sh$") "#!/bin/sh")) #t))))) (synopsis "Generic shared library support tools") -- cgit v1.2.3