diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-01-21 00:22:30 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-01-21 00:43:24 +0100 |
commit | 570b89f4016d8e4913502176b6ca4ead511e2e8a (patch) | |
tree | 2e972129f2e7d8b9fc933dc9a0a21eae8227fe85 | |
parent | 21e733ce4eb5f15d195d129d659d1be373696a9c (diff) | |
download | guix-570b89f4016d8e4913502176b6ca4ead511e2e8a.tar guix-570b89f4016d8e4913502176b6ca4ead511e2e8a.tar.gz |
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.
-rw-r--r-- | gnu/local.mk | 3 | ||||
-rw-r--r-- | gnu/packages/games.scm | 55 | ||||
-rw-r--r-- | gnu/packages/patches/gzdoom-find-system-libgme.patch | 21 |
3 files changed, 55 insertions, 24 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 9d7b50ea87..626d91ce62 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -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 \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 83330590cf..f348cafb67 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -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) diff --git a/gnu/packages/patches/gzdoom-find-system-libgme.patch b/gnu/packages/patches/gzdoom-find-system-libgme.patch new file mode 100644 index 0000000000..a7f277d614 --- /dev/null +++ b/gnu/packages/patches/gzdoom-find-system-libgme.patch @@ -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 |