3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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
This commit is contained in:
Eric Bavier 2014-03-30 18:09:10 -05:00
parent 36b5851df6
commit d4bf49b140
23 changed files with 202 additions and 277 deletions

View file

@ -280,7 +280,7 @@ archiving. Lzip is a clean implementation of the LZMA algorithm.")
'patch-source-shebangs 'unpatch-source-shebang 'patch-source-shebangs 'unpatch-source-shebang
;; revert the patch-shebang phase on a script which is ;; revert the patch-shebang phase on a script which is
;; in fact test data ;; in fact test data
(lambda* (#:key #:allow-other-keys) (lambda _
(substitute* "tests/shar-1.ok" (substitute* "tests/shar-1.ok"
(((which "sh")) "/bin/sh"))) (((which "sh")) "/bin/sh")))
%standard-phases))) %standard-phases)))

View file

@ -40,19 +40,14 @@
`(("libx11" ,libx11) `(("libx11" ,libx11)
("mesa" ,mesa))) ("mesa" ,mesa)))
(arguments (arguments
`(#:phases `(#:tests? #f ;TODO: compile programs in "test" dir
(alist-replace #:phases
'check (alist-cons-before
(lambda* (#:key inputs #:allow-other-keys) #t) ;; fltk does not have a 'configure 'patch-makeinclude
;; check target (lambda _
(alist-replace (substitute* "makeinclude.in"
'configure (("/bin/sh") (which "sh"))))
(lambda* (#:key outputs #:allow-other-keys #:rest args) %standard-phases)))
(let ((configure (assoc-ref %standard-phases 'configure)))
(substitute* "makeinclude.in"
(("/bin/sh") (which "sh")))
(apply configure args)))
%standard-phases))))
(home-page "https://www.fltk.org") (home-page "https://www.fltk.org")
(synopsis "3D C++ GUI library") (synopsis "3D C++ GUI library")
(description "FLTK is a C++ GUI toolkit providing modern GUI functionality without the (description "FLTK is a C++ GUI toolkit providing modern GUI functionality without the

View file

@ -142,27 +142,19 @@ printing, and psresize, for adjusting page sizes.")
("tcl" ,tcl))) ("tcl" ,tcl)))
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-after
'configure 'configure 'patch-config-files
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "base/all-arch.mak"
(apply configure args) (("/bin/sh") (which "bash")))
(substitute* "base/all-arch.mak" (substitute* "base/unixhead.mak"
(("/bin/sh") (which "bash"))) (("/bin/sh") (which "bash"))))
(substitute* "base/unixhead.mak" (alist-cons-after
(("/bin/sh") (which "bash"))))) 'build 'build-so
(alist-replace (lambda _ (system* "make" "so"))
'build (alist-cons-after
(lambda* (#:key #:allow-other-keys #:rest args) 'install 'install-so
(let ((build (assoc-ref %standard-phases 'build))) (lambda _ (system* "make" "install-so"))
(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")))
%standard-phases))))) %standard-phases)))))
(synopsis "PostScript and PDF interpreter") (synopsis "PostScript and PDF interpreter")
(description (description

View file

@ -159,7 +159,7 @@ Polygon meshes, and Extruded polygon meshes")
#:phases #:phases
(alist-cons-after (alist-cons-after
'unpack 'remove-symlink 'unpack 'remove-symlink
(lambda* (#:key #:allow-other-keys) (lambda _
;; remove dangling symlink to /usr/include/wine/windows ;; remove dangling symlink to /usr/include/wine/windows
(delete-file "src/gallium/state_trackers/d3d1x/w32api")) (delete-file "src/gallium/state_trackers/d3d1x/w32api"))
%standard-phases))) %standard-phases)))

View file

@ -196,13 +196,11 @@ dynamic loading, and an object system.")
("libffi" ,libffi))) ("libffi" ,libffi)))
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'patch-paths
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure)))
(substitute* "giscanner/sourcescanner.py" (substitute* "giscanner/sourcescanner.py"
(("GUIX_GCC_PATH") (which "gcc"))) (("GUIX_GCC_PATH") (which "gcc"))))
(apply configure args)))
%standard-phases))) %standard-phases)))
(home-page "https://wiki.gnome.org/GObjectIntrospection") (home-page "https://wiki.gnome.org/GObjectIntrospection")
(synopsis "Generate interface introspection data for GObject libraries") (synopsis "Generate interface introspection data for GObject libraries")

View file

@ -191,13 +191,11 @@ specifications are building blocks of S/MIME and TLS.")
("readline" ,readline))) ("readline" ,readline)))
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'patch-config-files
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "tests/openpgp/Makefile.in"
(substitute* "tests/openpgp/Makefile.in" (("/bin/sh") (which "bash"))))
(("/bin/sh") (which "bash")))
(apply configure args)))
%standard-phases))) %standard-phases)))
(home-page "http://gnupg.org/") (home-page "http://gnupg.org/")
(synopsis "GNU Privacy Guard") (synopsis "GNU Privacy Guard")
@ -286,12 +284,10 @@ and every application benefits from this.")
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases #:phases
(alist-replace (alist-delete
'configure 'configure
(lambda* (#:key #:allow-other-keys) #t) (alist-delete
(alist-replace
'build 'build
(lambda* (#:key #:allow-other-keys) #t)
(alist-replace (alist-replace
'install 'install
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
@ -334,13 +330,9 @@ PGP keysigning parties.")
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases #:phases
(alist-replace (alist-cons-after
'unpack 'unpack 'remove-spurious-links
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))
(let ((unpack (assoc-ref %standard-phases 'unpack)))
(apply unpack args)
;; remove spurious symlink
(delete-file "keyanalyze/pgpring/depcomp")))
(alist-replace (alist-replace
'configure 'configure
(lambda* (#:key outputs #:allow-other-keys) (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) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'check 'check 'patch-check-scripts
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((check (assoc-ref %standard-phases 'check))) (substitute* '("checks/roundtrip.sh"
(substitute* '("checks/roundtrip.sh" "checks/roundtrip-raw.sh")
"checks/roundtrip-raw.sh") (("/bin/echo") "echo")))
(("/bin/echo") "echo"))
(apply check args)))
%standard-phases))) %standard-phases)))
(home-page "http://www.jabberwocky.com/software/paperkey/") (home-page "http://www.jabberwocky.com/software/paperkey/")
(synopsis "Backup OpenPGP keys to paper") (synopsis "Backup OpenPGP keys to paper")

View file

@ -331,14 +331,12 @@ is part of the GNOME accessibility project.")
("python-wrapper" ,python-wrapper))) ("python-wrapper" ,python-wrapper)))
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'disable-tests
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) ;; FIXME: re-enable tests requiring an X server
;; FIXME: re-enable tests requiring an X server (substitute* "gtk/Makefile.in"
(substitute* "gtk/Makefile.in" (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
(("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
(apply configure args)))
%standard-phases))) %standard-phases)))
(synopsis "Cross-platform toolkit for creating graphical user interfaces") (synopsis "Cross-platform toolkit for creating graphical user interfaces")
(description (description

View file

@ -51,21 +51,17 @@
(guix build utils) (guix build utils)
(guix build rpath)) (guix build rpath))
#:phases #:phases
(alist-replace (alist-cons-after
'unpack 'unpack 'chdir-to-source
(lambda* (#:key source #:allow-other-keys) (lambda _ (chdir "source"))
(and (zero? (system* "tar" "xvf" source)) (alist-cons-before
(chdir "icu/source"))) 'configure 'patch-configure
(alist-replace (lambda _
'configure ;; patch out two occurrences of /bin/sh from configure script
(lambda* (#:key #:allow-other-keys #:rest args) ;; that might have disappeared in a release later than 52.1
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
;; patch out two occurrences of /bin/sh from configure script (("`/bin/sh")
;; that might have disappeared in a release later than 52.1 (string-append "`" (which "bash")))))
(substitute* "configure"
(("`/bin/sh")
(string-append "`" (which "bash"))))
(apply configure args)))
(alist-cons-after (alist-cons-after
'strip 'add-lib-to-runpath 'strip 'add-lib-to-runpath
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)

View file

@ -47,14 +47,12 @@
(assoc-ref %build-inputs "libjpeg-8") (assoc-ref %build-inputs "libjpeg-8")
"/include")) "/include"))
#:phases #:phases
(alist-replace (alist-cons-before
'configure 'configure 'patch-configure
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
(substitute* "configure" (("`/usr/bin/file")
(("`/usr/bin/file") (string-append "`" (which "file")))))
(string-append "`" (which "file"))))
(apply configure args)))
%standard-phases))) %standard-phases)))
(synopsis "Libtiff, a library for handling TIFF files") (synopsis "Libtiff, a library for handling TIFF files")
(description (description

View file

@ -41,13 +41,13 @@
#:phases #:phases
(alist-replace (alist-replace
'unpack 'unpack
(lambda* (#:key source name version #:allow-other-keys) (lambda* (#:key source #:allow-other-keys)
(let ((unpack (assoc-ref %standard-phases 'unpack))) (let ((unpack (assoc-ref %standard-phases 'unpack)))
(apply unpack (list #:source source)) (unpack #:source source)
(apply unpack (list #:source (car (find-files "." "\\.tar$")))))) (unpack #:source (car (find-files "." "\\.tar$")))))
(alist-replace (alist-replace
'configure 'configure
(lambda* (#:key #:allow-other-keys) (lambda _
(setenv "LSOF_CC" "gcc") (setenv "LSOF_CC" "gcc")
(setenv "LSOF_MAKE" "make") (setenv "LSOF_MAKE" "make")
(system* "./Configure" "linux")) (system* "./Configure" "linux"))

View file

@ -46,14 +46,12 @@
#:configure-flags #:configure-flags
`(,(string-append "--with-confdir=" (assoc-ref %outputs "out") "/etc")) `(,(string-append "--with-confdir=" (assoc-ref %outputs "out") "/etc"))
#:phases #:phases
(alist-replace (alist-cons-before
'configure 'configure 'patch-make-tmpl
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "make.tmpl.in"
(substitute* "make.tmpl.in" (("/bin/sh") (which "sh"))
(("/bin/sh") (which "sh")) (("CC \\?=") "CC ="))) ; force CC argument to be set from configure
(("CC \\?=") "CC =")) ; force CC argument to be set from configure
(apply configure args)))
%standard-phases))) %standard-phases)))
(synopsis "logical volume management") (synopsis "logical volume management")
(description (description

View file

@ -250,20 +250,19 @@ plotting engine by third-party applications like Octave.")
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'patch-configure
(lambda* (#:key target system outputs #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
(substitute* "configure" (("/bin/mv") "mv")))
(("/bin/mv") "mv"))
(apply configure args)))
%standard-phases))) %standard-phases)))
(outputs '("out" "bin" "lib" "include")) (outputs '("out" "bin" "lib" "include"))
(home-page "http://www.hdfgroup.org") (home-page "http://www.hdfgroup.org")
(synopsis "Management suite for extremely large and complex data") (synopsis "Management suite for extremely large and complex data")
(description "HDF5 is a suite that makes possible the management of (description "HDF5 is a suite that makes possible the management of
extremely large and complex data collections.") 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 ;; For a fully featured Octave, users are strongly recommended also to install

View file

@ -50,13 +50,11 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'remove-unsupported-gcc-flags
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) ;; remove option that is not supported by gcc any more
;; remove option that is not supported by gcc any more (substitute* "configure" ((" -fforce-mem") "")))
(substitute* "configure" ((" -fforce-mem") ""))
(apply configure args)))
%standard-phases))) %standard-phases)))
(synopsis "libmad, an MPEG audio decoder") (synopsis "libmad, an MPEG audio decoder")
(description (description
@ -105,20 +103,19 @@ versions of ID3v2")
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'configure 'configure 'apply-patches
(lambda* (#:key #:allow-other-keys #:rest args) ;; TODO: create a patch for origin instead?
(let ((configure (assoc-ref %standard-phases 'configure))) (lambda _
(substitute* "configure" (substitute* "configure"
(("iomanip.h") "")) ; drop check for unused header (("iomanip.h") "")) ; drop check for unused header
;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/ ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
(substitute* "include/id3/id3lib_strings.h" (substitute* "include/id3/id3lib_strings.h"
(("include <string>") "include <cstring>\n#include <string>")) (("include <string>") "include <cstring>\n#include <string>"))
(substitute* "include/id3/writers.h" (substitute* "include/id3/writers.h"
(("//\\#include <string.h>") "#include <cstring>")) (("//\\#include <string.h>") "#include <cstring>"))
(substitute* "examples/test_io.cpp" (substitute* "examples/test_io.cpp"
(("dami;") "dami;\nusing namespace std;")) (("dami;") "dami;\nusing namespace std;")))
(apply configure args)))
%standard-phases))) %standard-phases)))
(synopsis "a library for reading, writing, and manipulating ID3v1 and ID3v2 tags") (synopsis "a library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
(description (description

View file

@ -64,7 +64,7 @@
`(#:phases `(#:phases
(alist-replace (alist-replace
'configure 'configure
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(copy-file "config.mk.in" "config.mk") (copy-file "config.mk.in" "config.mk")
(let ((f (open-file "config.mk" "a"))) (let ((f (open-file "config.mk" "a")))
(display "CC=gcc\n" f) (display "CC=gcc\n" f)
@ -77,30 +77,29 @@
(substitute* "converter/ppm/Makefile" (("hpcdtoppm") "")) (substitute* "converter/ppm/Makefile" (("hpcdtoppm") ""))
;; drop programs without license, see ;; drop programs without license, see
;; http://packages.debian.org/changelogs/pool/main/n/netpbm-free/netpbm-free_10.0-12.2/libnetpbm10.copyright ;; 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"
(substitute* "converter/pbm/Makefile" (("pbmtoln03") "")) (("pbmto4425") "")
(substitute* "converter/pbm/Makefile" (("pbmtolps") "")) (("pbmtoln03") "")
(substitute* "converter/pbm/Makefile" (("pbmtopk") "")) (("pbmtolps") "")
(substitute* "converter/pbm/Makefile" (("pktopbm") "")) (("pbmtopk") "")
(("pktopbm") ""))
(substitute* "converter/pgm/Makefile" (("spottopgm") "")) (substitute* "converter/pgm/Makefile" (("spottopgm") ""))
(substitute* "converter/ppm/Makefile" (("ppmtopjxl") "")) (substitute* "converter/ppm/Makefile" (("ppmtopjxl") ""))))
)) (alist-cons-before
(alist-replace 'check 'setup-check
'check (lambda _
(lambda* (#:key #:allow-other-keys #:rest args) ;; install temporarily into /tmp/netpbm
(let ((check (assoc-ref %standard-phases 'check))) (system* "make" "package")
;; install temporarily into /tmp/netpbm ;; remove test requiring X
(system* "make" "package") (substitute* "test/all-in-place.test" (("pamx") ""))
;; remove test requiring X ;; do not worry about non-existing file
(substitute* "test/all-in-place.test" (("pamx") "")) (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
;; do not worry about non-existing file ;; remove four tests that fail for unknown reasons
(substitute* "test/all-in-place.test" (("^rm ") "rm -f ")) (substitute* "test/Test-Order"
;; remove four tests that fail for unknown reasons (("all-in-place.test") "")
(substitute* "test/Test-Order" (("all-in-place.test") "")) (("pnmpsnr.test") "")
(substitute* "test/Test-Order" (("pnmpsnr.test") "")) (("pnmremap1.test") "")
(substitute* "test/Test-Order" (("pnmremap1.test") "")) (("gif-roundtrip.test") "")))
(substitute* "test/Test-Order" (("gif-roundtrip.test") ""))
(apply check args)))
(alist-replace (alist-replace
'install 'install
(lambda* (#:key outputs make-flags #:allow-other-keys) (lambda* (#:key outputs make-flags #:allow-other-keys)

View file

@ -57,14 +57,11 @@
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases #:phases
(alist-replace (alist-cons-after
'configure 'configure 'provide-libtool
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _ (copy-file (which "libtool") "libtool"))
(let ((configure (assoc-ref %standard-phases 'configure)))
(apply configure args)
(copy-file (which "libtool") "libtool")))
%standard-phases))) %standard-phases)))
(synopsis "openldap, an implementation of the Lightweight Directory Access Protocol") (synopsis "Implementation of the Lightweight Directory Access Protocol")
(description (description
"OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
(license openldap2.8) (license openldap2.8)

View file

@ -56,13 +56,11 @@
("perl" ,perl) ("perl" ,perl)
("file" ,file))) ("file" ,file)))
(arguments (arguments
'(#:phases (alist-replace '(#:phases (alist-cons-before
'configure 'configure 'patch-configure
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
(substitute* "configure" (("/usr/bin/file") (which "file"))))
(("/usr/bin/file") (which "file")))
(apply configure args)))
(alist-cons-before (alist-cons-before
'build 'patch-scripts 'build 'patch-scripts
(lambda _ (lambda _
@ -121,13 +119,11 @@ special cases, such as pretty-printing \"--help\" output.")
(arguments (arguments
;; Must define DIFF_CMD for tests to pass ;; Must define DIFF_CMD for tests to pass
'(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"") '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"")
#:phases (alist-replace #:phases (alist-cons-before
'configure 'configure 'patch-configure
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
(substitute* "configure" (("/usr/bin/file") (which "file"))))
(("/usr/bin/file") (which "file")))
(apply configure args)))
%standard-phases))) %standard-phases)))
(home-page "http://www.gnu.org/software/trueprint") (home-page "http://www.gnu.org/software/trueprint")
(synopsis "Pretty-print C sources and other plain text to PostScript") (synopsis "Pretty-print C sources and other plain text to PostScript")
@ -189,16 +185,14 @@ different programming languages.")
(list (string-append "--with-boost=" (list (string-append "--with-boost="
(assoc-ref %build-inputs "boost"))) (assoc-ref %build-inputs "boost")))
#:parallel-tests? #f ;There appear to be race conditions #:parallel-tests? #f ;There appear to be race conditions
#:phases (alist-replace #:phases (alist-cons-before
'configure 'configure 'patch-configure
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "configure"
(substitute* "configure" (("/usr/bin/file") (which "file"))))
(("/usr/bin/file") (which "file")))
(apply configure args)))
(alist-cons-before (alist-cons-before
'check 'patch-test-files 'check 'patch-test-files
(lambda* (#:key inputs #:allow-other-keys) (lambda _
;; Unpatch shebangs in test input so that source-highlight ;; Unpatch shebangs in test input so that source-highlight
;; is still able to infer input language ;; is still able to infer input language
(substitute* '("tests/test.sh" (substitute* '("tests/test.sh"

View file

@ -139,18 +139,13 @@
(with-directory-excursion out (with-directory-excursion out
(for-each (cut augment-rpath <> lib) (for-each (cut augment-rpath <> lib)
(find-files "bin" ".*"))))) (find-files "bin" ".*")))))
(alist-replace (alist-cons-before
'configure 'configure 'patch-lib-shells
(lambda* (#:key outputs #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* '("Lib/subprocess.py"
(substitute* "Lib/subprocess.py" "Lib/distutils/tests/test_spawn.py"
(("args = \\[\"/bin/sh") "Lib/test/test_subprocess.py")
(string-append "args = [\"" (which "sh")))) (("/bin/sh") (which "sh"))))
(substitute*
'("Lib/distutils/tests/test_spawn.py"
"Lib/test/test_subprocess.py")
(("/bin/sh") (which "sh")))
(apply configure args)))
(alist-cons-before (alist-cons-before
'check 'pre-check 'check 'pre-check
(lambda _ (lambda _

View file

@ -140,23 +140,19 @@ a server that supports the SSH-2 protocol.")
(arguments (arguments
`(#:test-target "tests" `(#:test-target "tests"
#:phases #:phases
(alist-replace (alist-cons-after
'configure 'configure 'reset-/var/empty
(lambda* (#:key outputs #:allow-other-keys #:rest args) (lambda* (#:key outputs #:allow-other-keys)
(let ((configure (assoc-ref %standard-phases 'configure)) (let ((out (assoc-ref outputs "out")))
(out (assoc-ref outputs "out"))) (substitute* "Makefile"
(apply configure args) (("PRIVSEP_PATH=/var/empty")
(substitute* "Makefile" (string-append "PRIVSEP_PATH=" out "/var/empty")))))
(("PRIVSEP_PATH=/var/empty") (alist-cons-before
(string-append "PRIVSEP_PATH=" out "/var/empty"))))) 'check 'patch-tests
(alist-replace (lambda _
'check ;; remove tests that require the user sshd
(lambda* (#:key #:allow-other-keys #:rest args) (substitute* "regress/Makefile"
(let ((check (assoc-ref %standard-phases 'check))) (("t10 t-exec") "t10")))
;; remove tests that require the user sshd
(substitute* "regress/Makefile"
(("t10 t-exec") "t10"))
(apply check args)))
(alist-replace (alist-replace
'install 'install
(lambda* (#:key (make-flags '()) #:allow-other-keys) (lambda* (#:key (make-flags '()) #:allow-other-keys)

View file

@ -45,23 +45,20 @@
("ncurses" ,ncurses))) ("ncurses" ,ncurses)))
(arguments (arguments
`(#:phases `(#:phases
(alist-replace (alist-cons-before
'check 'check 'patch-test-scripts
(lambda* (#:key inputs #:allow-other-keys #:rest args) (lambda _
(let ((check (assoc-ref %standard-phases 'check))) ;; Take care of pwd
;; Take care of pwd (substitute* '("tests/commands.at" "tests/variables.at")
(substitute* '("tests/commands.at" "tests/variables.at") (("/bin/pwd") (which "pwd")))
(("/bin/pwd") (which "pwd"))) ;; The .at files create shell scripts without shebangs. Erk.
;; The .at files create shell scripts without shebangs. Erk. (substitute* "tests/commands.at"
(substitute* "tests/commands.at" (("./output.sh") "/bin/sh output.sh"))
(("./output.sh") "/bin/sh output.sh")) (substitute* "tests/syntax.at"
(substitute* "tests/syntax.at" (("; other_script.csh") "; /bin/sh other_script.csh"))
(("; other_script.csh") "; /bin/sh other_script.csh")) ;; Now, let's generate the test suite and patch it
;; Now, let's generate the test suite, patch it and finally run the (system* "make" "tests/testsuite")
;; tests. (substitute* "tests/testsuite" (("/bin/sh") (which "sh"))))
(system* "make" "tests/testsuite")
(substitute* "tests/testsuite" (("/bin/sh") (which "sh")))
(apply check args)))
(alist-cons-after (alist-cons-after
'install 'post-install 'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)

View file

@ -116,12 +116,10 @@
"--with-system-zziplib") "--with-system-zziplib")
#:phases #:phases
(alist-replace (alist-replace
'configure 'configure 'patch-perl-shebang
(lambda* (#:key outputs #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "utils/psutils/Makefile.in"
(substitute* "utils/psutils/Makefile.in" (("/usr/bin/env perl") (which "perl"))))
(("/usr/bin/env perl") (which "perl")))
(apply configure args)))
(alist-cons-after (alist-cons-after
'install 'postinst 'install 'postinst
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args) (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)

View file

@ -117,15 +117,13 @@ as well as the classic centralized workflow.")
"/bin/wish8.6")) ; XXX "/bin/wish8.6")) ; XXX
#:phases #:phases
(alist-replace (alist-cons-after
'configure 'configure 'patch-makefile-shebangs
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure))) (substitute* "Makefile"
(and (apply configure args) (("/bin/sh") (which "sh"))
(substitute* "Makefile" (("/usr/bin/perl") (which "perl"))
(("/bin/sh") (which "sh")) (("/usr/bin/python") (which "python"))))
(("/usr/bin/perl") (which "perl"))
(("/usr/bin/python") (which "python"))))))
(alist-cons-after (alist-cons-after
'install 'split 'install 'split
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)

View file

@ -44,15 +44,13 @@
`(#:test-target "test" `(#:test-target "test"
#:parallel-tests? #f #:parallel-tests? #f
#:phases #:phases
(alist-replace (alist-cons-after
'configure 'configure 'patch-config-files
(lambda* (#:key #:allow-other-keys #:rest args) (lambda _
(let ((configure (assoc-ref %standard-phases 'configure)))
(apply configure args)
(substitute* "runtime/tools/mve.awk" (substitute* "runtime/tools/mve.awk"
(("/usr/bin/nawk") (which "gawk"))) (("/usr/bin/nawk") (which "gawk")))
(substitute* "src/testdir/Makefile" (substitute* "src/testdir/Makefile"
(("/bin/sh") (which "sh"))))) (("/bin/sh") (which "sh"))))
%standard-phases))) %standard-phases)))
(inputs (inputs
`(("gawk", gawk) `(("gawk", gawk)
@ -61,7 +59,7 @@
("perl", perl) ("perl", perl)
("tcsh" ,tcsh))) ; For runtime/tools/vim32 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
(home-page "http://www.vim.org/") (home-page "http://www.vim.org/")
(synopsis "VIM 7.3, a text editor based on vi.") (synopsis "Text editor based on vi")
(description (description
"Vim is a highly configurable text editor built to enable efficient text "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 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 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 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 is perfect for all kinds of text editing, from composing email to editing
configuration files. ") configuration files.")
(license license:vim))) (license license:vim)))

View file

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; 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") (version "4.99")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "ftp://ftp.infradead.org/pub/openconnect/openconnect-" (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
version ".tar.gz")) "openconnect-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"1rd8pap455wzkx19i0sy3cqap524b6fwcjvqynxp6lhm01di4bd6")))) "1rd8pap455wzkx19i0sy3cqap524b6fwcjvqynxp6lhm01di4bd6"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -112,19 +113,10 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
`(("gettext" ,gnu-gettext) `(("gettext" ,gnu-gettext)
("pkg-config" ,pkg-config))) ("pkg-config" ,pkg-config)))
(arguments (arguments
`(#:phases `(#:configure-flags
(alist-replace `(,(string-append "--with-vpnc-script="
'configure (assoc-ref %build-inputs "vpnc")
(lambda* (#:key inputs #:allow-other-keys #:rest args) "/etc/vpnc/vpnc-script"))))
(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)))
(synopsis "Client for Cisco VPN") (synopsis "Client for Cisco VPN")
(description (description
"OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is