From d4bf49b140bd5cfb3580d2a038679160dc1331b5 Mon Sep 17 00:00:00 2001 From: Eric Bavier 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) [arguments]: 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 oinseparate 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 72f80062c13003d9168af97fd8073b6932f0d2c3..a4c6f53202cb32e6335696cd9d20cecc04427d0d 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 4c8fc3f2c7978a45fb07855f3fe346dca3f0c5c6..6390b50c7ffd4707893efe6c8103663fb5963d9f 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 127256a28efaccee686de43447cdfb488919b840..7bdd63e55ca0c0ed82591df762461b8bb3f4f50e 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 796f7f02112c2a52cb2e0fba1ad7a1cf3a2ba983..27415952e4792dd6636e291d54fb896473080fb7 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 0560915b24dbaa47cb7cb05f574360067d945c84..49ffaa8f6e937e434f33aa18c7b32c2b1daf7a13 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 16ca8ae661520a57ce23952423ba5c0ebead8f50..f3fbef06fe27fd8059b3ac2f12c71c66c36d574f 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 2a01f891b2e4c0a1e86a7373b9212b203a5138a3..fa92e5ab8cda1cefec83a8e66be09604ba40751d 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 aea5d2fae502dbeecb85666838a2e2ac7f0a8b9c..45dcfe2466752b5a2d6cb9c0cb01e5f06d10a47a 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 f90a2d38968b10ab24e9ab5e79afacb8ce319739..f4b72c80bc47ba7ac6cc3a85461f4f1d91df5549 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 d0cdefd533bbbdfcb0291195b20d60fa3a698048..fc5ddc9cda8863c8425f87f6871425df42b6770a 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 5fa73a67215b643f92a03d007cd9dda7669ac085..82e93dcc66f988d5761a218df3d0d476e9b42058 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 fe87e6d25a4f0784a8bd129ce485eb95645672ae..e9d481665f4e2d6509fada1da13d5db9eb0daa40 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 c64efe4c03574ad310f7e8a688c86de65f1a62ee..5eca6c3d35c75f0f29ca86a2c5c4eb5223ac27a5 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 ") "include \n#include ")) - (substitute* "include/id3/writers.h" - (("//\\#include ") "#include ")) - (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 ") "include \n#include ")) + (substitute* "include/id3/writers.h" + (("//\\#include ") "#include ")) + (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 01d672e01d205174ceb01896b98d4d2f13dd7b61..64db777c71e22edc6c1fbb5f512caf124c03ee1b 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 a4a28ccf1b156b24e1e3bf9fc4f962a5bfc985eb..574f11904aef176858a5633d559c53d2cb5f5fb1 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 0bfbeb7229b7784718a6ba1569e6bd13a84d91ea..ea559ec9365665f5ee0b7a976706e4c1f580d268 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 01de2f6a4a96a9b180915846ff46010f96253d29..6b4d450599fce113bbb9a4afc2026524772bfdf4 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 837d616c2196746d9617e19c7aa6808a6577a7f4..e164bdedaff3be534c12059b6d00391628283919 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 e1531874c095b03019dc00f902f33d7ec0a6224b..04f8139c0c5661ba83b1ccf59d0f250ca3421771 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 92582a7ef0cf33e04b2cf554d98f61ea15b4c703..c2d5850f7930344b5a54509da0a21f61741af040 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 41df90b8a71f8553db71b5a955f1aa450567bf91..ef08bbe5e88c4dadfef3f22a289e613fd9899784 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 4d05567a225aad3b1599c711ccb29b4f70bc72f3..4a46a1cd7d807b49dd91521253d7df4e30653ec4 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 6fff0dbe2312edff7ae9fde4598d633a7cf054a9..f1db433ba93df8f35bee2d97a23a850b4565d63a 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 ;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2014 Eric Bavier ;;; ;;; 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