[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] Remove unused lambda arguments and prefer separate phases over a
From: |
Eric Bavier |
Subject: |
[Patch] Remove unused lambda arguments and prefer separate phases over augmented phases. |
Date: |
Sun, 30 Mar 2014 18:33:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
My previous patch raised the question about whether it's wise to use
something like::
#:phases
(alist-replace
'foo
(lambda* (#:key #:allow-other-keys #:rest args)
(let ((foo (assoc-ref 'foo %standard-phases)))
(frobnicate)
(apply foo args))))
in recipe arguments, or to just add another phase before the foo phase.
There was some concensus that adding another phase before or after was
easier to understand (and less verbose), so I went ahead and tried to
reformulate the package recipes that did such things. Along the way I
"cleaned up" some other things, mostly in the package arguments.
I tried not to change anything semantically in the packate definitions,
but I did verify that all packages build with these changes.
I apologize for the large patch, I couldn't think of any other way to
split it up.
>From d92b819c12b873fc3b99ec6771049a6bc4badbac Mon Sep 17 00:00:00 2001
From: Eric Bavier <address@hidden>
Date: Sun, 30 Mar 2014 18:09:10 -0500
Subject: [PATCH] gnu: Remove unused lambda arguments and prefer separate
phases over augmented phases.
* gnu/packages/compression.scm (sharutils) [argumets]: Remove unused
lambda args.
* gnu/packages/gl.scm (mesa) [arguments]: Same
* gnu/packages/fltk.scm [arguments]: Same. Substitute const check
phase with #:tests? #f. Add pre-configure phase.
* gnu/packages/ghostscript.scm (ghostscript) [arguments]: Put makefile
patches in separate phase. Put so steps oi separate phases.
* gnu/packages/glib.scm (gobject-introspection) [arguments]: Remove
unused lambda args. Put patches in pre-configure phase.
* gnu/packages/gnupg.scm (gnupg) [arguments]: Put patch in
pre-configure phase.
(pius) [arguments]: Delete const #t configure and build phases.
(signing-party) [arguments]: Factor patches into post-unpack phase.
(paperkey) [arguments]: Remove unused lambda args. Factor out patches
into pre-check phase.
* gnu/packages/icu4c.scm [arguments]: Change source dir after standard
unpack phase. Factor configure patches into pre-configure phase.
* gnu/packages/lsof.scm [arguments]: Remove unused lambda args.
Remove unnecessary apply.
* gnu/packages/lvm.scm (lvm2) [arguments]: Factor out patches into
pre-configure phase.
* gnu/packages/libtiff.scm [arguments]: Same
* gnu/packages/maths.scm (hdf5) [arguments]: Same
* gnu/packages/gtk.scm (gtk+-2) [arguments]: Same
* gnu/packages/mp3.scm (libmad) [arguments]: Same
(id3lib) [arguments]: Same
* gnu/packages/python.scm (python-2) [arguments]: Same
* gnu/packages/texlive.scm (texlive) [arguments]: Same
* gnu/packages/pretty-print.scm (a2ps) [arguments]: Same
(trueprint) [arguments]: Same
(source-highlight) [arguments]: Same. Remove unused lambda args.
* gnu/packages/netpbm.scm [arguments]: Remove unused lambda args.
Factor out test patches into pre-check phase. Condense calls to
substitute*
* gnu/packages/openldap.scm [arguments]: Factor out libtool copy into
post-configure phases. [synopsis] Remove package name.
* gnu/packages/ssh.scm (openssh) [arguments]: Factor out patches into
separate phases.
* gnu/packages/tcsh.scm [arguments]: Factor out test patches into
pre-check phase.
* gnu/packages/version-control.scm (git) [arguments]: Factor out
patches into post-configure phase.
* gnu/packages/vim.scm [arguments]: Same. [synopsis] Remove package
name.
* gnu/packages/vpn.scm (openconnect) [arguments]: Put configure flags
in #:configure-flags
---
gnu/packages/compression.scm | 2 +-
gnu/packages/fltk.scm | 21 +++++++----------
gnu/packages/ghostscript.scm | 34 +++++++++++----------------
gnu/packages/gl.scm | 2 +-
gnu/packages/glib.scm | 10 ++++----
gnu/packages/gnupg.scm | 42 +++++++++++++---------------------
gnu/packages/gtk.scm | 14 +++++-------
gnu/packages/icu4c.scm | 26 +++++++++------------
gnu/packages/libtiff.scm | 14 +++++-------
gnu/packages/lsof.scm | 8 +++----
gnu/packages/lvm.scm | 14 +++++-------
gnu/packages/maths.scm | 15 ++++++------
gnu/packages/mp3.scm | 39 +++++++++++++++----------------
gnu/packages/netpbm.scm | 47 +++++++++++++++++++-------------------
gnu/packages/openldap.scm | 11 ++++-----
gnu/packages/pretty-print.scm | 38 +++++++++++++-----------------
gnu/packages/python.scm | 19 ++++++---------
gnu/packages/ssh.scm | 30 +++++++++++-------------
gnu/packages/tcsh.scm | 31 ++++++++++++-------------
gnu/packages/texlive.scm | 10 ++++----
gnu/packages/version-control.scm | 16 ++++++-------
gnu/packages/vim.scm | 14 +++++-------
gnu/packages/vpn.scm | 22 ++++++------------
23 files changed, 202 insertions(+), 277 deletions(-)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 72f8006..a4c6f53 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -280,7 +280,7 @@ archiving. Lzip is a clean implementation of the LZMA
algorithm.")
'patch-source-shebangs 'unpatch-source-shebang
;; revert the patch-shebang phase on a script which is
;; in fact test data
- (lambda* (#:key #:allow-other-keys)
+ (lambda _
(substitute* "tests/shar-1.ok"
(((which "sh")) "/bin/sh")))
%standard-phases)))
diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm
index 4c8fc3f..6390b50 100644
--- a/gnu/packages/fltk.scm
+++ b/gnu/packages/fltk.scm
@@ -40,19 +40,14 @@
`(("libx11" ,libx11)
("mesa" ,mesa)))
(arguments
- `(#:phases
- (alist-replace
- 'check
- (lambda* (#:key inputs #:allow-other-keys) #t) ;; fltk does not have a
- ;; check target
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "makeinclude.in"
- (("/bin/sh") (which "sh")))
- (apply configure args)))
- %standard-phases))))
+ `(#:tests? #f ;TODO: compile programs in "test" dir
+ #:phases
+ (alist-cons-before
+ 'configure 'patch-makeinclude
+ (lambda _
+ (substitute* "makeinclude.in"
+ (("/bin/sh") (which "sh"))))
+ %standard-phases)))
(home-page "https://www.fltk.org")
(synopsis "3D C++ GUI library")
(description "FLTK is a C++ GUI toolkit providing modern GUI functionality
without the
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 127256a..7bdd63e 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -142,27 +142,19 @@ printing, and psresize, for adjusting page sizes.")
("tcl" ,tcl)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (apply configure args)
- (substitute* "base/all-arch.mak"
- (("/bin/sh") (which "bash")))
- (substitute* "base/unixhead.mak"
- (("/bin/sh") (which "bash")))))
- (alist-replace
- 'build
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((build (assoc-ref %standard-phases 'build)))
- (apply build args)
- (system* "make" "so")))
- (alist-replace
- 'install
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((install (assoc-ref %standard-phases 'install)))
- (apply install args)
- (system* "make" "install-so")))
+ (alist-cons-after
+ 'configure 'patch-config-files
+ (lambda _
+ (substitute* "base/all-arch.mak"
+ (("/bin/sh") (which "bash")))
+ (substitute* "base/unixhead.mak"
+ (("/bin/sh") (which "bash"))))
+ (alist-cons-after
+ 'build 'build-so
+ (lambda _ (system* "make" "so"))
+ (alist-cons-after
+ 'install 'install-so
+ (lambda _ (system* "make" "install-so"))
%standard-phases)))))
(synopsis "PostScript and PDF interpreter")
(description
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 796f7f0..2741595 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -159,7 +159,7 @@ Polygon meshes, and Extruded polygon meshes")
#:phases
(alist-cons-after
'unpack 'remove-symlink
- (lambda* (#:key #:allow-other-keys)
+ (lambda _
;; remove dangling symlink to /usr/include/wine/windows
(delete-file "src/gallium/state_trackers/d3d1x/w32api"))
%standard-phases)))
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 0560915..49ffaa8 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -196,13 +196,11 @@ dynamic loading, and an object system.")
("libffi" ,libffi)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
+ (alist-cons-before
+ 'configure 'patch-paths
+ (lambda _
(substitute* "giscanner/sourcescanner.py"
- (("GUIX_GCC_PATH") (which "gcc")))
- (apply configure args)))
+ (("GUIX_GCC_PATH") (which "gcc"))))
%standard-phases)))
(home-page "https://wiki.gnome.org/GObjectIntrospection")
(synopsis "Generate interface introspection data for GObject libraries")
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 16ca8ae..f3fbef0 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -191,13 +191,11 @@ specifications are building blocks of S/MIME and TLS.")
("readline" ,readline)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "tests/openpgp/Makefile.in"
- (("/bin/sh") (which "bash")))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'patch-config-files
+ (lambda _
+ (substitute* "tests/openpgp/Makefile.in"
+ (("/bin/sh") (which "bash"))))
%standard-phases)))
(home-page "http://gnupg.org/")
(synopsis "GNU Privacy Guard")
@@ -286,12 +284,10 @@ and every application benefits from this.")
(arguments
`(#:tests? #f
#:phases
- (alist-replace
+ (alist-delete
'configure
- (lambda* (#:key #:allow-other-keys) #t)
- (alist-replace
+ (alist-delete
'build
- (lambda* (#:key #:allow-other-keys) #t)
(alist-replace
'install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -334,13 +330,9 @@ PGP keysigning parties.")
(arguments
`(#:tests? #f
#:phases
- (alist-replace
- 'unpack
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((unpack (assoc-ref %standard-phases 'unpack)))
- (apply unpack args)
- ;; remove spurious symlink
- (delete-file "keyanalyze/pgpring/depcomp")))
+ (alist-cons-after
+ 'unpack 'remove-spurious-links
+ (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))
(alist-replace
'configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -463,14 +455,12 @@ enter a passphrase when `gpg' or `gpg2' is run and needs
it.")
(build-system gnu-build-system)
(arguments
`(#:phases
- (alist-replace
- 'check
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((check (assoc-ref %standard-phases 'check)))
- (substitute* '("checks/roundtrip.sh"
- "checks/roundtrip-raw.sh")
- (("/bin/echo") "echo"))
- (apply check args)))
+ (alist-cons-before
+ 'check 'patch-check-scripts
+ (lambda _
+ (substitute* '("checks/roundtrip.sh"
+ "checks/roundtrip-raw.sh")
+ (("/bin/echo") "echo")))
%standard-phases)))
(home-page "http://www.jabberwocky.com/software/paperkey/")
(synopsis "Backup OpenPGP keys to paper")
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 2a01f89..fa92e5a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -331,14 +331,12 @@ is part of the GNOME accessibility project.")
("python-wrapper" ,python-wrapper)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- ;; FIXME: re-enable tests requiring an X server
- (substitute* "gtk/Makefile.in"
- (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'disable-tests
+ (lambda _
+ ;; FIXME: re-enable tests requiring an X server
+ (substitute* "gtk/Makefile.in"
+ (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
%standard-phases)))
(synopsis "Cross-platform toolkit for creating graphical user interfaces")
(description
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index aea5d2f..45dcfe2 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -51,21 +51,17 @@
(guix build utils)
(guix build rpath))
#:phases
- (alist-replace
- 'unpack
- (lambda* (#:key source #:allow-other-keys)
- (and (zero? (system* "tar" "xvf" source))
- (chdir "icu/source")))
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- ;; patch out two occurrences of /bin/sh from configure script
- ;; that might have disappeared in a release later than 52.1
- (substitute* "configure"
- (("`/bin/sh")
- (string-append "`" (which "bash"))))
- (apply configure args)))
+ (alist-cons-after
+ 'unpack 'chdir-to-source
+ (lambda _ (chdir "source"))
+ (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ ;; patch out two occurrences of /bin/sh from configure script
+ ;; that might have disappeared in a release later than 52.1
+ (substitute* "configure"
+ (("`/bin/sh")
+ (string-append "`" (which "bash")))))
(alist-cons-after
'strip 'add-lib-to-runpath
(lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/libtiff.scm b/gnu/packages/libtiff.scm
index f90a2d3..f4b72c8 100644
--- a/gnu/packages/libtiff.scm
+++ b/gnu/packages/libtiff.scm
@@ -47,14 +47,12 @@
(assoc-ref %build-inputs "libjpeg-8")
"/include"))
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("`/usr/bin/file")
- (string-append "`" (which "file"))))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ (substitute* "configure"
+ (("`/usr/bin/file")
+ (string-append "`" (which "file")))))
%standard-phases)))
(synopsis "Libtiff, a library for handling TIFF files")
(description
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index d0cdefd..fc5ddc9 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -41,13 +41,13 @@
#:phases
(alist-replace
'unpack
- (lambda* (#:key source name version #:allow-other-keys)
+ (lambda* (#:key source #:allow-other-keys)
(let ((unpack (assoc-ref %standard-phases 'unpack)))
- (apply unpack (list #:source source))
- (apply unpack (list #:source (car (find-files "." "\\.tar$"))))))
+ (unpack #:source source)
+ (unpack #:source (car (find-files "." "\\.tar$")))))
(alist-replace
'configure
- (lambda* (#:key #:allow-other-keys)
+ (lambda _
(setenv "LSOF_CC" "gcc")
(setenv "LSOF_MAKE" "make")
(system* "./Configure" "linux"))
diff --git a/gnu/packages/lvm.scm b/gnu/packages/lvm.scm
index 5fa73a6..82e93dc 100644
--- a/gnu/packages/lvm.scm
+++ b/gnu/packages/lvm.scm
@@ -46,14 +46,12 @@
#:configure-flags
`(,(string-append "--with-confdir=" (assoc-ref %outputs "out") "/etc"))
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "make.tmpl.in"
- (("/bin/sh") (which "sh"))
- (("CC \\?=") "CC =")) ; force CC argument to be set from
configure
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'patch-make-tmpl
+ (lambda _
+ (substitute* "make.tmpl.in"
+ (("/bin/sh") (which "sh"))
+ (("CC \\?=") "CC ="))) ; force CC argument to be set from configure
%standard-phases)))
(synopsis "logical volume management")
(description
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fe87e6d..e9d4816 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -250,20 +250,19 @@ plotting engine by third-party applications like Octave.")
(build-system gnu-build-system)
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key target system outputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("/bin/mv") "mv"))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ (substitute* "configure"
+ (("/bin/mv") "mv")))
%standard-phases)))
(outputs '("out" "bin" "lib" "include"))
(home-page "http://www.hdfgroup.org")
(synopsis "Management suite for extremely large and complex data")
(description "HDF5 is a suite that makes possible the management of
extremely large and complex data collections.")
- (license (license:x11-style
"http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
+ (license (license:x11-style
+
"http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
;; For a fully featured Octave, users are strongly recommended also to install
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index c64efe4..5eca6c3 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -50,13 +50,11 @@
(build-system gnu-build-system)
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- ;; remove option that is not supported by gcc any more
- (substitute* "configure" ((" -fforce-mem") ""))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'remove-unsupported-gcc-flags
+ (lambda _
+ ;; remove option that is not supported by gcc any more
+ (substitute* "configure" ((" -fforce-mem") "")))
%standard-phases)))
(synopsis "libmad, an MPEG audio decoder")
(description
@@ -105,20 +103,19 @@ versions of ID3v2")
(build-system gnu-build-system)
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("iomanip.h") "")) ; drop check for unused header
- ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
- (substitute* "include/id3/id3lib_strings.h"
- (("include <string>") "include <cstring>\n#include <string>"))
- (substitute* "include/id3/writers.h"
- (("//\\#include <string.h>") "#include <cstring>"))
- (substitute* "examples/test_io.cpp"
- (("dami;") "dami;\nusing namespace std;"))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'apply-patches
+ ;; TODO: create a patch for origin instead?
+ (lambda _
+ (substitute* "configure"
+ (("iomanip.h") "")) ; drop check for unused header
+ ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
+ (substitute* "include/id3/id3lib_strings.h"
+ (("include <string>") "include <cstring>\n#include <string>"))
+ (substitute* "include/id3/writers.h"
+ (("//\\#include <string.h>") "#include <cstring>"))
+ (substitute* "examples/test_io.cpp"
+ (("dami;") "dami;\nusing namespace std;")))
%standard-phases)))
(synopsis "a library for reading, writing, and manipulating ID3v1 and ID3v2
tags")
(description
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index 01d672e..64db777 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -64,7 +64,7 @@
`(#:phases
(alist-replace
'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
+ (lambda _
(copy-file "config.mk.in" "config.mk")
(let ((f (open-file "config.mk" "a")))
(display "CC=gcc\n" f)
@@ -77,30 +77,29 @@
(substitute* "converter/ppm/Makefile" (("hpcdtoppm") ""))
;; drop programs without license, see
;;
http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright
- (substitute* "converter/pbm/Makefile" (("pbmto4425") ""))
- (substitute* "converter/pbm/Makefile" (("pbmtoln03") ""))
- (substitute* "converter/pbm/Makefile" (("pbmtolps") ""))
- (substitute* "converter/pbm/Makefile" (("pbmtopk") ""))
- (substitute* "converter/pbm/Makefile" (("pktopbm") ""))
+ (substitute* "converter/pbm/Makefile"
+ (("pbmto4425") "")
+ (("pbmtoln03") "")
+ (("pbmtolps") "")
+ (("pbmtopk") "")
+ (("pktopbm") ""))
(substitute* "converter/pgm/Makefile" (("spottopgm") ""))
- (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))
- ))
- (alist-replace
- 'check
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((check (assoc-ref %standard-phases 'check)))
- ;; install temporarily into /tmp/netpbm
- (system* "make" "package")
- ;; remove test requiring X
- (substitute* "test/all-in-place.test" (("pamx") ""))
- ;; do not worry about non-existing file
- (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
- ;; remove four tests that fail for unknown reasons
- (substitute* "test/Test-Order" (("all-in-place.test") ""))
- (substitute* "test/Test-Order" (("pnmpsnr.test") ""))
- (substitute* "test/Test-Order" (("pnmremap1.test") ""))
- (substitute* "test/Test-Order" (("gif-roundtrip.test") ""))
- (apply check args)))
+ (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))))
+ (alist-cons-before
+ 'check 'setup-check
+ (lambda _
+ ;; install temporarily into /tmp/netpbm
+ (system* "make" "package")
+ ;; remove test requiring X
+ (substitute* "test/all-in-place.test" (("pamx") ""))
+ ;; do not worry about non-existing file
+ (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
+ ;; remove four tests that fail for unknown reasons
+ (substitute* "test/Test-Order"
+ (("all-in-place.test") "")
+ (("pnmpsnr.test") "")
+ (("pnmremap1.test") "")
+ (("gif-roundtrip.test") "")))
(alist-replace
'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index a4a28cc..574f119 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -57,14 +57,11 @@
(arguments
`(#:tests? #f
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (apply configure args)
- (copy-file (which "libtool") "libtool")))
+ (alist-cons-after
+ 'configure 'provide-libtool
+ (lambda _ (copy-file (which "libtool") "libtool"))
%standard-phases)))
- (synopsis "openldap, an implementation of the Lightweight Directory Access
Protocol")
+ (synopsis "Implementation of the Lightweight Directory Access Protocol")
(description
"OpenLDAP is a free implementation of the Lightweight Directory Access
Protocol.")
(license openldap2.8)
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 0bfbeb7..ea559ec 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -56,13 +56,11 @@
("perl" ,perl)
("file" ,file)))
(arguments
- '(#:phases (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("/usr/bin/file") (which "file")))
- (apply configure args)))
+ '(#:phases (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ (substitute* "configure"
+ (("/usr/bin/file") (which "file"))))
(alist-cons-before
'build 'patch-scripts
(lambda _
@@ -121,13 +119,11 @@ special cases, such as pretty-printing \"--help\"
output.")
(arguments
;; Must define DIFF_CMD for tests to pass
'(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"")
- #:phases (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("/usr/bin/file") (which "file")))
- (apply configure args)))
+ #:phases (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ (substitute* "configure"
+ (("/usr/bin/file") (which "file"))))
%standard-phases)))
(home-page "http://www.gnu.org/software/trueprint")
(synopsis "Pretty-print C sources and other plain text to PostScript")
@@ -189,16 +185,14 @@ different programming languages.")
(list (string-append "--with-boost="
(assoc-ref %build-inputs "boost")))
#:parallel-tests? #f ;There appear to be race conditions
- #:phases (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "configure"
- (("/usr/bin/file") (which "file")))
- (apply configure args)))
+ #:phases (alist-cons-before
+ 'configure 'patch-configure
+ (lambda _
+ (substitute* "configure"
+ (("/usr/bin/file") (which "file"))))
(alist-cons-before
'check 'patch-test-files
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda _
;; Unpatch shebangs in test input so that source-highlight
;; is still able to infer input language
(substitute* '("tests/test.sh"
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 01de2f6..6b4d450 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -139,18 +139,13 @@
(with-directory-excursion out
(for-each (cut augment-rpath <> lib)
(find-files "bin" ".*")))))
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "Lib/subprocess.py"
- (("args = \\[\"/bin/sh")
- (string-append "args = [\"" (which "sh"))))
- (substitute*
- '("Lib/distutils/tests/test_spawn.py"
- "Lib/test/test_subprocess.py")
- (("/bin/sh") (which "sh")))
- (apply configure args)))
+ (alist-cons-before
+ 'configure 'patch-lib-shells
+ (lambda _
+ (substitute* '("Lib/subprocess.py"
+ "Lib/distutils/tests/test_spawn.py"
+ "Lib/test/test_subprocess.py")
+ (("/bin/sh") (which "sh"))))
(alist-cons-before
'check 'pre-check
(lambda _
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index 837d616..e164bde 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -140,23 +140,19 @@ a server that supports the SSH-2 protocol.")
(arguments
`(#:test-target "tests"
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure))
- (out (assoc-ref outputs "out")))
- (apply configure args)
- (substitute* "Makefile"
- (("PRIVSEP_PATH=/var/empty")
- (string-append "PRIVSEP_PATH=" out "/var/empty")))))
- (alist-replace
- 'check
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((check (assoc-ref %standard-phases 'check)))
- ;; remove tests that require the user sshd
- (substitute* "regress/Makefile"
- (("t10 t-exec") "t10"))
- (apply check args)))
+ (alist-cons-after
+ 'configure 'reset-/var/empty
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "Makefile"
+ (("PRIVSEP_PATH=/var/empty")
+ (string-append "PRIVSEP_PATH=" out "/var/empty")))))
+ (alist-cons-before
+ 'check 'patch-tests
+ (lambda _
+ ;; remove tests that require the user sshd
+ (substitute* "regress/Makefile"
+ (("t10 t-exec") "t10")))
(alist-replace
'install
(lambda* (#:key (make-flags '()) #:allow-other-keys)
diff --git a/gnu/packages/tcsh.scm b/gnu/packages/tcsh.scm
index e153187..04f8139 100644
--- a/gnu/packages/tcsh.scm
+++ b/gnu/packages/tcsh.scm
@@ -45,23 +45,20 @@
("ncurses" ,ncurses)))
(arguments
`(#:phases
- (alist-replace
- 'check
- (lambda* (#:key inputs #:allow-other-keys #:rest args)
- (let ((check (assoc-ref %standard-phases 'check)))
- ;; Take care of pwd
- (substitute* '("tests/commands.at" "tests/variables.at")
- (("/bin/pwd") (which "pwd")))
- ;; The .at files create shell scripts without shebangs. Erk.
- (substitute* "tests/commands.at"
- (("./output.sh") "/bin/sh output.sh"))
- (substitute* "tests/syntax.at"
- (("; other_script.csh") "; /bin/sh other_script.csh"))
- ;; Now, let's generate the test suite, patch it and finally run the
- ;; tests.
- (system* "make" "tests/testsuite")
- (substitute* "tests/testsuite" (("/bin/sh") (which "sh")))
- (apply check args)))
+ (alist-cons-before
+ 'check 'patch-test-scripts
+ (lambda _
+ ;; Take care of pwd
+ (substitute* '("tests/commands.at" "tests/variables.at")
+ (("/bin/pwd") (which "pwd")))
+ ;; The .at files create shell scripts without shebangs. Erk.
+ (substitute* "tests/commands.at"
+ (("./output.sh") "/bin/sh output.sh"))
+ (substitute* "tests/syntax.at"
+ (("; other_script.csh") "; /bin/sh other_script.csh"))
+ ;; Now, let's generate the test suite and patch it
+ (system* "make" "tests/testsuite")
+ (substitute* "tests/testsuite" (("/bin/sh") (which "sh"))))
(alist-cons-after
'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys)
diff --git a/gnu/packages/texlive.scm b/gnu/packages/texlive.scm
index 92582a7..c2d5850 100644
--- a/gnu/packages/texlive.scm
+++ b/gnu/packages/texlive.scm
@@ -116,12 +116,10 @@
"--with-system-zziplib")
#:phases
(alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (substitute* "utils/psutils/Makefile.in"
- (("/usr/bin/env perl") (which "perl")))
- (apply configure args)))
+ 'configure 'patch-perl-shebang
+ (lambda _
+ (substitute* "utils/psutils/Makefile.in"
+ (("/usr/bin/env perl") (which "perl"))))
(alist-cons-after
'install 'postinst
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 41df90b..ef08bbe 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -117,15 +117,13 @@ as well as the classic centralized workflow.")
"/bin/wish8.6")) ; XXX
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (and (apply configure args)
- (substitute* "Makefile"
- (("/bin/sh") (which "sh"))
- (("/usr/bin/perl") (which "perl"))
- (("/usr/bin/python") (which "python"))))))
+ (alist-cons-after
+ 'configure 'patch-makefile-shebangs
+ (lambda _
+ (substitute* "Makefile"
+ (("/bin/sh") (which "sh"))
+ (("/usr/bin/perl") (which "perl"))
+ (("/usr/bin/python") (which "python"))))
(alist-cons-after
'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 4d05567..4a46a1c 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -44,15 +44,13 @@
`(#:test-target "test"
#:parallel-tests? #f
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key #:allow-other-keys #:rest args)
- (let ((configure (assoc-ref %standard-phases 'configure)))
- (apply configure args)
+ (alist-cons-after
+ 'configure 'patch-config-files
+ (lambda _
(substitute* "runtime/tools/mve.awk"
(("/usr/bin/nawk") (which "gawk")))
(substitute* "src/testdir/Makefile"
- (("/bin/sh") (which "sh")))))
+ (("/bin/sh") (which "sh"))))
%standard-phases)))
(inputs
`(("gawk", gawk)
@@ -61,7 +59,7 @@
("perl", perl)
("tcsh" ,tcsh))) ; For runtime/tools/vim32
(home-page "http://www.vim.org/")
- (synopsis "VIM 7.3, a text editor based on vi.")
+ (synopsis "Text editor based on vi")
(description
"Vim is a highly configurable text editor built to enable efficient text
editing. It is an improved version of the vi editor distributed with most UNIX
@@ -70,5 +68,5 @@ systems.
Vim is often called a \"programmer's editor,\" and so useful for programming
that many consider it an entire IDE. It's not just for programmers, though. Vim
is perfect for all kinds of text editing, from composing email to editing
-configuration files. ")
+configuration files.")
(license license:vim)))
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 6fff0db..f1db433 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <address@hidden>
;;; Copyright © 2013 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014 Eric Bavier <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,8 +99,8 @@ Only \"Universal TUN/TAP device driver support\" is needed in
the kernel.")
(version "4.99")
(source (origin
(method url-fetch)
- (uri (string-append
"ftp://ftp.infradead.org/pub/openconnect/openconnect-"
- version ".tar.gz"))
+ (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
+ "openconnect-" version ".tar.gz"))
(sha256 (base32
"1rd8pap455wzkx19i0sy3cqap524b6fwcjvqynxp6lhm01di4bd6"))))
(build-system gnu-build-system)
@@ -112,19 +113,10 @@ Only \"Universal TUN/TAP device driver support\" is
needed in the kernel.")
`(("gettext" ,gnu-gettext)
("pkg-config" ,pkg-config)))
(arguments
- `(#:phases
- (alist-replace
- 'configure
- (lambda* (#:key inputs #:allow-other-keys #:rest args)
- (let ((vpnc (assoc-ref inputs "vpnc"))
- (configure (assoc-ref %standard-phases 'configure)))
- (apply configure
- (append args
- (list '#:configure-flags
- (list (string-append "--with-vpnc-script="
- vpnc
-
"/etc/vpnc/vpnc-script")))))))
- %standard-phases)))
+ `(#:configure-flags
+ `(,(string-append "--with-vpnc-script="
+ (assoc-ref %build-inputs "vpnc")
+ "/etc/vpnc/vpnc-script"))))
(synopsis "Client for Cisco VPN")
(description
"OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
--
1.7.9.5
--
`~Eric
- [Patch] Remove unused lambda arguments and prefer separate phases over augmented phases.,
Eric Bavier <=