Fixed an issue with the commit hash.

main
Jacob Sowder 7 months ago
parent c8806e5fb6
commit bb11e5df2f

@ -54,129 +54,7 @@
(home-page "https://zdoom.org/index")
;; the source uses x86 assembly
(supported-systems '("x86_64-linux" "i686-linux"))
(license (list license:gpl3
license:lgpl2.1))))
(define-public my-gzdoom
(package
(name "gzdoom")
(version "4.10.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ZDoom/gzdoom")
(commit (string-append "g" version))))
(file-name (git-file-name name version))
(sha256
(base32 "75da94aecd9b1c4c2e16b449dea1b9f9838c1af2"))
;; (patches (search-patches "gzdoom-search-in-installed-share.patch"
;; ;; "gzdoom-find-system-libgme.patch"
;; ))
(modules '((guix build utils)
(ice-9 regex)))
(snippet
'(begin
;; remove files which mustn't be commercially redistributed. see
;; <https://zdoom.org/wiki/license#commercial_use>, the contribution
;; guidelines at <https://github.com/zdoom>, and guix issue #73435.
(for-each
(lambda (directory)
(delete-file-recursively directory)
(substitute* "CMakeLists.txt"
(((string-append "add_subdirectory\\([[:blank:]]*"
directory
"[[:blank:]]*\\)"))
"")))
'( "wadsrc_extra" ;game_support.pk3
"wadsrc_bm")) ;brightmaps.pk3
;; removing game_support.pk3 entirely would break freedoom & remove
;; users' ability to play commercial games, despite owning (only) the
;; non-functional data. that can't be right. out of an abundance of
;; caution, remove anything from the pk3 that could conceivably be
;; derived from copyrightable data that's not freely redistributable.
(display "keeping only the following game_support.pk3 files:\n")
(let* ((regexps (list "/font\\.inf$"
"/harmony/.*\\.(txt|zs)$"
"/(iwadinfo|mapinfo|sprofs)\\.txt$"
"\\.z$"))
(regexp* (format #f "(~{~a~^|~})" regexps))
(regexp (make-regexp regexp* regexp/icase)))
(define (keep-file? file stat)
(let ((keep? (regexp-exec regexp file)))
(when keep?
(format #t " ~a~%" file))
keep?))
(for-each delete-file (find-files "wadsrc_extra/static"
(negate keep-file?))))
;; 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"))))
))
(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")))))))))
(build-system cmake-build-system)
(inputs (list bzip2
fluid-3
fluidsynth
gtk+
libgme
libjpeg-turbo
libsndfile
libvpx
mesa
mpg123
openal
sdl2
timidity++
zlib
zmusic))
(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.")))))
(license (list license:gpl3))))
(define-public my-barony
(package
(name "my-barony")

Loading…
Cancel
Save