gnu: Add 'make-ld-wrapper' procedure.
[jackhill/guix/guix.git] / gnu / packages / games.scm
index 65e607b..192d0db 100644 (file)
@@ -4,8 +4,11 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
 ;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
-;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,6 +33,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages audio)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages zip)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages lua)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xml)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
               ("readline" ,readline)
               ("gtk+" ,gtk+-2)
               ("mesa" ,mesa)
+              ("glu" ,glu)
               ("gtkglext" ,gtkglext)
               ("sqlite" ,sqlite)
               ("libcanberra" ,libcanberra)))
     (native-inputs `(("python-2" ,python-2)
                      ("pkg-config" ,pkg-config)))
-    (home-page "https://gnubg.org")
+    (home-page "http://gnubg.org")
     (synopsis "Backgammon game")
     (description "The GNU backgammon application can be used for playing, analyzing and
 teaching the game.  It has an advanced evaluation engine based on artificial
@@ -107,6 +117,7 @@ representation of the playing board.")
     (build-system gnu-build-system)
     (inputs `(("gtk+" ,gtk+-2)
               ("mesa" ,mesa)
+              ("glu" ,glu)
               ("libx11" ,libx11)
               ("guile" ,guile-2.0)
               ("gtkglext" ,gtkglext)))
@@ -165,7 +176,8 @@ scriptable with Guile.")
                      (let ((prefix (assoc-ref outputs "out")))
                        ;; Create directories that the makefile assumes exist.
                        (mkdir-p (string-append prefix "/bin"))
-                       (mkdir-p (string-append prefix "/share/applications"))))
+                       (mkdir-p (string-append prefix "/share/applications"))
+                       (mkdir-p (string-append prefix "/share/pixmaps"))))
                    ;; No configure script.
                    (alist-delete 'configure %standard-phases))))
        #:tests? #f)) ;; No check target.
@@ -204,6 +216,7 @@ that beneath its ruins lay buried an ancient evil.")
               ("sdl-image" ,sdl-image)
               ("sdl-mixer" ,sdl-mixer)
               ("mesa" ,mesa)
+              ("glu" ,glu)
               ("libpng" ,libpng)
               ("boost" ,boost)))
     (arguments
@@ -238,7 +251,7 @@ level's exit.  The game is presented in a 2D side view.")
      (origin
        (method url-fetch)
        (uri (string-append "http://www.hyperrealm.com/" name "/"
-                           name  "-" version  ".tar.gz")) 
+                           name  "-" version  ".tar.gz"))
        (sha256
         (base32 "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6"))))
     (build-system gnu-build-system)
@@ -275,7 +288,7 @@ a C library, so they can easily be integrated into other programs.")
                                     (string-append "--prefix=" out)))))
                       %standard-phases)))
     (inputs `(("ncurses" ,ncurses)))
-    (home-page "http://wwww.asty.org/cmatrix")
+    (home-page "http://www.asty.org/cmatrix")
     (synopsis "Simulate the display from \"The Matrix\"")
     (description "CMatrix simulates the display from \"The Matrix\" and is
 based on the screensaver from the movie's website.  It works with terminal
@@ -296,7 +309,7 @@ asynchronously and at a user-defined speed.")
         (base32
          "1jckpg1qi1vjr3pqs0dnip3rmn0mgklx63xflrpqiv3cx2qlz8kn"))))
     (build-system gnu-build-system)
-    (home-page "http://wwww.gnu.org/software/chess")
+    (home-page "http://www.gnu.org/software/chess")
     (synopsis "Full chess implementation")
     (description "GNU Chess is a chess engine.  It allows you to compete
 against the computer in a game of chess, either through the default terminal
@@ -387,7 +400,7 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
 (define-public xboard
   (package
     (name "xboard")
-    (version "4.7.3")
+    (version "4.8.0")
     (source
      (origin
        (method url-fetch)
@@ -395,17 +408,8 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
                            ".tar.gz"))
        (sha256
         (base32
-         "1amy9krr0qkvcc7gnp3i9x9ma91fc5cq8hy3gdc7rmfsaczv1l3z"))))
+         "05rdj0nyirc4g1qi5hhrjy45y52ihp1j3ldq2c5bwrz0gzy4i3y8"))))
     (build-system gnu-build-system)
-    (arguments
-     '(#:phases
-       (alist-cons-before 
-        'configure 'pre-conf
-        ;; This is GNU.  So use gnuchess as the first choice of engine
-        (lambda _
-          (substitute* "xboard.conf.in" 
-            (("-firstChessProgram fairymax") "-firstChessProgram gnuchess")))
-        %standard-phases)))
     (inputs `(("cairo" ,cairo)
               ("librsvg" ,librsvg)
               ("libxt" ,libxt)
@@ -437,21 +441,21 @@ Portable Game Notation.")
      `(#:tests? #f
        #:phases
        (alist-replace
-        'configure 
+        'configure
         (lambda* (#:key outputs #:allow-other-keys)
-          
-          (substitute* "Imakefile" 
+
+          (substitute* "Imakefile"
             (("XPMINCLUDE[\t ]*= -I/usr/X11/include/X11")
              (string-append "XPMINCLUDE = -I" (assoc-ref %build-inputs "libxpm")
                             "/include/X11")))
-          
-          (substitute* "Imakefile" 
+
+          (substitute* "Imakefile"
             (("XBOING_DIR = \\.") "XBOING_DIR=$(PROJECTROOT)"))
-          
+
           ;; FIXME: HIGH_SCORE_FILE should be set to somewhere writeable
-          
-          (zero? (system* "xmkmf" "-a" 
-                          (string-append "-DProjectRoot=" 
+
+          (zero? (system* "xmkmf" "-a"
+                          (string-append "-DProjectRoot="
                                          (assoc-ref outputs "out")))))
         (alist-replace 'install
                        (lambda* (#:key outputs #:allow-other-keys)
@@ -509,69 +513,6 @@ alternative layouts Dvorak and Colemak, as well as for the numpad.  Tutorials
 are primarily in English, however some in other languages are provided.")
     (license license:gpl3+)))
 
-(define-public tiled
-  (package
-    (name "tiled")
-    (version "0.10.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/bjorn/tiled/archive/v"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "0p4p3lv4nw11fkfvvyjirb93r2x4w2rrc2w650gl2k57k92jpiij"))))
-    (build-system gnu-build-system)
-    (inputs `(("qt" ,qt)
-              ("zlib" ,zlib)))
-    (arguments
-     '(#:phases
-       (alist-replace
-        'configure
-        (lambda* (#:key outputs #:allow-other-keys)
-          (let ((out (assoc-ref outputs "out")))
-            (system* "qmake"
-                     (string-append "PREFIX=" out))))
-        %standard-phases)))
-    (home-page "http://www.mapeditor.org/")
-    (synopsis "Tile map editor")
-    (description
-     "Tiled is a general purpose tile map editor.  It is meant to be used for
-editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
-clone.")
-
-    ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
-    ;; under BSD-2.
-    (license license:gpl2+)))
-
-(define-public openal
-  (package
-    (name "openal")
-    (version "1.15.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "http://kcat.strangesoft.net/openal-releases/openal-soft-"
-                    version ".tar.bz2"))
-              (sha256
-               (base32
-                "0mmhdqiyb3c9dzvxspm8h2v8jibhi8pfjxnf6m0wn744y1ia2a8f"))))
-    (build-system cmake-build-system)
-    (arguments
-     `(#:tests? #f)) ; no check target
-    (inputs
-     `(("alsa-lib" ,alsa-lib)
-       ("pulseaudio" ,pulseaudio)))
-    (synopsis "3D audio API")
-    (description
-     "OpenAL provides capabilities for playing audio in a virtual 3D
-environment.  Distance attenuation, doppler shift, and directional sound
-emitters are among the features handled by the API.  More advanced effects,
-including air absorption, occlusion, and environmental reverb, are available
-through the EFX extension.  It also facilitates streaming audio, multi-channel
-buffers, and audio capture.")
-    (home-page "http://kcat.strangesoft.net/openal.html")
-    (license license:lgpl2.0+)))
-
 (define-public irrlicht
   (package
     (name "irrlicht")
@@ -603,14 +544,21 @@ buffers, and audio capture.")
                     (and (zero? (system* "unzip" source))
                          ;; The actual source is buried a few directories deep.
                          (chdir "irrlicht-1.8.1/source/Irrlicht/")))
-                  ;; No configure script
-                  (alist-delete 'configure %standard-phases)))
+                  (alist-cons-after
+                   'unpack 'apply-patch/mesa-10-fix
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (zero? (system* "patch" "--force" "-p3" "-i"
+                                     (assoc-ref inputs "patch/mesa-10-fix"))))
+                   ;; No configure script
+                   (alist-delete 'configure %standard-phases))))
        #:tests? #f ; no check target
        #:make-flags '("CC=gcc" "sharedlib")))
     (native-inputs
-     `(("unzip" ,unzip)))
+     `(("patch/mesa-10-fix" ,(search-patch "irrlicht-mesa-10.patch"))
+       ("unzip" ,unzip)))
     (inputs
-     `(("mesa" ,mesa)))
+     `(("mesa" ,mesa)
+       ("glu" ,glu)))
     (synopsis "3D game engine written in C++")
     (description
      "The Irrlicht Engine is a high performance realtime 3D engine written in
@@ -623,15 +571,16 @@ for common mesh file formats, and collision detection.")
 (define minetest-data
   (package
     (name "minetest-data")
-    (version "0.4.10")
+    (version "0.4.12")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://github.com/minetest/minetest_game/archive/"
                     version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "09mr71kl7mf4ihszqz1vnwk814p7fvqknad150iic2340a7qzf0i"))))
+                "0642vy6r6sv96mz6wbs9qvyr95vd69zj4fxiljdg9801javrmm9p"))))
     (build-system trivial-build-system)
     (native-inputs
      `(("source" ,source)
@@ -659,3 +608,217 @@ for common mesh file formats, and collision detection.")
      "Game data for the Minetest infinite-world block sandox game.")
     (home-page "http://minetest.net")
     (license license:lgpl2.1+)))
+
+(define-public minetest
+  (package
+    (name "minetest")
+    (version "0.4.12")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/minetest/minetest/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1pqp8hfwg5wkimig8j5jrihzgjjgplxr24w5xisrxvx1hlvnczdk"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+         (list "-DRUN_IN_PLACE=0"
+               "-DENABLE_FREETYPE=1"
+               "-DENABLE_GETTEXT=1"
+               (string-append "-DIRRLICHT_INCLUDE_DIR="
+                              (assoc-ref %build-inputs "irrlicht")
+                              "/include/irrlicht")
+               (string-append "-DCURL_INCLUDE_DIR="
+                              (assoc-ref %build-inputs "curl")
+                              "/include/curl"))
+       #:tests? #f)) ; no check target
+    (native-search-paths
+     (list (search-path-specification
+            (variable "MINETEST_SUBGAME_PATH")
+            (files '("share/minetest/games")))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("irrlicht" ,irrlicht)
+       ("libpng" ,libpng)
+       ("libjpeg" ,libjpeg)
+       ("libxxf86vm" ,libxxf86vm)
+       ("mesa" ,mesa)
+       ("libogg" ,libogg)
+       ("libvorbis" ,libvorbis)
+       ("openal" ,openal)
+       ("freetype" ,(@ (gnu packages fontutils) freetype))
+       ("curl" ,curl)
+       ("luajit" ,luajit)
+       ("gettext" ,gnu-gettext)
+       ("sqlite" ,sqlite)))
+    (propagated-inputs
+     `(("minetest-data" ,minetest-data)))
+    (synopsis "Infinite-world block sandbox game")
+    (description
+     "Minetest is a sandbox construction game.  Players can create and destroy
+various types of blocks in a three-dimensional open world.  This allows
+forming structures in every possible creation, on multiplayer servers or as a
+single player.  Mods and texture packs allow players to personalize the game
+in different ways.")
+    (home-page "http://minetest.net")
+    (license license:lgpl2.1+)))
+
+(define glkterm
+  (package
+   (name "glkterm")
+   (version "1.0.4")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
+                         "glk/implementations/glkterm-104.tar.gz"))
+     (sha256
+      (base32
+       "0zlj9nlnkdlvgbiliczinirqygiq8ikg5hzh5vgcmnpg9pvnwga7"))))
+   (build-system gnu-build-system)
+   (propagated-inputs `(("ncurses" ,ncurses))) ; required by Make.glkterm
+   (arguments
+    '(#:tests? #f ; no check target
+      #:phases
+      (alist-replace
+       'install
+       (lambda* (#:key outputs #:allow-other-keys)
+         (let* ((out (assoc-ref outputs "out"))
+                (inc (string-append out "/include")))
+           (mkdir-p inc)
+           (for-each
+            (lambda (file)
+              (copy-file file (string-append inc "/" file)))
+            '("glk.h" "glkstart.h" "gi_blorb.h" "gi_dispa.h" "Make.glkterm"))
+           (mkdir (string-append out "/lib"))
+           (copy-file "libglkterm.a" (string-append out "/lib/libglkterm.a"))))
+       (alist-delete 'configure %standard-phases))))
+   (home-page "http://www.eblong.com/zarf/glk/")
+   (synopsis "Curses Implementation of the Glk API")
+   (description
+    "Glk defines a portable API for applications with text UIs.  It was
+primarily designed for interactive fiction, but it should be suitable for many
+interactive text utilities, particularly those based on a command line.
+This is an implementation of the Glk library which runs in a terminal window,
+using the curses.h library for screen control.")
+   (license (license:fsf-free "file://README"))))
+
+(define-public glulxe
+  (package
+   (name "glulxe")
+   (version "0.5.2")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append "http://www.ifarchive.org/if-archive/programming/"
+                         "glulx/interpreters/glulxe/glulxe-052.tar.gz"))
+     (sha256
+      (base32
+       "19iw6kl8ncqcy9pv4gsqfh3xsa1n94zd234rqavvmxccnf3nj19g"))))
+   (build-system gnu-build-system)
+   (inputs `(("glk" ,glkterm)))
+   (arguments
+    '(#:tests? #f ; no check target
+      #:make-flags
+      (let* ((glk (assoc-ref %build-inputs "glk")))
+        (list (string-append "GLKINCLUDEDIR=" glk "/include")
+              (string-append "GLKLIBDIR=" glk "/lib")
+              (string-append "GLKMAKEFILE=" "Make.glkterm")))
+      #:phases
+      (alist-replace
+       'install
+       (lambda* (#:key outputs #:allow-other-keys)
+         (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+           (mkdir-p bin)
+           (copy-file "glulxe" (string-append bin "/glulxe"))))
+       (alist-delete 'configure %standard-phases))))
+   (home-page "http://www.eblong.com/zarf/glulx/")
+   (synopsis "Interpreter for Glulx VM")
+   (description
+    "Glulx is a 32-bit portable virtual machine intended for writing and
+playing interactive fiction.  It was designed by Andrew Plotkin to relieve
+some of the restrictions in the venerable Z-machine format.  This is the
+reference interpreter, using Glk API.")
+   (license (license:fsf-free "file://README"))))
+
+(define-public retroarch
+  (package
+    (name "retroarch")
+    (version "1.0.0.3-beta")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/libretro/RetroArch/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1iqcrb076xiih20sk8n1w79xsp4fb8pj4vkmdc1xn562h56y4nxx"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no tests
+       #:phases
+       (alist-replace
+        'configure
+        (lambda _
+          (substitute* "qb/qb.libs.sh"
+            (("/bin/true") (which "true")))
+          (zero? (system*
+                  "./configure"
+                  (string-append "--prefix=" %output)
+                  (string-append "--global-config-dir=" %output "/etc"))))
+        %standard-phases)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("ffmpeg" ,ffmpeg)
+       ("freetype" ,freetype)
+       ("libxinerama" ,libxinerama)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libxml2" ,libxml2)
+       ("libxv" ,libxv)
+       ("mesa" ,mesa)
+       ("openal" ,openal)
+       ("pulseaudio" ,pulseaudio)
+       ("python" ,python)
+       ("sdl" ,sdl2)
+       ("udev" ,eudev)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("which" ,which)))
+    (home-page "http://www.libretro.com/")
+    (synopsis "Reference frontend for the libretro API")
+    (description
+     "Libretro is a simple but powerful development interface that allows for
+the easy creation of emulators, games and multimedia applications that can plug
+straight into any libretro-compatible frontend.  RetroArch is the official
+reference frontend for the libretro API, currently used by most as a modular
+multi-system game/emulator system.")
+    (license license:gpl3+)))
+
+(define-public gnugo
+  (package
+    (name "gnugo")
+    (version "3.8")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnu/gnugo/gnugo-" version
+                                 ".tar.gz"))
+             (sha256
+              (base32
+               "0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
+    (build-system gnu-build-system)
+    (inputs `(("readline" ,readline)))
+    (synopsis "Play the game of Go")
+    (description "GNU Go is a program that plays the game of Go, in which
+players place stones on a grid to form territory or capture other stones.
+While it can be played directly from the terminal, rendered in ASCII
+characters, it is also possible to play GNU Go with 3rd party graphical
+interfaces or even in Emacs.  It supports the standard game storage format
+(SGF, Smart Game Format) and inter-process communication format (GMP, Go
+Modem Protocol).")
+    (home-page "http://www.gnu.org/software/gnugo/")
+    (license license:gpl3+)))