summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm154
1 files changed, 154 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f264ef206f..67fcb7b496 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
 ;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
+;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -58,6 +59,7 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages game-development)
@@ -69,6 +71,7 @@
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages haskell)
@@ -107,12 +110,85 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages messaging)
+  #:use-module (gnu packages upnp)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial))
 
+(define-public freedoom
+  (package
+   (name "freedoom")
+   (version "0.11.1")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "https://github.com/" name "/" name
+                                "/archive/v" version ".tar.gz"))
+            (file-name (string-append name "-" version ".tar.gz"))
+            (sha256
+             (base32
+              "060dqppd9fi079yw6c82klsjaslcabq6xan67wf9hs0cy39i0kpv"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:make-flags `(,(string-append "prefix=" (assoc-ref %outputs "out")))
+      #:parallel-build? #f
+      #:tests? #f ; no check target
+      #:phases
+      (modify-phases %standard-phases
+        (add-before 'unpack 'no (lambda _ #t))
+        (replace 'configure
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let* ((dejavu (assoc-ref inputs "font-dejavu"))
+                          (freedoom (assoc-ref outputs "out"))
+                          (wad-dir (string-append freedoom "/share/games/doom")))
+                     ;; Replace the font-searching function in a shell
+                     ;; script with a direct path to the required font.
+                     ;; This is necessary because ImageMagick can only find the
+                     ;; most basic fonts while in the build environment.
+                     (substitute* "graphics/titlepic/create_caption"
+                       (("font=\\$\\(find_font.*$")
+                        (string-append
+                         "font=" dejavu
+                         "/share/fonts/truetype/DejaVuSansCondensed-Bold.ttf\n")))
+                     ;; Make icon creation reproducible.
+                     (substitute* "dist/Makefile"
+                       (("freedm.png")
+                        "-define png:exclude-chunks=date freedm.png")
+                       (("freedoom1.png")
+                        "-define png:exclude-chunks=date freedoom1.png")
+                       (("freedoom2.png")
+                        "-define png:exclude-chunks=date freedoom2.png"))
+                     ;; Make sure that the install scripts know where to find
+                     ;; the appropriate WAD files.
+                     (substitute* "dist/freedoom"
+                       (("IWAD=freedm.wad")
+                        (string-append "IWAD=" wad-dir "/freedm.wad"))
+                       (("IWAD=freedoom1.wad")
+                        (string-append "IWAD=" wad-dir "/freedoom1.wad"))
+                       (("IWAD=freedoom2.wad")
+                        (string-append "IWAD=" wad-dir "/freedoom2.wad")))
+                     #t))))))
+   (native-inputs
+    `(("asciidoc" ,asciidoc)
+      ("deutex" ,deutex)
+      ("font-dejavu" ,font-dejavu)
+      ("imagemagick" ,imagemagick)
+      ("python" ,python-2)))
+   (inputs
+    `(("prboom-plus" ,prboom-plus)))
+   (home-page "https://freedoom.github.io/")
+   (synopsis "Free content game based on the Doom engine")
+   (description
+    "The Freedoom project aims to create a complete free content first person
+shooter game.  Freedoom by itself is just the raw material for a game: it must
+be paired with a compatible game engine (such as @code{prboom-plus}) to be
+played.  Freedoom complements the Doom engine with free levels, artwork, sound
+effects and music to make a completely free game.")
+   (license license:bsd-3)))
+
 (define-public gnubg
   (package
     (name "gnubg")
@@ -3267,3 +3343,81 @@ This command works on piped data.  Pipe any ASCII or UTF-8 text to nms, and
 it will apply the hollywood effect, initially showing encrypted data, then
 starting a decryption sequence to reveal the original plaintext characters.")
     (license license:expat)))
+
+(define-public megaglest-data
+  (package
+    (name "megaglest-data")
+    (version "3.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/MegaGlest/megaglest-data"
+             "/releases/download/" version "/megaglest-data-"
+             version ".tar.xz"))
+       (sha256
+        (base32
+         "0ipgza33z89fw3si32iafm981f3fvm0zldvbxj29whghd2k3rpj3"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))
+    (home-page "https://megaglest.org/")
+    (synopsis "Data files for MegaGlest")
+    (description "This package contains the data files required for MegaGlest.")
+    (license license:cc-by-sa3.0)))
+
+(define-public megaglest
+  (package
+    (name "megaglest")
+    (version "3.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/MegaGlest/megaglest-source"
+             "/releases/download/" version "/megaglest-source-"
+             version ".tar.xz"))
+       (sha256
+        (base32
+         "1ffck3ii1wp5k3nn5p0ga06jgp7pzk4zw0xln3xim2w7qrxzdzh9"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("curl" ,curl)
+       ("fontconfig" ,fontconfig)
+       ("ftgl" ,ftgl)
+       ("glew" ,glew)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("megaglest-data" ,megaglest-data)
+       ("mesa" ,mesa)
+       ("miniupnpc" ,miniupnpc)
+       ("openal" ,openal)
+       ("libircclient" ,libircclient)
+       ("libpng" ,libpng)
+       ("libvorbis" ,libvorbis)
+       ("lua" ,lua)
+       ("sdl2" ,sdl2)
+       ("wxwidgets" ,wxwidgets)))
+    (native-inputs
+     `(("cppunit" ,cppunit)
+       ("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:configure-flags
+       (list (string-append "-DCUSTOM_DATA_INSTALL_PATH="
+                            (assoc-ref %build-inputs "megaglest-data")
+                            "/share/megaglest")
+             "-DBUILD_MEGAGLEST_TESTS=ON")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-ini-search-path
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (substitute* "source/glest_game/global/config.cpp"
+                        (("/usr/share/megaglest/")
+                         (string-append (assoc-ref outputs "out")
+                                        "/share/megaglest/"))))))
+       #:test-target "megaglest_tests"))
+    (home-page "https://megaglest.org/")
+    (synopsis "3D real-time strategy (RTS) game")
+    (description "MegaGlest is a cross-platform 3D real-time strategy (RTS)
+game, where you control the armies of one of seven different factions: Tech,
+Magic, Egypt, Indians, Norsemen, Persian or Romans.")
+    (license license:gpl2+)))