- (use-modules (guix packages)
- (guix download)
- (guix gexp)
- (guix git-download)
- (guix build-system cmake)
- (gnu packages)
- (gnu packages pkg-config)
- (gnu packages audio)
- (gnu packages compression)
- (gnu packages gl)
- (gnu packages gtk)
- (gnu packages image)
- (gnu packages mp3)
- (gnu packages pulseaudio)
- (gnu packages sdl)
- ((guix licenses) #:prefix license:))
- (package
- (name "gzdoom-new")
- (version "4.13.2")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/coelckers/gzdoom")
- (commit (string-append "g" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0zlvrdayrj1rk5x2hwnc57l8pl29bl64zmfq3qc9yfypknj1syfy"))))
- (arguments
- (list
- #:tests? #f
- ;; #:configure-flags
- ;; #~(list
- ;; (string-append
- ;; "-DCMAKE_CXX_FLAGS:="
- ;; "-DSHARE_DIR=\\\"" #$output "/share/\\\" "
- ;; "-DGUIX_OUT_PK3=\\\"" #$output "/share/games/doom\\\"")
- ;; ;; 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"
- ;; "-DDYN_MPG123=OFF"
- ;; "-DDYN_SNDFILE=OFF")
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'configure 'fix-file-names
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/CMakeLists.txt"
- (("COMMAND /bin/sh")
- (string-append "COMMAND " (which "sh"))))
- (substitute*
- "libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp"
- (("/usr/share/sounds/sf2/FluidR3_GM.sf2")
- (search-input-file inputs
- "share/soundfonts/FluidR3Mono_GM.sf3")))
- (substitute*
- "libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp"
- (("(exename = \")(timidity)(\".*)" dum prefix exe suffix)
- (string-append prefix
- (search-input-file inputs
- (string-append "bin/" exe))
- suffix))))))
- ))
- (build-system cmake-build-system)
- (inputs (list bzip2
- fluid-3
- fluidsynth
- gtk+
- libgme
- libjpeg-turbo
- libsndfile
- mesa
- mpg123
- openal
- sdl2
- timidity++
- zlib))
- (native-inputs (list pkg-config unzip))
- (synopsis "Modern Doom 2 source port")
- (description "GZdoom is a port of the Doom 2 game engine, with a modern
- renderer. It improves modding support with ZDoom's advanced mapping features
- and the new ZScript language. In addition to Doom, it supports Heretic, Hexen,
- Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.")
- (home-page "https://zdoom.org/index")
- ;; The source uses x86 assembly
- (supported-systems '("x86_64-linux" "i686-linux"))
- (license (list license:gpl3+ ; gzdoom game
- license:lgpl3+ ; gzdoom renderer
- license:expat ; gdtoa
- (license:non-copyleft ; modified dumb
- "file://dumb/licence.txt"
- "Dumb license, explicitly GPL compatible."))))