gnu: gzdoom: Update package style.

* gnu/packages/games.scm (gzdoom)[source]: Don't explicitly return #t
from snippet.
[arguments]: Likewise from phases.  Use G-expressions.
Use SEARCH-INPUT-FILE so that we can…
[inputs]: …remove input labels.

Change-Id: I8dfc4ce55c1c5b5bfda98d81ba54e310b7469766
This commit is contained in:
Tobias Geerinckx-Rice 2024-09-15 02:00:00 +02:00
parent 424197c8ca
commit b20c3a4b9a
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -8116,65 +8116,60 @@ (define-public gzdoom
(delete-file-recursively "bzip2") (delete-file-recursively "bzip2")
(delete-file-recursively "game-music-emu") (delete-file-recursively "game-music-emu")
(delete-file-recursively "jpeg") (delete-file-recursively "jpeg")
(delete-file-recursively "zlib")) (delete-file-recursively "zlib"))))))
#t))))
(arguments (arguments
'(#:tests? #f (list
#:configure-flags #:tests? #f
(let ((out (assoc-ref %outputs "out"))) #:configure-flags
(list #~(list
(string-append (string-append
"-DCMAKE_CXX_FLAGS:=" "-DCMAKE_CXX_FLAGS:="
"-DSHARE_DIR=\\\"" out "/share/\\\" " "-DSHARE_DIR=\\\"" #$output "/share/\\\" "
"-DGUIX_OUT_PK3=\\\"" out "/share/games/doom\\\"") "-DGUIX_OUT_PK3=\\\"" #$output "/share/games/doom\\\"")
;; The build requires some extra convincing not to use the bundled ;; The build requires some extra convincing not to use the bundled
;; libgme previously deleted in the soure snippet. ;; libgme previously deleted in the soure snippet.
"-DFORCE_INTERNAL_GME=OFF" "-DFORCE_INTERNAL_GME=OFF"
;; Link libraries at build time instead of loading them at run time. ;; Link libraries at build time instead of loading them at run time.
"-DDYN_OPENAL=OFF" "-DDYN_OPENAL=OFF"
"-DDYN_FLUIDSYNTH=OFF" "-DDYN_FLUIDSYNTH=OFF"
"-DDYN_GTK=OFF" "-DDYN_GTK=OFF"
"-DDYN_MPG123=OFF" "-DDYN_MPG123=OFF"
"-DDYN_SNDFILE=OFF")) "-DDYN_SNDFILE=OFF")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'configure 'fix-referenced-paths (add-before 'configure 'fix-file-names
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((fluid-3 (assoc-ref inputs "fluid-3")) (substitute* "src/CMakeLists.txt"
(timidity++ (assoc-ref inputs "timidity++")) (("COMMAND /bin/sh")
(out (assoc-ref outputs "out"))) (string-append "COMMAND " (which "sh"))))
(substitute*
(substitute* "libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp"
"src/CMakeLists.txt" (("/usr/share/sounds/sf2/FluidR3_GM.sf2")
(("COMMAND /bin/sh") (search-input-file inputs
(string-append "COMMAND " (which "sh")))) "share/soundfonts/FluidR3Mono_GM.sf3")))
(substitute*
(substitute* "libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp"
"libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp" (("(exename = \")(timidity)(\".*)" _ prefix exe suffix)
(("/usr/share/sounds/sf2/FluidR3_GM.sf2") (string-append prefix
(string-append fluid-3 "/share/soundfonts/FluidR3Mono_GM.sf3"))) (search-input-file inputs
(string-append "bin/" exe))
(substitute* suffix))))))))
"libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp"
(("exename = \"timidity\"")
(string-append "exename = \"" timidity++ "/bin/timidity\"")))
#t))))))
(build-system cmake-build-system) (build-system cmake-build-system)
(inputs `(("bzip2" ,bzip2) (inputs (list bzip2
("fluid-3" ,fluid-3) fluid-3
("fluidsynth" ,fluidsynth) fluidsynth
("gtk+3" ,gtk+) gtk+
("libgme" ,libgme) libgme
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libsndfile" ,libsndfile) libsndfile
("mesa" ,mesa) mesa
("mpg123" ,mpg123) mpg123
("openal" ,openal) openal
("sdl2" ,sdl2) sdl2
("timidity++" ,timidity++) timidity++
("zlib" ,zlib))) zlib))
(native-inputs (list pkg-config unzip)) (native-inputs (list pkg-config unzip))
(synopsis "Modern Doom 2 source port") (synopsis "Modern Doom 2 source port")
(description "GZdoom is a port of the Doom 2 game engine, with a modern (description "GZdoom is a port of the Doom 2 game engine, with a modern