From 6cbee49d6668eb7fd738080666f66febfce8c7e8 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 16 Mar 2018 07:47:34 -0400 Subject: gnu: All snippets report errors using exceptions, else return #t. * gnu/packages/admin.scm, gnu/packages/algebra.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/base.scm, gnu/packages/bioinformatics.scm, gnu/packages/cdrom.scm, gnu/packages/chez.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/cross-base.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dns.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/fpga.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/gcc.scm, gnu/packages/geo.scm, gnu/packages/ghostscript.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/graphics.scm, gnu/packages/gtk.scm, gnu/packages/guile.scm, gnu/packages/irc.scm, gnu/packages/java.scm, gnu/packages/kerberos.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lxde.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/maths.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/music.scm, gnu/packages/netpbm.scm, gnu/packages/networking.scm, gnu/packages/node.scm, gnu/packages/nvi.scm, gnu/packages/ocaml.scm, gnu/packages/pdf.scm, gnu/packages/perl.scm, gnu/packages/php.scm, gnu/packages/plotutils.scm, gnu/packages/pretty-print.scm, gnu/packages/profiling.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/robotics.scm, gnu/packages/sawfish.scm, gnu/packages/scanner.scm, gnu/packages/scheme.scm, gnu/packages/scribus.scm, gnu/packages/sdl.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/slang.scm, gnu/packages/smalltalk.scm, gnu/packages/ssh.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/tbb.scm, gnu/packages/terminals.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/tls.scm, gnu/packages/unrtf.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vpn.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: In all snippets, report errors using exceptions, or else return #t. --- gnu/packages/games.scm | 83 +++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 35 deletions(-) (limited to 'gnu/packages/games.scm') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 6d44d8d91e..543edbe94c 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -188,11 +188,13 @@ settings to tweak as well.") (modules '((guix build utils))) (snippet ;; Import cmath header for the std::pow function. - '(for-each (lambda (file) - (substitute* file - (("#include ") - "#include "))) - (find-files "src"))))) + '(begin + (for-each (lambda (file) + (substitute* file + (("#include ") + "#include "))) + (find-files "src")) + #t)))) (build-system gnu-build-system) (arguments '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) @@ -682,9 +684,11 @@ watch your CPU playing while enjoying a cup of tea!") "151v6nign86m1a2vqz27krsccpc9m4d1jax4y43v2fa82wfj9qp0")) (modules '((guix build utils))) (snippet - '(substitute* "src/version.c" - (("__DATE__") "") - (("__TIME__") ""))))) + '(begin + (substitute* "src/version.c" + (("__DATE__") "") + (("__TIME__") "")) + #t)))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--disable-cpu-opt") @@ -896,7 +900,9 @@ can be explored and changed freely.") (modules '((guix build utils))) (snippet ;; Unbundle fonts. - '(delete-file-recursively "fonts")))) + '(begin + (delete-file-recursively "fonts") + #t)))) (build-system gnu-build-system) (arguments '(#:make-flags '("CC=gcc") @@ -952,15 +958,15 @@ that beneath its ruins lay buried an ancient evil.") ;; In the future, if someone tries to make a graphical variant of ;; this package, they can deal with that mess themselves. :) '(begin - (for-each - (lambda (subdir) - (let ((lib-subdir (string-append "lib/" subdir))) - (delete-file-recursively lib-subdir))) - '("fonts" "icons" "sounds" "tiles")) + (for-each (lambda (subdir) + (let ((lib-subdir (string-append "lib/" subdir))) + (delete-file-recursively lib-subdir))) + '("fonts" "icons" "sounds" "tiles")) (substitute* "lib/Makefile" ;; And don't try to invoke makefiles in the directories we removed (("gamedata customize help screens fonts tiles sounds icons user") - "gamedata customize help screens user")))))) + "gamedata customize help screens user")) + #t)))) (build-system gnu-build-system) (arguments `(#:tests? #f ;no check target @@ -1281,11 +1287,13 @@ destroy, the better your score. The person with the highest score wins.") ;; We do not provide `ncurses.h' within an `ncursesw' ;; sub-directory, so patch the source accordingly. See ;; . - '(for-each (lambda (file) - (substitute* file - (("ncursesw/ncurses.h") - "ncurses.h"))) - (find-files "." "configure$|\\.c$"))))) + '(begin + (for-each (lambda (file) + (substitute* file + (("ncursesw/ncurses.h") + "ncurses.h"))) + (find-files "." "configure$|\\.c$")) + #t)))) (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses) ("perl" ,perl))) @@ -1989,7 +1997,9 @@ world}, @uref{http://evolonline.org, Evol Online} and (modules '((guix build utils))) (snippet ;; The DOS port contains proprietary software. - '(delete-file-recursively "os/dos")))) + '(begin + (delete-file-recursively "os/dos") + #t)))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no "check" target @@ -2839,7 +2849,8 @@ safety of the Chromium vessel.") (substitute* "Makefile" ;; Do not rely on $(GPERF) being an absolute file name (("\\[ -x \\$\\(GPERF\\) \\]") - "$(GPERF) --version >/dev/null 2>&1")))) + "$(GPERF) --version >/dev/null 2>&1")) + #t)) (patches (search-patches "tuxpaint-stamps-path.patch")))) (build-system gnu-build-system) (native-inputs @@ -4050,14 +4061,13 @@ fight against their plot and save his fellow rabbits from slavery.") (modules '((guix build utils))) (snippet #~(begin - (for-each - (lambda (name) - (let* ((dir (string-append "binaries/data/mods/" name)) - (file (string-append dir "/" name ".zip")) - (unzip #$(file-append unzip "/bin/unzip"))) - (system* unzip "-d" dir file) - (delete-file file))) - '("mod" "public")) + (for-each (lambda (name) + (let* ((dir (string-append "binaries/data/mods/" name)) + (file (string-append dir "/" name ".zip")) + (unzip #$(file-append unzip "/bin/unzip"))) + (system* unzip "-d" dir file) + (delete-file file))) + '("mod" "public")) #t)))) (build-system trivial-build-system) (native-inputs `(("tar" ,tar) @@ -4292,10 +4302,12 @@ Crowther & Woods, its original authors, in 1995. It has been known as "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03")) (modules '((guix build utils))) (snippet - '(substitute* '("src/music.h" "src/tSDL.h") - (("#elif defined(__FreeBSD__)" line) - (string-append - line " || defined(__GNUC__)")))))) + '(begin + (substitute* '("src/music.h" "src/tSDL.h") + (("#elif defined(__FreeBSD__)" line) + (string-append + line " || defined(__GNUC__)"))) + #t)))) (build-system gnu-build-system) (native-inputs `(("unzip" ,unzip))) @@ -4777,7 +4789,8 @@ You can save humanity and get programming skills!") (delete-file-recursively "bzip2") (delete-file-recursively "game-music-emu") (delete-file-recursively "jpeg-6b") - (delete-file-recursively "zlib"))))) + (delete-file-recursively "zlib") + #t)))) (arguments '(#:tests? #f #:configure-flags -- cgit v1.2.3