summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm263
1 files changed, 223 insertions, 40 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8c00c2e66e..fdd3a0e21e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -42,7 +42,7 @@
 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
 ;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
-;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019-2023 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
@@ -70,7 +70,7 @@
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022, 2023 Yovan Naumovski <yovan@gorski.stream>
 ;;; Copyright © 2022 Roman Riabenko <roman@riabenko.com>
-;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
+;;; Copyright © 2022, 2023 zamfofex <zamfofex@twdb.moe>
 ;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Hendursaga <hendursaga@aol.com>
@@ -78,6 +78,7 @@
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
+;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -154,6 +155,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell)
+  #:use-module (gnu packages haskell-check)
   #:use-module (gnu packages haskell-crypto)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
@@ -201,6 +203,7 @@
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages squirrel)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages texinfo)
@@ -222,6 +225,7 @@
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
@@ -415,6 +419,40 @@ Plenty of classic platforming in four nice colors guaranteed!
 The game includes a built-in editor so you can design and share your own maps.")
     (license license:gpl2+)))
 
+(define-public anarch
+  (let ((commit "2d78d0c69a3aac14dbd8f8aca62d0cbd9d27c860")
+        (revision "1"))
+    (package
+      (name "anarch")
+      (version (git-version "1.1d" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://git.sr.ht/~drummyfish/Anarch")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1lg9r6q1davn5yj181ccygmvaigvm8fr9q2s1bc77a1vkz68vzdk"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f ;no tests
+             #:phases #~(modify-phases %standard-phases
+                          (delete 'configure) ;no configure script
+                          (replace 'build
+                            (lambda _
+                              (invoke "./make.sh" "sdl")))
+                          (replace 'install
+                            (lambda _
+                              (let ((bin (string-append #$output "/bin")))
+                                (install-file "anarch" bin)))))))
+      (inputs (list alsa-lib libxcursor libxrandr sdl2))
+      (home-page "https://drummyfish.gitlab.io/anarch/")
+      (synopsis "Public domain 90s-style shooter game")
+      (description "Anarch is a small, completely public domain, 90s-style
+Doom clone shooter game.")
+      (license license:cc0))))
+
 (define-public armagetronad
   (package
     (name "armagetronad")
@@ -2043,33 +2081,59 @@ scriptable with Guile.")
   (package
     (name "gnushogi")
     (version "1.4.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
-    (arguments `(#:tests? #f)) ;; No check target.
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
+              (modules '((guix build utils)))
+              ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
+              ;; identifier [-Wpedantic]"
+              (snippet '(begin
+                          (substitute* "gnushogi/dspwrappers.c"
+                            (("__FUNCTION__")
+                             "__extension__ __FUNCTION__"))))))
+    (arguments
+     `(#:configure-flags (list (string-append
+                                "CFLAGS="
+                                (string-join '("-Wno-format"
+                                               "-Wno-unused-but-set-variable"
+                                               "-Wno-bool-compare")
+                                             " ")))
+       #:make-flags '("LDFLAGS=-z muldefs")
+       #:phases (modify-phases %standard-phases
+                  ;; Skip --enable-fast-install flag
+                  (replace 'configure
+                    (lambda* (#:key outputs configure-flags #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (setenv "CONFIG_SHELL"
+                                (which "sh"))
+                        (setenv "SHELL"
+                                (which "sh"))
+                        (apply invoke "./configure"
+                               (string-append "--prefix=" out) configure-flags)))))
+       #:test-target "sizetest"))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/gnushogi/")
-    (synopsis "The game of Shogi (Japanese chess)")
-    (description  "GNU Shogi is a program that plays the game Shogi (Japanese
-Chess).  It is similar to standard chess but this variant is far more complicated.")
+    (synopsis "Game of Shogi (Japanese chess)")
+    (description
+     "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
+It is similar to standard chess but this variant is far more complicated.")
     (license license:gpl3+)))
 
 (define-public ltris
   (package
     (name "ltris")
-    (version "1.2.4")
+    (version "1.2.6")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/lgames/ltris/"
                            "ltris-" version ".tar.gz"))
        (sha256
-        (base32 "10wg6v12w3jms8ka2x9a87p06l9gzpr94ai9v428c9r320q7psyn"))))
+        (base32 "1xj65kn815x2hq1ynzjyc90dj178xwa2xvx7jx99qf60ahaf4g62"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -3582,6 +3646,37 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
               ("bash" ,bash)))
     (native-inputs '())))
 
+(define-public fuzzylite
+  (package
+    (name "fuzzylite")
+    (version "6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fuzzylite/fuzzylite")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0yay0qc81x0irlvxqpy7jywjxpkmpjabdhq2hdh28r9z85wp2nwb"))
+              (patches (search-patches "fuzzylite-use-catch2.patch"
+                                       "fuzzylite-soften-float-equality.patch"
+                                       "fuzzylite-relative-path-in-tests.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'configure 'switch-to-fuzzylite-dir
+                    (lambda _
+                      (chdir "fuzzylite"))))))
+    (native-inputs (list catch2))
+    (home-page "https://www.fuzzylite.com/")
+    (synopsis "Fuzzy logic control binary")
+    (description
+     "This package provides fuzzylite, a fuzzy logic control library which
+allows one to easily create fuzzy logic controllers in a few steps utilizing
+object-oriented programming.")
+    (license license:gpl3)))
+
 (define-public xboard
   (package
     (name "xboard")
@@ -10233,7 +10328,7 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
 (define-public q5go
   (package
    (name "q5go")
-   (version "1.0")
+   (version "2.1.3")
    (source (origin
             (method git-fetch)
             (uri (git-reference
@@ -10242,10 +10337,10 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
             (file-name (git-file-name name version))
             (sha256
              (base32
-              "1gdlfqcqkqv7vph3qwq78d0qz6dhmdsranxq9bmixiisbzkqby31"))))
+              "0x8x7mp61g3lwabx9z4vsyd743kfqibnqhym7xd0b7811flca3ri"))))
    (build-system gnu-build-system)
    (native-inputs
-    (list pkg-config))
+    (list autoconf automake pkg-config))
    (inputs
     (list qtbase-5 qtmultimedia-5 qtsvg-5))
    (arguments
@@ -10254,32 +10349,34 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
         (add-after 'unpack 'fix-configure-script
           (lambda _
             ;; Bypass the unavailable qtchooser program.
-            (substitute* "configure"
+            (for-each delete-file
+                      '("configure"
+                        "Makefile.in"
+                        "src/Makefile.in"
+                        "src/translations/Makefile.in"))
+            (substitute* "configure.ac"
+              (("AC_PATH_PROG\\(qtchooser, .*\\)")
+               "")
               (("test -z \"QTCHOOSER\"")
                "false")
-              (("qtchooser -run-tool=(.*) -qt=qt5" _ command)
-               command))
-            #t))
-        (add-after 'unpack 'fix-header
-          (lambda _
-            (substitute* "src/bitarray.h"
-              (("#include <cstring>" all)
-               (string-append all "\n#include <stdexcept>")))))
+              (("\\$\\(qtchooser -list-versions\\)")
+               "qt5")
+              (("qtchooser -run-tool=(.*) -qt=\\$QT5_NAME" _ command)
+               command))))
         (add-after 'unpack 'fix-paths
-          (lambda _
-            (substitute* '("src/pics/Makefile.in"
-                           "src/translations/Makefile.in")
-              (("\\$\\(datadir\\)/qGo/")
-               "$(datadir)/q5go/"))
-            #t))
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* '("src/setting.cpp")
+              (("/usr/share/\" PACKAGE \"/translations")
+               (string-append (assoc-ref outputs "out")
+                              "/share/qGo/translations")))))
         (add-after 'install 'install-desktop-file
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (apps (string-append out "/share/applications"))
-                   (pics (string-append out "/share/q5go/pics")))
+                   (images (string-append out "/share/qGo/images")))
               (delete-file-recursively (string-append out "/share/applnk"))
               (delete-file-recursively (string-append out "/share/mimelnk"))
-              (install-file "../source/src/pics/Bowl.ico" pics)
+              (install-file "../source/src/images/Bowl.ico" images)
               (mkdir-p apps)
               (with-output-to-file (string-append apps "/q5go.desktop")
                 (lambda _
@@ -10299,8 +10396,7 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
                            Comment[zh]=围棋~@
                            Terminal=false~@
                            Type=Application~%"
-                          out pics))))
-             #t)))))
+                          out images)))))))))
    (synopsis "Qt GUI to play the game of Go")
    (description
     "This a tool for Go players which performs the following functions:
@@ -10568,14 +10664,14 @@ ChessX.")
 (define-public barrage
   (package
     (name "barrage")
-    (version "1.0.6")
+    (version "1.0.7")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/lgames/barrage/"
                            "barrage-" version ".tar.gz"))
        (sha256
-        (base32 "1bhx708s7viv01m6bmpjsdgr33wk5kqw4wf7bvgw73a07v6j8ncw"))))
+        (base32 "0j7j6n5h97xpw0h8zi5a8ziw1vjsbr5gk4dcsiwzh59qn0djnrkh"))))
     (build-system gnu-build-system)
     (inputs
      (list hicolor-icon-theme sdl sdl-mixer))
@@ -11212,6 +11308,54 @@ Magic II (aka HOMM2) game engine.  It requires assets and game resources to
 play; it will look for them at @file{~/.local/share/fheroes2} folder.")
     (license license:gpl2)))
 
+(define-public vcmi
+  (package
+    (name "vcmi")
+    (version "1.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vcmi/vcmi")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0f3fk1fc2wb7f2j4pxz89dzr8zjnrdh435mijia483a3bq59w7pk"))
+              (patches (search-patches "vcmi-disable-privacy-breach.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~(list "-DFORCE_BUNDLED_FL=OFF")
+           ;; Test suites do not seem well supported upstream and are disabled by default.
+           ;; Pass -DENABLE_TEST to configure to enable.
+           #:tests? #f))
+    (native-inputs
+     (list boost
+           ffmpeg
+           fuzzylite
+           ;; googletest ; needed for tests, but tests are disabled
+           libxkbcommon
+           luajit
+           minizip
+           pkg-config
+           python
+           ;; XXX: Build currently fails with qtbase-6 and qttools-6
+           qtbase-5
+           qttools-5
+           sdl2
+           sdl2-mixer
+           sdl2-image
+           sdl2-ttf
+           tbb
+           vulkan-headers
+           zlib))
+    (home-page "https://vcmi.eu/")
+    (synopsis "Turn-based strategy game engine")
+    (description
+     "@code{vcmi} is an implementation of the Heroes of Might and
+Magic III game engine.  It requires assets and game resources to
+play; it will look for them at @file{~/.local/share/vcmi} folder.")
+    (license license:gpl2)))
+
 (define-public apricots
   (package
     (name "apricots")
@@ -11278,6 +11422,45 @@ original, they have been invented by Thomas Colcombet.")
     (home-page "https://www.gnu.org/software/liquidwar6/")
     (license license:gpl3+)))
 
+(define-public plunder
+  (let ((commit "026ded7083df5134bdf05b1ec7e5a0099ac9b9d2")
+        (revision "1"))
+    (package
+      (name "plunder")
+      (version (git-version "1.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jappeace/plunder")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0m0v8x6q9iq4zihwmysbxjwkq18nar6xhq4g18p2g8c6azj2mgd6"))))
+      (build-system haskell-build-system)
+      (inputs (list ghc-monadrandom
+                    ghc-quickcheck
+                    ghc-file-embed
+                    ghc-generic-lens
+                    ghc-lens
+                    ghc-random
+                    ghc-reflex
+                    ghc-reflex-sdl2
+                    ghc-sdl2
+                    ghc-sdl2-gfx
+                    ghc-sdl2-image
+                    ghc-sdl2-ttf
+                    ghc-vector
+                    ghc-witherable))
+      (native-inputs (list ghc-hspec ghc-hspec-core hspec-discover))
+      (home-page "https://github.com/jappeace/plunder")
+      (synopsis "Game about looting a hexagonal-tile world")
+      (description
+       "This package provides a work-in-progress game where you control a
+Viking and your objective is to loot all of the occupied hexagonal tiles in
+the map.")
+      (license license:expat))))
+
 (define-public freerct
   (package
     (name "freerct")