gnu: games: Use ‘modify-phases’.

* gnu/packages/games.scm (pingus, cmatrix, freedink-data, xboing, irrlicht,
glkterm, glulx, retroarch)[arguments]: Use ‘modify-phases’ syntax.
This commit is contained in:
Tobias Geerinckx-Rice 2017-03-29 19:41:26 +02:00
parent 92bdf77790
commit 3f12714742
No known key found for this signature in database
GPG Key ID: 91CCDB9B48541B99
1 changed files with 94 additions and 94 deletions

View File

@ -470,15 +470,13 @@ fight Morgoth, the Lord of Darkness.")
(arguments (arguments
'(#:tests? #f ; no check target '(#:tests? #f ; no check target
#:phases #:phases
(alist-delete (modify-phases %standard-phases
'configure (delete 'configure) ; no configure script
(alist-replace (replace 'install
'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(zero? (system* "make" "install" (zero? (system* "make" "install"
(string-append "PREFIX=" (string-append "PREFIX="
(assoc-ref outputs "out"))))) (assoc-ref outputs "out")))))))))
%standard-phases))))
(home-page "http://pingus.seul.org/welcome.html") (home-page "http://pingus.seul.org/welcome.html")
(synopsis "Lemmings clone") (synopsis "Lemmings clone")
(description (description
@ -525,16 +523,16 @@ a C library, so they can easily be integrated into other programs.")
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases '(#:phases
(alist-replace 'configure (modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; This old `configure' script doesn't support ;; This old configure script doesn't support
;; variables passed as arguments. ;; variables passed as arguments.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(setenv "CONFIG_SHELL" (which "bash")) (setenv "CONFIG_SHELL" (which "bash"))
(zero? (zero?
(system* "./configure" (system* "./configure"
(string-append "--prefix=" out))))) (string-append "--prefix=" out)))))))))
%standard-phases)))
(inputs `(("ncurses" ,ncurses))) (inputs `(("ncurses" ,ncurses)))
(home-page "http://www.asty.org/cmatrix") (home-page "http://www.asty.org/cmatrix")
(synopsis "Simulate the display from \"The Matrix\"") (synopsis "Simulate the display from \"The Matrix\"")
@ -608,7 +606,10 @@ To that extent, it also includes a front-end for managing all of your D-Mods.")
"04f1aa8gfz30qkgv7chjz5n1s8v5hbqs01h2113cq1ylm3isd5sp")))) "04f1aa8gfz30qkgv7chjz5n1s8v5hbqs01h2113cq1ylm3isd5sp"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (alist-delete 'configure (alist-delete 'check %standard-phases)) `(#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
(delete 'check)) ; no tests
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
(home-page "http://www.gnu.org/software/freedink/") (home-page "http://www.gnu.org/software/freedink/")
(synopsis "Game data for GNU Freedink") (synopsis "Game data for GNU Freedink")
@ -688,13 +689,14 @@ Portable Game Notation.")
(arguments (arguments
`(#:tests? #f `(#:tests? #f
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'configure (replace 'configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(substitute* "Imakefile" (substitute* "Imakefile"
(("XPMINCLUDE[\t ]*= -I/usr/X11/include/X11") (("XPMINCLUDE[\t ]*= -I/usr/X11/include/X11")
(string-append "XPMINCLUDE = -I" (assoc-ref %build-inputs "libxpm") (string-append "XPMINCLUDE = -I"
(assoc-ref %build-inputs "libxpm")
"/include/X11"))) "/include/X11")))
(substitute* "Imakefile" (substitute* "Imakefile"
@ -704,13 +706,12 @@ Portable Game Notation.")
(zero? (system* "xmkmf" "-a" (zero? (system* "xmkmf" "-a"
(string-append "-DProjectRoot=" (string-append "-DProjectRoot="
(assoc-ref outputs "out"))))) (assoc-ref outputs "out"))))))
(alist-replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(and (and
(zero? (system* "make" "install.man")) (zero? (system* "make" "install.man"))
(zero? (system* "make" "install")))) (zero? (system* "make" "install"))))))))
%standard-phases))))
(inputs `(("libx11" ,libx11) (inputs `(("libx11" ,libx11)
("libxext" ,libxext) ("libxext" ,libxext)
("libxpm" ,libxpm))) ("libxpm" ,libxpm)))
@ -776,8 +777,9 @@ are primarily in English, however some in other languages are provided.")
"0cz4z4dwrv5ypl19ll67wl6jjpy5k6ly4vr042w4br88qq5jhazl")))) "0cz4z4dwrv5ypl19ll67wl6jjpy5k6ly4vr042w4br88qq5jhazl"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (alist-cons-after `(#:phases
'unpack 'fix-build-env (modify-phases %standard-phases
(add-after 'unpack 'fix-build-env
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* "Makefile" (substitute* "Makefile"
@ -785,15 +787,14 @@ are primarily in English, however some in other languages are provided.")
(string-append "INSTALL_DIR = " out "/lib"))) (string-append "INSTALL_DIR = " out "/lib")))
;; The Makefile assumes these directories exist. ;; The Makefile assumes these directories exist.
(mkdir-p (string-append out "/lib")) (mkdir-p (string-append out "/lib"))
(mkdir-p (string-append out "/include")))) (mkdir-p (string-append out "/include")))))
(alist-replace (replace 'unpack
'unpack
(lambda* (#:key source #:allow-other-keys) (lambda* (#:key source #:allow-other-keys)
(and (zero? (system* "unzip" source)) (and (zero? (system* "unzip" source))
;; The actual source is buried a few directories deep. ;; The actual source is buried a few directories deep.
(chdir (string-append "irrlicht-" ,version "/source/Irrlicht/")))) (chdir (string-append "irrlicht-" ,version
;; No configure script "/source/Irrlicht/")))))
(alist-delete 'configure %standard-phases))) (delete 'configure)) ; no configure script
#:tests? #f ; no check target #:tests? #f ; no check target
#:make-flags '("CC=gcc" "sharedlib"))) #:make-flags '("CC=gcc" "sharedlib")))
(native-inputs (native-inputs
@ -979,8 +980,8 @@ in different ways.")
(arguments (arguments
'(#:tests? #f ; no check target '(#:tests? #f ; no check target
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(inc (string-append out "/include")) (inc (string-append out "/include"))
@ -992,8 +993,8 @@ in different ways.")
'("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm")) '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
(mkdir-p lib) (mkdir-p lib)
(install-file "libglkterm.a" lib)) (install-file "libglkterm.a" lib))
#t) #t))
(alist-delete 'configure %standard-phases)))) (delete 'configure)))) ; no configure script
(home-page "http://www.eblong.com/zarf/glk/") (home-page "http://www.eblong.com/zarf/glk/")
(synopsis "Curses Implementation of the Glk API") (synopsis "Curses Implementation of the Glk API")
(description (description
@ -1026,15 +1027,15 @@ using the @code{curses.h} library for screen control.")
(string-append "GLKLIBDIR=" glk "/lib") (string-append "GLKLIBDIR=" glk "/lib")
(string-append "GLKMAKEFILE=" "Make.glkterm"))) (string-append "GLKMAKEFILE=" "Make.glkterm")))
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))) (bin (string-append out "/bin")))
(mkdir-p bin) (mkdir-p bin)
(install-file "glulxe" bin)) (install-file "glulxe" bin))
#t) #t))
(alist-delete 'configure %standard-phases)))) (delete 'configure)))) ; no configure script
(home-page "http://www.eblong.com/zarf/glulx/") (home-page "http://www.eblong.com/zarf/glulx/")
(synopsis "Interpreter for Glulx VM") (synopsis "Interpreter for Glulx VM")
(description (description
@ -1097,16 +1098,15 @@ either by Infocom or created using the Inform compiler.")
(arguments (arguments
'(#:tests? #f ; no tests '(#:tests? #f ; no tests
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'configure (replace 'configure
(lambda _ (lambda _
(substitute* "qb/qb.libs.sh" (substitute* "qb/qb.libs.sh"
(("/bin/true") (which "true"))) (("/bin/true") (which "true")))
(zero? (system* (zero? (system*
"./configure" "./configure"
(string-append "--prefix=" %output) (string-append "--prefix=" %output)
(string-append "--global-config-dir=" %output "/etc")))) (string-append "--global-config-dir=" %output "/etc"))))))))
%standard-phases)))
(inputs (inputs
`(("alsa-lib" ,alsa-lib) `(("alsa-lib" ,alsa-lib)
("ffmpeg" ,ffmpeg) ("ffmpeg" ,ffmpeg)