gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
index 5da40b1..8a29297 100644 (file)
@@ -1,18 +1,19 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017 Julian Graham <joolean@gmail.com>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,6 +74,8 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages stb)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xdisorg)
@@ -112,7 +115,7 @@ is used in some video games and movies.")
 (define-public deutex
   (package
    (name "deutex")
-   (version "5.1.1")
+   (version "5.1.2")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://github.com/Doom-Utils/" name
@@ -120,7 +123,7 @@ is used in some video games and movies.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0yqzlb3imkdzy8yd7xc69xk9ajf4dhiz3a9ssphyf4c9rcr440wj"))))
+              "1rj3w4xa0n4jixy4j7p6gbclylbgxvhdnji7xnkydrqii9rxnbp4"))))
    (build-system gnu-build-system)
    (native-inputs `(("asciidoc" ,asciidoc)))
    (home-page "https://github.com/Doom-Utils/deutex")
@@ -223,19 +226,28 @@ PCM data.")
 (define-public gzochi
   (package
     (name "gzochi")
-    (version "0.11.1")
+    (version "0.12")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://savannah/gzochi/gzochi-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "13j1m92zhxwkaaja3lg5x0h0b28mrrawdzk9d3hd19031akfxwb3"))))
+                "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'build 'no-Werror
+                    (lambda _
+                      ;; Don't abort builds due to things like GLib
+                      ;; deprecation warnings.
+                      (substitute* (find-files "." "^Makefile\\.in$")
+                        (("-Werror") ""))
+                      #t)))))
     (native-inputs `(("pkgconfig" ,pkg-config)))
     (inputs `(("bdb" ,bdb)
               ("glib" ,glib)
-              ("guile" ,guile-2.0)
+              ("guile" ,guile-2.2)
               ("libmicrohttpd" ,libmicrohttpd)
               ("ncurses" ,ncurses)
               ("sdl" ,sdl)
@@ -254,7 +266,7 @@ provide connectivity for client applications written in any language.")
 (define-public nml
   (package
     (name "nml")
-    (version "0.4.4")
+    (version "0.4.5")
     (source
      (origin
        (method url-fetch)
@@ -262,12 +274,12 @@ provide connectivity for client applications written in any language.")
                            version "/nml-" version ".tar.gz"))
        (sha256
         (base32
-         "0wk9ls5qyjwkra54rkj1gg94xbwzi7b84a5fh1ma1q7pbimi8rmg"))))
+         "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pillow" ,python-pillow)
        ("python-ply" ,python-ply)))
-    (home-page "http://dev.openttdcoop.org/projects/nml")
+    (home-page "https://dev.openttdcoop.org/projects/nml")
     (synopsis "NML compiler")
     (description
      "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
@@ -298,7 +310,7 @@ files) into @file{.grf} and/or @file{.nfo} files.")
     (synopsis "2D game engine for Python")
     (description
      "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
-general-purpose 2D game engine.  It takes care of several details fro you so
+general-purpose 2D game engine.  It takes care of several details for you so
 you can focus on the game itself.  This makes more rapid game development
 possible, and it also makes the SGE easy to learn.")
     (license license:lgpl3+)))
@@ -345,14 +357,14 @@ levels.")
 (define-public python-xsge
   (package
     (name "python-xsge")
-    (version "2017.06.09")
+    (version "2018.02.26")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1vy7c2y7ihvmggs93zgfv2h3049s384wid8a5snzrrba8bhbb89p"))))
+                "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -361,10 +373,9 @@ levels.")
          ;; system's default flags, "--single-version-externally-managed".
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
-             (zero?
-              (system* "python" "setup.py" "install"
-                       (string-append "--prefix=" (assoc-ref outputs "out"))
-                       "--root=/")))))
+             (invoke "python" "setup.py" "install"
+                     (string-append "--prefix=" (assoc-ref outputs "out"))
+                     "--root=/"))))
        #:tests? #f)) ; no check target
     (propagated-inputs
      `(("python-sge-pygame" ,python-sge-pygame)
@@ -386,15 +397,16 @@ support.")
 (define-public tiled
   (package
     (name "tiled")
-    (version "1.1.1")
+    (version "1.2.1")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/bjorn/tiled/archive/v"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/bjorn/tiled.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "102vw13iw1kbjj6h2sm8gl1jfvmqgq0zddd6hdmqagza5b6w32k3"))))
+                "1dl06k2p0r7l20ghxcq5sn7j0jl2l8q4m27vmfs2qfgvldjll2h3"))))
     (build-system gnu-build-system)
     (inputs
      `(("qtbase" ,qtbase)
@@ -413,8 +425,8 @@ support.")
                                (assoc-ref inputs "qttools")
                                "/bin/lrelease\n")))
              (let ((out (assoc-ref outputs "out")))
-               (system* "qmake"
-                        (string-append "PREFIX=" out))))))))
+               (invoke "qmake"
+                       (string-append "PREFIX=" out))))))))
     (home-page "http://www.mapeditor.org/")
     (synopsis "Tile map editor")
     (description
@@ -429,35 +441,49 @@ clone.")
 (define-public sfml
   (package
     (name "sfml")
-    (version "2.3.2")
+    (version "2.5.1")
     (source (origin
-              (method url-fetch)
+              (method git-fetch)
               ;; Do not fetch the archives from
               ;; http://mirror0.sfml-dev.org/files/ because files there seem
               ;; to be changed in place.
-              (uri (string-append "https://github.com/SFML/SFML/archive/"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (uri (git-reference
+                    (url "https://github.com/SFML/SFML.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
+                "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Ensure system libraries are used.
+                  (delete-file-recursively "extlibs")
+                  #t))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
-       (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE")
+       (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
+             "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
        #:tests? #f)) ; no tests
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (inputs
      `(("mesa" ,mesa)
        ("glew" ,glew)
-       ("flac" ,flac)
-       ("libvorbis" ,libvorbis)
        ("libx11" ,libx11)
        ("xcb-util-image" ,xcb-util-image)
        ("libxrandr" ,libxrandr)
        ("eudev" ,eudev)
-       ("freetype" ,freetype)
        ("libjpeg" ,libjpeg)
        ("libsndfile" ,libsndfile)
+       ("stb-image" ,stb-image)
+       ("stb-image-write" ,stb-image-write)))
+    (propagated-inputs
+     ;; In Requires.private of pkg-config files.
+     `(("flac" ,flac)
+       ("freetype" ,freetype)
+       ("libvorbis" ,libvorbis)
        ("openal" ,openal)))
     (home-page "https://www.sfml-dev.org")
     (synopsis "Simple and Fast Multimedia Library")
@@ -507,7 +533,7 @@ sounds from presets such as \"explosion\" or \"powerup\".")
 (define-public physfs
   (package
     (name "physfs")
-    (version "2.0.3")
+    (version "3.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -516,10 +542,18 @@ sounds from presets such as \"explosion\" or \"powerup\".")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
+                "1wgj2zqpnfbnyyi1i7bq5pshcc9n5cvwlpzp8im67nb8662ryyxp"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f))                    ; no check target
+     '(#:tests? #f                      ; no check target
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-CMakeLists.txt
+                    (lambda _
+                      (substitute* "CMakeLists.txt"
+                        ;; XXX: For some reason CMakeLists.txt disables
+                        ;; RUNPATH manipulation when the compiler is GCC.
+                        (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
+                      #t)))))
     (inputs
      `(("zlib" ,zlib)))
     (native-inputs
@@ -540,14 +574,14 @@ archive on a per-file basis.")
 (define-public love
   (package
     (name "love")
-    (version "0.10.2")
+    (version "11.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://bitbucket.org/rude/love/downloads/"
                                  "love-" version "-linux-src.tar.gz"))
              (sha256
               (base32
-               "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj"))))
+               "1pkwiszmjs0xrwk0wqbc5cp9108b1y8gwsid0gqk1s0x09q9lpmw"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -612,18 +646,17 @@ etc.")
 (define-public allegro
   (package
     (name "allegro")
-    (version "5.2.2.0")
+    (version "5.2.4.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/liballeg/allegro5/releases"
                                   "/download/" version "/allegro-"
-                                  (if (equal? "0" (string-take-right version 1))
-                                    (string-drop-right version 2)
-                                    version)
-                                  ".tar.gz"))
+                                  version ".tar.gz"))
+              (patches (search-patches
+                        "allegro-fix-compilation-mesa-18.2.5-and-later.patch"))
               (sha256
                (base32
-                "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2"))))
+                "1w9a5yqi5q03b2qvmx5ff90paz0xbr9cy7i7f0xiqa65ava66q9l"))))
     (build-system cmake-build-system)
     (arguments `(#:tests? #f)) ; there are no tests
     (inputs
@@ -950,11 +983,6 @@ painted with a mouse.")
         (base32
          "0w0pamjc3vj0jr718hysrw8x076fq6n9rd6wcb36sn2jd0lqvi98"))))
     (build-system gnu-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'bootstrap
-           (lambda _ (zero? (system* "sh" "bootstrap")))))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -1015,7 +1043,7 @@ of use.")
 (define-public openmw
   (package
     (name "openmw")
-    (version "0.43.0")
+    (version "0.44.0")
     (source
      (origin
        (method url-fetch)
@@ -1024,7 +1052,7 @@ of use.")
                        name "-" version ".tar.gz"))
        (sha256
         (base32
-         "11phjx7b3mv4n295xgq25lkcwq0mgr35i5k05hf1h77y6n6jbw64"))))
+         "03fgm2f2r7y0aqlgp038pdlnllgvm3jimrp968p4nhz1sffvjzcy"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; No test target
@@ -1056,16 +1084,34 @@ games.")
 (define-public godot
   (package
     (name "godot")
-    (version "3.0")
+    (version "3.0.6")
     (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://github.com/godotengine/godot/archive/"
-                              version "-stable.tar.gz"))
-              (file-name (string-append name "-" version))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/godotengine/godot")
+                    (commit (string-append version "-stable"))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1jhp269n1a7c663v2555444icbjwzscj4r8cq4rrrap7r7dr4hyc"))))
+                "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Drop libraries that we take from Guix.  Note that some
+                  ;; of these may be modified; see "thirdparty/README.md".
+                  (with-directory-excursion "thirdparty"
+                    (for-each delete-file-recursively
+                              '("freetype"
+                                "libogg"
+                                "libpng"
+                                "libtheora"
+                                "libvorbis"
+                                "libvpx"
+                                "libwebp"
+                                "openssl"
+                                "opus"
+                                "zlib"))
+                    #t)))))
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
@@ -1083,6 +1129,7 @@ games.")
                            "builtin_libpng=no"
                            "builtin_libtheora=no"
                            "builtin_libvorbis=no"
+                           "builtin_libvpx=no"
                            "builtin_libwebp=no"
                            "builtin_openssl=no"
                            "builtin_opus=no"
@@ -1108,16 +1155,16 @@ games.")
                  (if (file-exists? "godot.x11.tools.64")
                      (rename-file "godot.x11.tools.64" "godot")
                      (rename-file "godot.x11.tools.32" "godot"))
-                 (install-file "godot" bin)))))
+                 (install-file "godot" bin))
+               #t)))
          (add-after 'install 'install-godot-desktop
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (desktop (string-append out "/share/applications"))
                     (icon-dir (string-append out "/share/pixmaps")))
-               (mkdir-p desktop)
-               (mkdir-p icon-dir)
                (rename-file "icon.png" "godot.png")
                (install-file "godot.png" icon-dir)
+               (mkdir-p desktop)
                (with-output-to-file
                    (string-append desktop "/godot.desktop")
                  (lambda _
@@ -1138,6 +1185,7 @@ games.")
               ("glu" ,glu)
               ("libtheora" ,libtheora)
               ("libvorbis" ,libvorbis)
+              ("libvpx" ,libvpx)
               ("libwebp" ,libwebp)
               ("libx11" ,libx11)
               ("libxcursor" ,libxcursor)
@@ -1208,3 +1256,47 @@ related games such as Heretic and Hexen.  It comes with a 3d preview mode and
 a 2D editor view.")
     (home-page "http://eureka-editor.sourceforge.net/")
     (license license:gpl2+)))
+
+(define-public guile-chickadee
+  (package
+    (name "guile-chickadee")
+    (version "0.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://files.dthompson.us/chickadee/"
+                                  "chickadee-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0jl223dybsj5gvs7z4q60gnafj1b7kgi5mx0kj58m5knrp8qwg5h"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags '("GUILE_AUTO_COMPILE=0")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-godir
+           (lambda _
+             ;; Install compiled '.go' files into the site directory.
+             (substitute* "Makefile.in"
+               (("/ccache") "/site-ccache")))))))
+    (propagated-inputs
+     `(("guile-opengl" ,guile-opengl)
+       ("guile-sdl2" ,guile-sdl2)))
+    (inputs
+     `(("guile" ,guile-2.2)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("texinfo" ,texinfo)))
+    (home-page "https://dthompson.us/projects/chickadee.html")
+    (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
+    (description "Chickadee is a game development toolkit for Guile Scheme
+built on top of SDL2 and OpenGL.  Chickadee aims to provide all the features
+that parenthetically inclined game developers need to make 2D (and eventually
+3D) games in Scheme, such as:
+
+@enumerate
+@item extensible, fixed-timestep game loop
+@item OpenGL-based rendering engine
+@item keyboard, mouse, controller input
+@item REPL-driven development model
+@end enumerate\n")
+    (license license:gpl3+)))