all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: Add supertuxkart.
Date: Mon, 17 Oct 2016 23:37:54 +0200	[thread overview]
Message-ID: <20161017213754.8462-1-rekado@elephly.net> (raw)

* gnu/packages/games.scm (supertuxkart): New variable.
---
 gnu/packages/games.scm | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 17ca12b..90963bd 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -969,6 +969,80 @@ 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"))
+           #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"
+               ;; 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)\"\\)") "")
+               (("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")
-- 
2.10.0

             reply	other threads:[~2016-10-17 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 21:37 Ricardo Wurmus [this message]
2016-10-18 12:44 ` [PATCH] gnu: Add supertuxkart Ludovic Courtès
2016-10-23 13:11   ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161017213754.8462-1-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.