summaryrefslogtreecommitdiff
path: root/gnu/packages/autotools.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-26 16:43:08 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-26 16:43:08 +0200
commita9db7d10b6e4e86fb2b87a4161db3b1f202002fd (patch)
tree4a22481ab65447d8bc1cc307a76a884a7e7bbee9 /gnu/packages/autotools.scm
parente33d9d6f09874f83bb5a03f49cb969a84588e10e (diff)
parent2b6bdf7eb3c95716ac107ea6caea2e0b7077ae77 (diff)
downloadpatches-a9db7d10b6e4e86fb2b87a4161db3b1f202002fd.tar
patches-a9db7d10b6e4e86fb2b87a4161db3b1f202002fd.tar.gz
Merge branch 'master' into core-updates
Conflicts: Makefile.am gnu/packages/autotools.scm gnu/packages/guile.scm gnu/packages/python.scm gnu/packages/shishi.scm guix/gnu-maintenance.scm guix/scripts/build.scm guix/scripts/gc.scm guix/scripts/package.scm guix/scripts/substitute-binary.scm guix/ui.scm nix/nix-daemon/guix-daemon.cc test-env.in tests/nar.scm tests/store.scm
Diffstat (limited to 'gnu/packages/autotools.scm')
-rw-r--r--gnu/packages/autotools.scm50
1 files changed, 40 insertions, 10 deletions
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 114e98f606..3634338777 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -50,8 +50,7 @@
(arguments `(#:tests? #f))
(home-page
"http://www.gnu.org/software/autoconf/")
- (synopsis
- "GNU Autoconf, a part of the GNU Build System")
+ (synopsis "Create source code configuration scripts")
(description
"GNU Autoconf is an extensible package of M4 macros that produce
shell scripts to automatically configure software source code
@@ -149,8 +148,17 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
("perl" ,perl)
("patch/skip-amhello"
,(search-patch "automake-skip-amhello-tests.patch"))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "ACLOCAL_PATH")
+ (directories '("share/aclocal")))))
(arguments
'(#:patches (list (assoc-ref %build-inputs "patch/skip-amhello"))
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26)
+ (rnrs io ports))
#:phases (alist-cons-before
'patch-source-shebangs 'patch-tests-shebangs
(lambda _
@@ -163,15 +171,37 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
;; that occur during the test suite.
(setenv "SHELL" sh)
(setenv "CONFIG_SHELL" sh)))
- %standard-phases)))
- (native-search-paths
- (list (search-path-specification
- (variable "ACLOCAL_PATH")
- (directories '("share/aclocal")))))
+ ;; Files like `install-sh', `mdate.sh', etc. must use
+ ;; #!/bin/sh, otherwise users could leak erroneous shebangs
+ ;; in the wild. See <http://bugs.gnu.org/14201> for an
+ ;; example.
+ (alist-cons-after
+ 'install 'unpatch-shebangs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share")))
+ (define (starts-with-shebang? file)
+ (equal? (call-with-input-file file
+ (lambda (p)
+ (list (get-u8 p) (get-u8 p))))
+ (map char->integer '(#\# #\!))))
+
+ (for-each (lambda (file)
+ (when (and (starts-with-shebang? file)
+ (executable-file? file))
+ (format #t "restoring shebang on `~a'~%"
+ file)
+ (substitute* file
+ (("^#!.*/bin/sh")
+ "#!/bin/sh")
+ (("^#!.*/bin/env(.*)$" _ args)
+ (string-append "#!/usr/bin/env"
+ args)))))
+ (find-files dir ".*"))))
+ %standard-phases))))
(home-page "http://www.gnu.org/software/automake/")
- (synopsis
- "GNU Automake, a GNU standard-compliant makefile generator")
+ (synopsis "Making GNU standards-compliant Makefiles")
(description
"GNU Automake is a tool for automatically generating
`Makefile.in' files compliant with the GNU Coding
@@ -225,7 +255,7 @@ Standards. Automake requires the use of Autoconf.")
%standard-phases)))
(inputs `(("patch/skip-tests"
,(search-patch "libtool-skip-tests.patch"))))
- (synopsis "GNU Libtool, a generic library support script")
+ (synopsis "Generic shared library support tools")
(description
"GNU libtool is a generic library support script. Libtool hides the
complexity of using shared libraries behind a consistent, portable interface.