summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2016-10-23 14:16:39 -0400
committerMark H Weaver <mhw@netris.org>2016-10-23 14:16:39 -0400
commitca0635b4ba1af6f4ef1f54cb13fe6cedd8c5aff3 (patch)
tree1b3e014c4e0398ecb63d1b88ee06b09d0c0c5a56 /gnu/packages/games.scm
parentf08add0c5a3f1f7200b0a00e17ed880692d2244b (diff)
parent903276d066ab9733c253d2a15b7ae135ef2ef836 (diff)
downloadguix-ca0635b4ba1af6f4ef1f54cb13fe6cedd8c5aff3.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm75
1 files changed, 75 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 259e616ab2..bffbe14647 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -970,6 +970,81 @@ This game is based on the GPL version of the famous game TuxRacer.")
     (home-page "http://sourceforge.net/projects/extremetuxracer/")
     (license license:gpl2+)))
 
+(define-public supertuxkart
+  (package
+    (name "supertuxkart")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/supertuxkart/SuperTuxKart/"
+                           version "/supertuxkart-" version "-src.tar.xz"))
+       (sha256
+        (base32
+         "10l2ljmd7mv8f9ylarqmxxryicdnph2qkm3g5maxnsm2k2q0n20b"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Delete bundled library sources
+        '(begin
+           ;; FIXME: try to unbundle enet, and angelscript
+           (for-each delete-file-recursively
+                     '("lib/zlib"
+                       "lib/libpng"
+                       "lib/jpeglib"
+                       "lib/glew"
+                       "lib/wiiuse"))
+           (substitute* "CMakeLists.txt"
+             ;; Supertuxkart uses modified versions of the Irrlicht engine
+             ;; and the bullet library.  The developers gave an explanation here:
+             ;; http://forum.freegamedev.net/viewtopic.php?f=17&t=3906
+             (("add_subdirectory\\(.*/(glew|zlib)\"\\)") ""))
+           #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no check target
+       #:configure-flags
+       (list "-DUSE_WIIUSE=0"
+             ;; Do not use the bundled zlib
+             "-DNO_IRR_COMPILE_WITH_ZLIB_=TRUE"
+             ;; Irrlicht returns an integer instead of a boolean
+             "-DCMAKE_C_FLAGS=-fpermissive")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (("glew")
+                (string-append (assoc-ref inputs "glew")
+                               "/lib/libGLEW.a"))
+               (("include_directories\\(\"\\$\\{PROJECT_SOURCE_DIR\\}/lib/glew/include\"\\)")
+                (string-append "include_directories(\""
+                               (assoc-ref inputs "glew")
+                               "/include\")")))
+             #t)))))
+    (inputs
+     `(("glew" ,glew)
+       ("zlib" ,zlib)
+       ("openal" ,openal)
+       ("libvorbis" ,libvorbis)
+       ("freetype" ,freetype)
+       ("fribidi" ,fribidi)
+       ("mesa" ,mesa)
+       ("libx11" ,libx11)
+       ("libxrandr" ,libxrandr)
+       ("curl" ,curl)
+       ;; The following input is needed to build the bundled and modified
+       ;; version of irrlicht.
+       ("libjpeg" ,libjpeg)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://supertuxkart.net")
+    (synopsis "3D kart racing game")
+    (description "SuperTuxKart is a 3D kart racing game, with a focus on
+having fun over realism.  You can play with up to 4 friends on one PC, racing
+against each other or just trying to beat the computer; single-player mode is
+also available.")
+    (license license:gpl3+)))
+
 (define-public gnujump
   (package
     (name "gnujump")