summary refs log tree commit diff
path: root/gnu/packages/game-development.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/game-development.scm')
-rw-r--r--gnu/packages/game-development.scm144
1 files changed, 72 insertions, 72 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 26aa4f714b..b899c2fe6c 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -191,39 +191,39 @@ DeuTex has functions such as merging wads, etc.")
   (package
     (name "grfcodec")
     (version "6.0.6")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://binaries.openttd.org/extra/"
-                                  name "/" version "/" name "-" version
-                                  "-source.tar.xz"))
-              (sha256
-               (base32
-                "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://binaries.openttd.org/extra/"
+                           name "/" version "/" name "-" version
+                           "-source.tar.xz"))
+       (sha256
+        (base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; no check target
+     '(#:tests? #f                      ;no check target
        #:phases
-      (modify-phases %standard-phases
-        (delete 'configure) ; no configure script
-        (replace 'install   ; no install target
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append out "/bin"))
-                   (doc (string-append out "/share/doc"))
-                   (man (string-append out "/share/man/man1")))
-              (for-each (lambda (file)
-                          (install-file file bin))
-                        '("grfcodec" "grfid" "grfstrip" "nforenum"))
-              (install-file "COPYING" doc)
-              (with-directory-excursion "docs"
-                (for-each (lambda (file)
-                            (install-file (string-append file ".txt") doc))
-                          '("auto_correct" "commands" "grf" "grfcodec" "grftut"
-                            "readme" "readme.rpn"))
-                (for-each (lambda (file)
-                            (install-file file man))
-                          (find-files "." "\\.1"))))
-            #t)))))
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (replace 'install              ;no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc"))
+                    (man (string-append out "/share/man/man1")))
+               (for-each (lambda (file)
+                           (install-file file bin))
+                         '("grfcodec" "grfid" "grfstrip" "nforenum"))
+               (install-file "COPYING" doc)
+               (with-directory-excursion "docs"
+                 (for-each (lambda (file)
+                             (install-file (string-append file ".txt") doc))
+                           '("auto_correct" "commands" "grf" "grfcodec" "grftut"
+                             "readme" "readme.rpn"))
+                 (for-each (lambda (file)
+                             (install-file file man))
+                           (find-files "." "\\.1"))))
+             #t)))))
     (inputs
      `(("boost" ,boost)
        ("libpng" ,libpng)
@@ -240,7 +240,7 @@ with a specific task:
 @item @code{nforenum} checks NFO code for errors, making corrections when
 necessary.
 @end enumerate")
-    (home-page "http://dev.openttdcoop.org/projects/grfcodec")
+    (home-page "https://dev.openttdcoop.org/projects/grfcodec")
     ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
     ;; NFORenum is under the GPL2+.
     ;; The MD5 implementation contained in GRFID is under the zlib license.
@@ -256,15 +256,14 @@ necessary.
        (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
                            version "/catcodec-" version "-source.tar.xz"))
        (sha256
-        (base32
-         "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
+        (base32 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
        #:make-flags (list (string-append "prefix=" %output))
        #:phases (modify-phases %standard-phases
                   (delete 'configure))))
-    (home-page "http://dev.openttdcoop.org/projects/catcodec")
+    (home-page "https://dev.openttdcoop.org/projects/catcodec")
     (synopsis "Encode/decode OpenTTD sounds")
     (description "catcodec encodes and decodes sounds for OpenTTD.  These
 sounds are not much more than some metadata (description and filename) and raw
@@ -632,6 +631,7 @@ garbage collection and can be extended with plugins.")
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ; no check target
+       #:configure-flags '("-DPHYSFS_BUILD_STATIC=OFF")
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'patch-CMakeLists.txt
                     (lambda _
@@ -681,7 +681,6 @@ archive on a per-file basis.")
        ("mesa" ,mesa)
        ("mpg123" ,mpg123)
        ("openal" ,openal)
-       ("physfs" ,physfs)
        ("sdl2" ,sdl2)
        ("zlib" ,zlib)))
     (synopsis "2D game framework for Lua")
@@ -1157,7 +1156,7 @@ developed mainly for Ren'py.")
     (native-inputs
      `(("python2-cython" ,python2-cython)
        ("xdg-utils" ,xdg-utils)))
-    (home-page "http://www.renpy.org/")
+    (home-page "https://www.renpy.org/")
     (synopsis "Ren'py python module")
     (description "This package contains the shared libraries and Python
 modules of Ren'py.")
@@ -1345,7 +1344,7 @@ if __name__ == \"__main__\":
        ("xorg-server" ,xorg-server)))
     (outputs
      (list "out" "tutorial" "the-question"))
-    (home-page "http://www.renpy.org/")
+    (home-page "https://www.renpy.org/")
     (synopsis "Visual Novel Engine")
     (description "Ren'Py is a visual novel engine that helps you use words,
 images, and sounds to tell interactive stories that run on computers and
@@ -1585,11 +1584,7 @@ games.")
     (build-system scons-build-system)
     (arguments
      `(#:scons ,scons-python2
-       #:scons-flags (list "platform=x11"
-                           ,@(if (string-prefix? "aarch64" (or (%current-target-system)
-                                                               (%current-system)))
-                               `("CCFLAGS=-DNO_THREADS")
-                               '())
+       #:scons-flags (list "platform=x11" "target=release_debug"
                            ;; Avoid using many of the bundled libs.
                            ;; Note: These options can be found in the SConstruct file.
                            "builtin_bullet=no"
@@ -1608,7 +1603,7 @@ games.")
                            "builtin_wslay=no"
                            "builtin_zlib=no"
                            "builtin_zstd=no")
-       #:tests? #f ; There are no tests
+       #:tests? #f                      ; There are no tests
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'scons-use-env
@@ -1621,41 +1616,46 @@ games.")
                  "env_base = Environment(tools=custom_tools)\n"
                  "env_base = Environment(ENV=os.environ)")))
              #t))
+         ;; Build headless tools, used for packaging games without depending on X.
+         (add-after 'build 'build-headless
+           (lambda* (#:key scons-flags #:allow-other-keys)
+             (apply invoke "scons"
+                    `(,(string-append "-j" (number->string (parallel-job-count)))
+                      "platform=server" ,@(delete "platform=x11" scons-flags)))))
          (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin")))
+                    (headless (assoc-ref outputs "headless"))
+                    (zenity (assoc-ref inputs "zenity")))
+               ;; Strip build info from filenames.
                (with-directory-excursion "bin"
-                 (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))
-               ;; Tell Godot where to find zenity for OS.alert().
-               (wrap-program (string-append bin "/godot")
-                 `("PATH" ":" prefix
-                   (,(string-append (assoc-ref %build-inputs "zenity") "/bin"))))
-               #t)))
+                 (for-each
+                  (lambda (file)
+                    (let ((dest (car (string-split (basename file) #\.))))
+                      (rename-file file dest)))
+                  (find-files "." "godot.*\\.x11\\.opt\\.tools.*"))
+                 (install-file "godot" (string-append out "/bin"))
+                 (install-file "godot_server" (string-append headless "/bin")))
+               ;; Tell the editor where to find zenity for OS.alert().
+               (wrap-program (string-append out "/bin/godot")
+                 `("PATH" ":" prefix (,(string-append zenity "/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")))
-               (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 _
-                   (format #t
-                           "[Desktop Entry]~@
-                           Name=godot~@
-                           Comment=The godot game engine~@
-                           Exec=~a/bin/godot~@
-                           TryExec=~@*~a/bin/godot~@
-                           Icon=godot~@
-                           Type=Application~%"
-                           out)))
-               #t))))))
+                    (applications (string-append out "/share/applications"))
+                    (icons (string-append out "/share/icons/hicolor")))
+               (mkdir-p applications)
+               (copy-file "misc/dist/linux/org.godotengine.Godot.desktop"
+                          (string-append applications "/godot.desktop"))
+               (for-each (lambda (icon dest)
+                           (mkdir-p (dirname dest))
+                           (copy-file icon dest))
+                         '("icon.png" "icon.svg")
+                         `(,(string-append icons "/256x256/apps/godot.png")
+                           ,(string-append icons "/scalable/apps/godot.svg"))))
+             #t)))))
+    (outputs '("out" "headless"))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("alsa-lib" ,alsa-lib)
               ("bullet" ,bullet)