gnu: physfs: Update to 3.0.2.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
index 08b84f0..53ed66c 100644 (file)
@@ -14,6 +14,7 @@
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix svn-download)
   #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -431,7 +433,7 @@ support.")
 (define-public tiled
   (package
     (name "tiled")
-    (version "1.2.2")
+    (version "1.2.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -440,7 +442,7 @@ support.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0ay4x1b6h5xfax1cqry2fklcmqi6a16klgmci4gkhga7as66lnnn"))))
+                "1nfyigfkl10n9r82p1qxhpr09jn2kwalh9n5r209bcaj8dxspph8"))))
     (build-system gnu-build-system)
     (inputs
      `(("qtbase" ,qtbase)
@@ -567,7 +569,7 @@ sounds from presets such as \"explosion\" or \"powerup\".")
 (define-public physfs
   (package
     (name "physfs")
-    (version "3.0.1")
+    (version "3.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -576,7 +578,7 @@ sounds from presets such as \"explosion\" or \"powerup\".")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1wgj2zqpnfbnyyi1i7bq5pshcc9n5cvwlpzp8im67nb8662ryyxp"))))
+                "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; no check target
@@ -857,16 +859,16 @@ interface (API).")
 (define-public python-pygame
   (package
     (name "python-pygame")
-    (version "1.9.3")
+    (version "1.9.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "pygame" version))
               (sha256
                (base32
-                "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
+                "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f ; Tests require pygame to be installed first.
+     `(#:tests? #f                ; tests require pygame to be installed first
        #:phases
        (modify-phases %standard-phases
          ;; Set the paths to the dependencies manually because
@@ -891,23 +893,23 @@ interface (API).")
                (substitute* "Setup.in"
                  (("FONT = -lSDL_ttf")
                   (string-append "FONT = -I" font-ref "/include/SDL -L"
-                                             font-ref "/lib -lSDL_ttf")))
+                                 font-ref "/lib -lSDL_ttf")))
                (substitute* "Setup.in"
                  (("IMAGE = -lSDL_image")
                   (string-append "IMAGE = -I" image-ref "/include/SDL -L"
-                                              image-ref "/lib -lSDL_image")))
+                                 image-ref "/lib -lSDL_image")))
                (substitute* "Setup.in"
                  (("MIXER = -lSDL_mixer")
                   (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
-                                              mixer-ref "/lib -lSDL_mixer")))
+                                 mixer-ref "/lib -lSDL_mixer")))
                (substitute* "Setup.in"
                  (("SMPEG = -lsmpeg")
                   (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
-                                              smpeg-ref "/lib -lsmpeg")))
+                                 smpeg-ref "/lib -lsmpeg")))
                (substitute* "Setup.in"
                  (("PNG = -lpng")
                   (string-append "PNG = -I" png-ref "/include -L"
-                                            png-ref "/lib -lpng")))
+                                 png-ref "/lib -lpng")))
                (substitute* "Setup.in"
                  (("JPEG = -ljpeg")
                   (string-append "JPEG = -I" jpeg-ref "/include -L"
@@ -1329,3 +1331,76 @@ that parenthetically inclined game developers need to make 2D (and eventually
 @item REPL-driven development model
 @end enumerate\n")
     (license license:gpl3+)))
+
+(define-public bennu-game-development
+  (package
+    (name "bennu-game-development")
+    (version "348")
+    (source (origin
+              (method svn-fetch)
+              (uri (svn-reference
+                    (url "http://svn.code.sf.net/p/bennugd/code")
+                    (revision (string->number version))))
+              (file-name (string-append name "-" version))
+              (sha256
+               (base32
+                "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (delete-file-recursively "3rdparty") #t))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-configure-to-use-openssl
+           (lambda* (#:key outputs #:allow-other-keys)
+             (chdir "core")
+             (delete-file "configure")
+             (substitute* "configure.in"
+               (("i\\*86\\)")
+                "*)
+                COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
+                COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
+                LIBSSL=\"crypto\"
+                USE_OPENSSL=yes
+                ;;
+
+            i*86)"))
+               #t)))))
+    (inputs `(("openssl" ,openssl)
+              ("zlib" ,zlib)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)))
+    (synopsis "Programming language to create games")
+    (description "Bennu Game Development, also known as bennudg, is a
+programming language tailored at game development.  It is the successor of
+Fenix.")
+    (home-page "https://sourceforge.net/projects/bennugd/")
+    (license license:zlib)))
+
+(define-public bennu-game-development-modules
+  (package
+    (inherit bennu-game-development)
+    (name "bennu-game-development-modules")
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-conflicting-definitions
+           (lambda _
+             (with-fluids ((%default-port-encoding #f))
+               (substitute* "core/include/fmath.h"
+                 (("extern fixed fmul\\( int x, int y \\);") "")
+                 (("extern fixed fdiv\\( int x, int y \\);") "")))
+             (chdir "modules"))))))
+    (inputs `(("zlib" ,zlib)
+              ("libpng" ,libpng)
+              ("openssl" ,openssl)
+              ("sdl-mixer" ,sdl-mixer)
+              ("bennu-game-development" ,bennu-game-development)))
+    (synopsis "Modules for the Bennu Game Developement programming language")
+    (description "This package contains a collection of modules for the Bennu
+Game Developement programming language, from CD handling through SDL to
+joystick support.")))