me
/
guix
Archived
1
0
Fork 0

gnu: gzdoom: Update to 4.3.2.

* gnu/packages/games.scm (gzdoom): Update to 4.3.2.
[source]: Use GIT-FETCH and GIT-FILE-NAME.  Apply system libgme patch.
Update snippet.
[arguments]: Allow system libgme.  Update substitution file names.
[inputs]: Use fluidsynth@2.
* gnu/packages/patches/gzdoom-find-system-libgme.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
master
Tobias Geerinckx-Rice 2020-01-21 00:22:30 +01:00
parent 21e733ce4e
commit 570b89f401
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
3 changed files with 55 additions and 24 deletions

View File

@ -12,7 +12,7 @@
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
# Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
# Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017, 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
@ -984,6 +984,7 @@ dist_patch_DATA = \
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
%D%/packages/patches/gtksourceview-2-add-default-directory.patch \
%D%/packages/patches/gzdoom-search-in-installed-share.patch \
%D%/packages/patches/gzdoom-find-system-libgme.patch \
%D%/packages/patches/haskell-mode-unused-variables.patch \
%D%/packages/patches/haskell-mode-make-check.patch \
%D%/packages/patches/hdf4-architectures.patch \

View File

@ -5706,24 +5706,29 @@ You can save humanity and get programming skills!")
(define-public gzdoom
(package
(name "gzdoom")
(version "3.7.2")
(source (origin
(method url-fetch)
(uri
(string-append "https://zdoom.org/files/gzdoom/src/gzdoom-src-g"
version ".zip"))
(sha256
(base32
"0182f160m8d0c3nywjw3dxvnz93xjs4cn8akx7137cha4s05wdq7"))
(patches (search-patches "gzdoom-search-in-installed-share.patch"))
(modules '((guix build utils)))
(snippet
'(begin
(delete-file-recursively "bzip2")
(delete-file-recursively "game-music-emu")
(delete-file-recursively "jpeg")
(delete-file-recursively "zlib")
#t))))
(version "4.3.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/coelckers/gzdoom.git")
(commit (string-append "g" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0i4hyg72z84fc6ca2ic9q82q5cbgrbd7bynl3kpkypxvyasq08wz"))
(patches (search-patches "gzdoom-search-in-installed-share.patch"
"gzdoom-find-system-libgme.patch"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove some bundled libraries. XXX There are more, but removing
;; them would require, at least, patching the build system.
(with-directory-excursion "libraries"
(delete-file-recursively "bzip2")
(delete-file-recursively "game-music-emu")
(delete-file-recursively "jpeg")
(delete-file-recursively "zlib"))
#t))))
(arguments
'(#:tests? #f
#:configure-flags
@ -5733,8 +5738,12 @@ You can save humanity and get programming skills!")
"-DCMAKE_CXX_FLAGS:="
"-DSHARE_DIR=\\\"" out "/share/\\\" "
"-DGUIX_OUT_PK3=\\\"" out "/share/games/doom\\\"")
;; look for libraries at buildtime instead of
;; dynamically finding them at runtime
;; The build requires some extra convincing not to use the bundled
;; libgme previously deleted in the soure snippet.
"-DFORCE_INTERNAL_GME=OFF"
;; Link libraries at build time instead of loading them at run time.
"-DDYN_OPENAL=OFF"
"-DDYN_FLUIDSYNTH=OFF"
"-DDYN_GTK=OFF"
@ -5754,19 +5763,19 @@ You can save humanity and get programming skills!")
(string-append "COMMAND " (which "sh"))))
(substitute*
"src/sound/mididevices/music_fluidsynth_mididevice.cpp"
"libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp"
(("/usr/share/sounds/sf2/FluidR3_GM.sf2")
(string-append fluid-3 "/share/soundfonts/FluidR3Mono_GM.sf3")))
(substitute*
"src/sound/mididevices/music_timiditypp_mididevice.cpp"
"libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp"
(("exename = \"timidity\"")
(string-append "exename = \"" timidity++ "/bin/timidity\"")))
#t))))))
(build-system cmake-build-system)
(inputs `(("bzip2" ,bzip2)
("fluid-3" ,fluid-3)
("fluidsynth" ,fluidsynth-1) ;XXX: try using 2.x when updating
("fluidsynth" ,fluidsynth)
("gtk+3" ,gtk+)
("libgme" ,libgme)
("libjpeg" ,libjpeg)

View File

@ -0,0 +1,21 @@
--- /CMakeLists.txt 2020-01-20 21:47:35.460119141 +0100
+++ /CMakeLists.txt 2020-01-20 21:47:47.690112400 +0100
@@ -195,12 +195,12 @@
#endif()
# GME
-#find_path( GME_INCLUDE_DIR gme/gme.h )
-#find_library( GME_LIBRARIES gme )
-#mark_as_advanced( GME_INCLUDE_DIR GME_LIBRARIES )
-#FIND_PACKAGE_HANDLE_STANDARD_ARGS( GME
-# REQUIRED_VARS GME_LIBRARIES GME_INCLUDE_DIR
-#)
+find_path( GME_INCLUDE_DIR gme/gme.h )
+find_library( GME_LIBRARIES gme )
+mark_as_advanced( GME_INCLUDE_DIR GME_LIBRARIES )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS( GME
+ REQUIRED_VARS GME_LIBRARIES GME_INCLUDE_DIR
+)
if( MSVC )
# Eliminate unreferenced functions and data