guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: gzdoom: Update to 4.3.2.


From: guix-commits
Subject: 02/03: gnu: gzdoom: Update to 4.3.2.
Date: Mon, 20 Jan 2020 18:44:25 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 570b89f4016d8e4913502176b6ca4ead511e2e8a
Author: Tobias Geerinckx-Rice <address@hidden>
AuthorDate: Tue Jan 21 00:22:30 2020 +0100

    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.
---
 gnu/local.mk                                       |  3 +-
 gnu/packages/games.scm                             | 55 +++++++++++++---------
 .../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 9d7b50e..626d91c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -12,7 +12,7 @@
 # Copyright © 2016, 2017, 2018, 2019 Alex Vong <address@hidden>
 # Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <address@hidden>
 # Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen 
<address@hidden>
-# Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <address@hidden>
+# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <address@hidden>
 # Copyright © 2017, 2018 Clément Lassieur <address@hidden>
 # Copyright © 2017 Mathieu Othacehe <address@hidden>
 # Copyright © 2017, 2018, 2019 Gábor Boskovits <address@hidden>
@@ -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 8333059..f348caf 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 0000000..a7f277d
--- /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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]