+
+(define-public quakespasm
+ (package
+ (name "quakespasm")
+ (version "0.93.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/quakespasm/Source/quakespasm-"
+ version ".tgz"))
+ (sha256
+ (base32
+ "0b2nz7w4za32pc34r62ql270z692qcjs2pm0i3svkxkvfammhdfq"))))
+ (arguments
+ `(#:tests? #f
+ #:make-flags '("CC=gcc"
+ "MP3LIB=mpg123"
+ "USE_CODEC_FLAC=1"
+ "USE_CODEC_MIKMOD=1"
+ "USE_SDL2=1"
+ "-CQuake")
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-makefile-paths
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/bin"))
+ (substitute* "Quake/Makefile"
+ (("/usr/local/games")
+ (string-append out "/bin")))
+ #t))))))
+ (build-system gnu-build-system)
+ (inputs `(("libmikmod" ,libmikmod)
+ ("libvorbis" ,libvorbis)
+ ("flac" ,flac)
+ ("mesa" ,mesa)
+ ("mpg123" ,mpg123)
+ ("sdl2" ,sdl2)))
+ (synopsis "First person shooter engine for Quake 1")
+ (description "Quakespasm is a modern engine for id software's Quake 1.
+It includes support for 64 bit CPUs, custom music playback, a new sound driver,
+some graphical niceities, and numerous bug-fixes and other improvements.")
+ (home-page "http://quakespasm.sourceforge.net/")
+ (license license:gpl2+)))
+
+(define-public yamagi-quake2
+ (package
+ (name "yamagi-quake2")
+ (version "7.10")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://deponie.yamagi.org/quake2/quake2-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0psinbg25mysd58k99s1n34w31w5hj1vppb39gdjb0zqi6sl6cps"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags
+ (list "CC=gcc"
+ ;; link openAL instead of using dlopen at runtime
+ "DLOPEN_OPENAL=\"no\""
+ ;; an optional directory where it will look for quake2 data files
+ ;; in addition to the current working directory
+ "WITH_SYSTEMWIDE=yes"
+ "WITH_SYSTEMDIR=\"/opt/quake2\"")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/lib"))
+ (mkdir-p (string-append out "/bin"))
+ ;; The yamagi-quake2 binary must be in the same directory
+ ;; as it's engine libraries, but symlinking it to /bin is okay
+ ;; https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md
+ (copy-recursively "release"
+ (string-append out "/lib/yamagi-quake2"))
+ (symlink (string-append out "/lib/yamagi-quake2/quake2")
+ (string-append out "/bin/yamagi-quake2"))
+ (symlink (string-append out "/lib/yamagi-quake2/q2ded")
+ (string-append out "/bin/yamagi-q2ded"))))))))
+ (inputs `(("sdl2" ,sdl2)
+ ("mesa" ,mesa)
+ ("libvorbis" ,libvorbis)
+ ("zlib" ,zlib)
+ ("openal" ,openal)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (synopsis "First person shooter engine based on quake2")
+ (description "Yamagi Quake II is an enhanced client for id Software's Quake II.
+The main focus is an unchanged single player experience like back in 1997,
+thus the gameplay and the graphics are unaltered. However the user may use one
+of the unofficial retexturing packs. In comparison with the official client,
+over 1000 bugs were fixed and an extensive code audit done,
+making Yamagi Quake II one of the most solid Quake II implementations available.")
+ (home-page "https://www.yamagi.org/quake2/")
+ (license (list license:gpl2+ ; game and server
+ (license:non-copyleft ; info-zip
+ "file://LICENSE"
+ "See Info-Zip section.")
+ license:public-domain)))) ; stb
+
+(define-public the-butterfly-effect
+ (package
+ (name "the-butterfly-effect")
+ (version "0.9.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/the-butterfly-effect/tbe/archive/"
+ "v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "18qkp7fgdvyl3haqqa693mgyic7afsznsxgz98z9wn4csaqxsnby"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ ;; There is no "install" phase. By default, tbe is installed
+ ;; in the build directory. Provide our own installation.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (share (string-append out "/share")))
+ (install-file "usr/games/tbe" bin)
+ (mkdir-p share)
+ (copy-recursively "usr/share" share)
+ #t))))
+ ;; Test suite requires a running Xorg server. Even when
+ ;; provided, it fails with "D-Bus library appears to be
+ ;; incorrectly set up; failed to read machine uuid: Failed to
+ ;; open "/etc/machine-id": No such file or directory" along
+ ;; with multiple "QPainter:: ... Painter not active" warnings.
+ #:tests? #f))
+ (inputs
+ `(("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)))
+ (native-inputs
+ `(("cmake" ,cmake)
+ ("gettext-minimal" ,gettext-minimal)
+ ("qttools" ,qttools)))
+ (synopsis "Realistic physics puzzle game")
+ (description "The Butterfly Effect (tbe) is a game that uses
+realistic physics simulations to combine lots of simple mechanical
+elements to achieve a simple goal in the most complex way possible.")
+ (home-page "http://the-butterfly-effect.org/")
+ ;; Main license is GPL2-only. However, artwork is distributed
+ ;; under various licenses, listed here.
+ (license (list license:gpl2 license:public-domain license:expat
+ license:cc-by-sa3.0 license:gpl3+ license:wtfpl2))))