gnu: eduke32, fury: Update to 20240316-10564-0bc78c53d.
* nongnu/packages/game-development.scm (eduke32, fury): Update to 20240316-10564-0bc78c53d. Rewrite to use gexps. [arguments]: Drop unnecessary make-flags. Drop wrapper script as upstream now handles configuration directories. [native-inputs]: Add gdk-pixbuf to fix compilation. [license]: Add gpl2. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
b04018d38a
commit
8d047fc9a1
|
@ -1,16 +1,20 @@
|
||||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||||
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
|
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
|
||||||
|
;;; Copyright © 2024 Timotej Lazar <timotej.lazar@araneo.si>
|
||||||
|
|
||||||
(define-module (nongnu packages game-development)
|
(define-module (nongnu packages game-development)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module ((nonguix licenses) :prefix license:)
|
#:use-module ((nonguix licenses) :prefix license:)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (nonguix build-system binary)
|
#:use-module (nonguix build-system binary)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module ((guix licenses) :prefix license:)
|
||||||
#:use-module (gnu packages audio)
|
#:use-module (gnu packages audio)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
|
@ -159,128 +163,95 @@ development should opt for GLSL rather than Cg.")
|
||||||
"https://raw.githubusercontent.com/ValveSoftware/source-sdk-2013/master/LICENSE"))))
|
"https://raw.githubusercontent.com/ValveSoftware/source-sdk-2013/master/LICENSE"))))
|
||||||
|
|
||||||
(define-public eduke32
|
(define-public eduke32
|
||||||
;; There are no official releases.
|
(package
|
||||||
(let ((commit "188e14622cfe5c6f63b04b989b350bf2a29a893c")
|
(name "eduke32")
|
||||||
(revision "1")
|
(version "20240316-10564-0bc78c53d")
|
||||||
(duke-nukem-3d-directory "share/dukenukem3d"))
|
(source
|
||||||
(package
|
(origin
|
||||||
(name "eduke32")
|
(method url-fetch)
|
||||||
(version (git-version "0" revision commit))
|
(uri (string-append "https://dukeworld.com/eduke32/synthesis/"
|
||||||
(source
|
version "/eduke32_src_" version ".tar.xz"))
|
||||||
(origin
|
(sha256
|
||||||
(method git-fetch)
|
(base32 "1a9fw1kfriyrybjxl72b2434w3yiz2nxg6541lnyhzbdka2cp2lf"))
|
||||||
(uri (git-reference
|
(modules '((guix build utils)))
|
||||||
(url "https://voidpoint.io/terminx/eduke32.git")
|
(snippet
|
||||||
(commit commit)))
|
;; Remove bundled libxmp and platform-specific stuff.
|
||||||
(file-name (git-file-name name version))
|
#~(for-each delete-file-recursively '("platform" "source/libxmp-lite")))))
|
||||||
(sha256
|
(build-system gnu-build-system)
|
||||||
(base32 "0wy4bppiw4q2hn0v38msrjyvj2hzfvigakc23c2wqfnbl7rm0hrz"))
|
(arguments
|
||||||
;; Unbundle libxmp.
|
(list #:license-file-regexp "buildlic.txt"
|
||||||
(modules '((guix build utils)))
|
#:tests? #f
|
||||||
(snippet
|
#:phases
|
||||||
'(begin (delete-file-recursively "source/libxmp-lite") #t))))
|
#~(modify-phases %standard-phases
|
||||||
(build-system gnu-build-system)
|
(add-after 'unpack 'link-license
|
||||||
(arguments
|
(lambda _
|
||||||
`(#:tests? #f
|
;; Ensure the install-license-files phase can find it.
|
||||||
;; Add glu to rpath so that SDL can dlopen it.
|
(link "package/common/buildlic.txt" "buildlic.txt")))
|
||||||
#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
|
(add-after 'unpack 'unbundle-libxmp
|
||||||
(assoc-ref %build-inputs "glu") "/lib"))
|
(lambda _
|
||||||
#:phases
|
(substitute* "Common.mak"
|
||||||
(modify-phases %standard-phases
|
(("^LIBS :=" match) (string-append match " -lxmp")))
|
||||||
(add-after 'unpack 'unbundle-libxmp
|
(with-directory-excursion "source/audiolib/src"
|
||||||
(lambda _
|
(for-each (lambda (file) (substitute* file (("libxmp-lite/") "")))
|
||||||
(substitute* "GNUmakefile"
|
'("multivoc.cpp" "xmp.cpp")))))
|
||||||
(("-I\\$\\(libxmplite_inc\\)")
|
(add-after 'unpack 'fix-share-path
|
||||||
(string-append "-I" (assoc-ref %build-inputs "libxmp") "/include"))
|
(lambda _
|
||||||
(("^ *audiolib_deps \\+= libxmplite.*$") "")
|
(substitute* "source/duke3d/src/common.cpp"
|
||||||
(("-logg") "-logg -lxmp"))
|
(("/usr/local/share/games") (string-append #$output "/share")))))
|
||||||
(with-directory-excursion "source/audiolib/src"
|
(delete 'configure)
|
||||||
(for-each (lambda (file) (substitute* file (("libxmp-lite/") "")))
|
(replace 'install
|
||||||
'("multivoc.cpp" "xmp.cpp")))
|
(lambda _
|
||||||
#t))
|
(let ((bin (string-append #$output "/bin")))
|
||||||
(delete 'configure)
|
(install-file "eduke32" bin)
|
||||||
(replace 'install
|
(install-file "mapster32" bin)
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(install-file "package/sdk/m32help.hlp"
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(string-append #$output "/share/eduke32"))))))))
|
||||||
(glu (assoc-ref inputs "glu"))
|
(inputs (list alsa-lib
|
||||||
(eduke (string-append out "/bin/eduke32"))
|
flac
|
||||||
(eduke-real (string-append out "/bin/.eduke32-real")))
|
glu
|
||||||
;; TODO: Install custom .desktop file? Need icon.
|
gtk+-2
|
||||||
;; See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=eduke32.
|
libvorbis
|
||||||
(install-file "eduke32" (string-append out "/bin"))
|
libvpx
|
||||||
(install-file "mapster32" (string-append out "/bin"))
|
libxmp
|
||||||
(install-file "package/common/buildlic.txt"
|
sdl2
|
||||||
(string-append out "/share/licenses"))
|
sdl2-mixer))
|
||||||
;; Wrap program:
|
(native-inputs
|
||||||
;; - Make sure current directory is writable, else eduke32 will segfault.
|
(list gdk-pixbuf pkg-config))
|
||||||
;; - Add ../share/dukenukem3d to the dir search list.
|
(synopsis "Engine of the classic PC first person shooter Duke Nukem 3D")
|
||||||
;; TODO: Skip store duke3d.grp When ~/.config/eduke32/duke3d.grp is found.
|
(description "EDuke32 is a free homebrew game engine and source port of
|
||||||
(rename-file eduke eduke-real)
|
the classic PC first person shooter Duke Nukem 3D—Duke3D for short. A
|
||||||
(call-with-output-file eduke
|
thousands of features and upgrades were added for regular players and
|
||||||
(lambda (p)
|
additional editing capabilities and scripting extensions for homebrew
|
||||||
(format p "\
|
developers and mod creators. EDuke32 is open source but non-free software.
|
||||||
#!~a
|
|
||||||
mkdir -p ~~/.config/eduke32
|
|
||||||
cd ~~/.config/eduke32
|
|
||||||
exec -a \"$0\" ~a\
|
|
||||||
-g \"${0%/*}\"/../~a/*.grp\
|
|
||||||
-g \"${0%/*}\"/../~a/*.zip\
|
|
||||||
-g \"${0%/*}\"/../~a/*.map\
|
|
||||||
-g \"${0%/*}\"/../~a/*.con\
|
|
||||||
-g \"${0%/*}\"/../~a/*.def\
|
|
||||||
\"$@\"~%"
|
|
||||||
(which "bash") eduke-real
|
|
||||||
,duke-nukem-3d-directory
|
|
||||||
,duke-nukem-3d-directory
|
|
||||||
,duke-nukem-3d-directory
|
|
||||||
,duke-nukem-3d-directory
|
|
||||||
,duke-nukem-3d-directory)))
|
|
||||||
(chmod eduke #o755)))))))
|
|
||||||
(native-inputs
|
|
||||||
`(("pkg-config" ,pkg-config)))
|
|
||||||
(inputs
|
|
||||||
`(("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer)))
|
|
||||||
("alsa-lib" ,alsa-lib)
|
|
||||||
("glu" ,glu)
|
|
||||||
("libvorbis" ,libvorbis)
|
|
||||||
("libvpx" ,libvpx)
|
|
||||||
("libxmp" ,libxmp)
|
|
||||||
("flac" ,flac)
|
|
||||||
("gtk+" ,gtk+-2)))
|
|
||||||
(synopsis "Engine of the classic PC first person shooter Duke Nukem 3D")
|
|
||||||
(description "EDuke32 is a free homebrew game engine and source port of the
|
|
||||||
classic PC first person shooter Duke Nukem 3D—Duke3D for short. A thousands
|
|
||||||
of features and upgrades were added for regular players and additional editing
|
|
||||||
capabilities and scripting extensions for homebrew developers and mod
|
|
||||||
creators. EDuke32 is open source but non-free software.
|
|
||||||
|
|
||||||
This package does not contain any game file. You can either install packages
|
This package does not contain any game file. You can either install packages
|
||||||
with game files or or put @file{.grp} game files manually in
|
with game files or or put @file{.grp} game files manually in
|
||||||
@file{~/.config/eduke32/}.")
|
@file{~/.config/eduke32/}.")
|
||||||
(home-page "https://eduke32.com/")
|
(home-page "https://eduke32.com")
|
||||||
(license (license:nonfree
|
(license
|
||||||
"https://eduke32.com/buildlic.txt")))))
|
(list license:gpl2
|
||||||
|
(license:nonfree "file://package/common/buildlic.txt")))))
|
||||||
|
|
||||||
(define-public fury
|
(define-public fury
|
||||||
(package
|
(package/inherit eduke32
|
||||||
(inherit eduke32)
|
|
||||||
(name "fury")
|
(name "fury")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments eduke32)
|
(substitute-keyword-arguments (package-arguments eduke32)
|
||||||
((#:make-flags flags ''()) `(cons* "FURY=1" ,flags))
|
((#:make-flags flags #~'())
|
||||||
((#:phases phases '%standard-phases)
|
#~(cons* "FURY=1" #$flags))
|
||||||
`(modify-phases ,phases
|
((#:phases phases #~%standard-phases)
|
||||||
(replace 'install
|
#~(modify-phases #$phases
|
||||||
(lambda _
|
(add-after 'unpack 'disable-sdl-static
|
||||||
(let* ((out (assoc-ref %outputs "out")))
|
(lambda _
|
||||||
(install-file "fury" (string-append out "/bin"))
|
(substitute* "GNUmakefile"
|
||||||
(install-file "mapster32" (string-append out "/bin"))
|
(("SDL_STATIC := 1") ""))))
|
||||||
(install-file "package/common/buildlic.txt"
|
(replace 'install
|
||||||
(string-append out "/share/licenses")))
|
(lambda _
|
||||||
#t))))))
|
(install-file "fury" (string-append #$output "/bin"))))))))
|
||||||
|
(inputs
|
||||||
|
(alist-delete "libvpx" (package-inputs eduke32)))
|
||||||
(synopsis "Game engine for the first-person shooter Ion Fury")
|
(synopsis "Game engine for the first-person shooter Ion Fury")
|
||||||
(description
|
(description
|
||||||
(string-append
|
"This is the @code{eduke32} engine built with support for the Ion Fury
|
||||||
"This is the @code{eduke32} engine built with support for the Ion Fury
|
|
||||||
game. Game data is not provided. Run @command{fury} with the option
|
game. Game data is not provided. Run @command{fury} with the option
|
||||||
@option{-j} to specify the directory containing @file{fury.grp}."))))
|
@option{-j} to specify the directory containing @file{fury.grp}.")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user