Subject: [PATCH] gnu: Add freedroid-rpg.
From: Tobias Geerinckx-Rice <[email-masked]>
To: [email-masked]
Date: Mon, 24 Sep 2018 21:45:35 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/games.scm (freedroid-rpg): New public variable.
---
 gnu/packages/games.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8be87f6f5..c0093bab2 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -364,6 +364,54 @@ 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 freedroid-rpg
+  (package
+    (name "freedroid-rpg")
+    (version "0.16.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://ftp.osuosl.org/pub/freedroid/"
+                           "freedroidRPG-" (version-major+minor version) "/"
+                           "freedroidRPG-" version ".tar.gz"))
+       (sha256
+        (base32 "0n4kn38ncmcy3lrxmq8fjry6c1z50z4q1zcqfig0j4jb0dsz2va2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append "CFLAGS="
+                       "-I" (assoc-ref %build-inputs "sdl-gfx") "/include/SDL "
+                       "-I" (assoc-ref %build-inputs "sdl-image") "/include/SDL")
+        "--enable-opengl")
+       ;; FIXME: the test suite fails with the following error output:
+       ;;   4586 Segmentation fault      env SDL_VIDEODRIVER=dummy \
+       ;;   SDL_AUDIODRIVER=dummy ./src/freedroidRPG -nb text
+       #:tests? #f))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glu" ,glu)
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("mesa" ,mesa)
+       ("python" ,python-wrapper)
+       ("sdl" ,sdl)
+       ("sdl-gfx" ,sdl-gfx)
+       ("sdl-image" ,sdl-image)
+       ("zlib" ,zlib)))
+    (home-page "http://www.freedroid.org/")
+    (synopsis "Isometric role-playing game against killer robots")
+    (description
+     "Freedroid RPG is an @dfn{RPG} (Role-Playing Game) with isometric graphics.
+The game tells the story of a world destroyed by a conflict between robots and
+their human masters.  The player must fight rebelling robots in order to restore
+peace to humankind---either by taking control of them, or by simply blasting
+them to pieces with melee and ranged weapons in real-time combat.")
+    (license (list license:expat        ; lua/
+                   license:gpl3         ; src/gen_savestruct.py
+                   license:gpl2+))))    ; the rest
+
 (define-public golly
   (package
     (name "golly")
-- 
2.18.0