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

@ -468,17 +468,15 @@ fight Morgoth, the Lord of Darkness.")
("libpng" ,libpng) ("libpng" ,libpng)
("boost" ,boost))) ("boost" ,boost)))
(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
(lambda* (#:key outputs #:allow-other-keys) (replace 'configure
;; This old `configure' script doesn't support (lambda* (#:key outputs #:allow-other-keys)
;; variables passed as arguments. ;; This old configure script doesn't support
(let ((out (assoc-ref outputs "out"))) ;; variables passed as arguments.
(setenv "CONFIG_SHELL" (which "bash")) (let ((out (assoc-ref outputs "out")))
(zero? (setenv "CONFIG_SHELL" (which "bash"))
(system* "./configure" (zero?
(string-append "--prefix=" out))))) (system* "./configure"
%standard-phases))) (string-append "--prefix=" out)))))))))
(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,29 +689,29 @@ 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"
"/include/X11"))) (assoc-ref %build-inputs "libxpm")
"/include/X11")))
(substitute* "Imakefile" (substitute* "Imakefile"
(("XBOING_DIR = \\.") "XBOING_DIR=$(PROJECTROOT)")) (("XBOING_DIR = \\.") "XBOING_DIR=$(PROJECTROOT)"))
;; FIXME: HIGH_SCORE_FILE should be set to somewhere writeable ;; FIXME: HIGH_SCORE_FILE should be set to somewhere writeable
(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,25 +777,25 @@ 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
(lambda* (#:key outputs #:allow-other-keys) (add-after 'unpack 'fix-build-env
(let ((out (assoc-ref outputs "out"))) (lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile" (let ((out (assoc-ref outputs "out")))
(("INSTALL_DIR = /usr/local/lib") (substitute* "Makefile"
(string-append "INSTALL_DIR = " out "/lib"))) (("INSTALL_DIR = /usr/local/lib")
;; The Makefile assumes these directories exist. (string-append "INSTALL_DIR = " out "/lib")))
(mkdir-p (string-append out "/lib")) ;; The Makefile assumes these directories exist.
(mkdir-p (string-append out "/include")))) (mkdir-p (string-append out "/lib"))
(alist-replace (mkdir-p (string-append out "/include")))))
'unpack (replace '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
`(("unzip" ,unzip))) `(("unzip" ,unzip)))
@ -979,21 +980,21 @@ 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"))
(lib (string-append out "/lib"))) (lib (string-append out "/lib")))
(mkdir-p inc) (mkdir-p inc)
(for-each (for-each
(lambda (file) (lambda (file)
(install-file file inc)) (install-file file inc))
'("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
@ -1019,22 +1020,22 @@ using the @code{curses.h} library for screen control.")
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs `(("glk" ,glkterm))) (inputs `(("glk" ,glkterm)))
(arguments (arguments
'(#:tests? #f ; no check target '(#:tests? #f ; no check target
#:make-flags #:make-flags
(let* ((glk (assoc-ref %build-inputs "glk"))) (let* ((glk (assoc-ref %build-inputs "glk")))
(list (string-append "GLKINCLUDEDIR=" glk "/include") (list (string-append "GLKINCLUDEDIR=" glk "/include")
(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)