all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
To: 72584@debbugs.gnu.org
Cc: "Jan Wielkiewicz" <tona_kosmicznego_smiecia@interia.pl>,
	"Adam Faiz" <adam.faiz@disroot.org>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#72584] [PATCH 1/1] gnu: minetest: update to 5.9.0.
Date: Mon, 12 Aug 2024 01:51:47 +0200	[thread overview]
Message-ID: <0c5fcf37276243cc2d0da41e562e51e5ca10583f.1723419187.git.tona_kosmicznego_smiecia@interia.pl> (raw)
In-Reply-To: <cover.1723419187.git.tona_kosmicznego_smiecia@interia.pl>

* gnu/packages/minetest.scm (minetest): Update to 5.9.0.
(minetest-data): Update to 88ecab3.
Rename to (minetest-minetest-game),
deprecate (minetest-data). Minetest Game stopped being
the official game for the Minetest engine.

* gnu/packages/games.scm (irrlicht-for-minetest):
deprecate as it was merged into upstream minetest.

* guix/build-system/minetest.scm:
add (default-minetest-game), use in
(standard-minetest-packages).

Change-Id: I0117bd33a2ce5eb1c79fdb29878682081f61dd4e
---
 gnu/packages/games.scm         |  24 +---
 gnu/packages/minetest.scm      | 239 +++++++++++++++++----------------
 guix/build-system/minetest.scm |   4 +
 3 files changed, 130 insertions(+), 137 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index b2d050d626..05ad9b99bb 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -83,6 +83,7 @@
 ;;; Copyright © 2024 Vagrant Cascadian <vagrant@debian.org>
 ;;; Copyright © 2024 Sébastien Lerique <sl@eauchat.org>
 ;;; Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
+;;; Copyright © 2024 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3954,29 +3955,6 @@ (define-public irrlicht
     (home-page "https://irrlicht.sourceforge.io/")
     (license license:zlib)))
 
-(define-public irrlicht-for-minetest
-  (package
-    (inherit irrlicht)
-    (name "irrlicht-for-minetest")
-    (version "1.9.0mt13")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/minetest/irrlicht")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "11pxg0yh50ym1hvh8va5jbbcjz5dsshj3xxvm3qhkgg96vpism06"))))
-    (build-system cmake-build-system)
-    (arguments
-     ;; No check target.
-     (list #:tests? #f))
-    (inputs
-     (modify-inputs (package-inputs irrlicht)
-       (prepend libxi)))))
-
 (define-public mars
   ;; The latest release on SourceForge relies on an unreleased version of SFML
   ;; with a different API, so we take the latest version from the official
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 831ccf6e72..bd17f5d408 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
 ;;; Copyright © 2020, 2021, 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2024 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; This file is part of GNU Guix.
 ;;;
 ;;; GNU Guix is free software; you can redistribute it and/or modify it
@@ -29,7 +30,6 @@ (define-module (gnu packages minetest)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages games)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages image)
@@ -53,105 +53,106 @@ (define-module (gnu packages minetest)
 (define-public minetest
   (package
     (name "minetest")
-    (version "5.8.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/minetest/minetest")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1sww17h8z77w38jk19nsqxn8xcj27msq0glbil7pyj4i0ffprjrr"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  ;; Delete bundled libraries.
-                  (delete-file-recursively "lib")
-                  #t))))
+    (version "5.9.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest/minetest")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1h4yn4k0wpjr1h24aiqcnc9xsxgxj4bq757pla2pa9zmh2xf45kk"))
+       (modules '((guix build utils)))
+       ;; Delete bundled libraries, keep lib/sha256 because there's no good
+       ;; upstream, see:
+       ;; https://github.com/openssl/openssl/blob/master/crypto/sha/sha512.c
+       ;; "SHA512 low level APIs are deprecated for public use,
+       ;; but still ok for internal use." Also asked MT devs on IRC for this.
+       (snippet
+        '(begin
+           (with-directory-excursion "lib"
+             (for-each (lambda (file)
+                         (if (not (string=? file "sha256"))
+                             (delete-file-recursively file)))
+                       (find-files (string-append "lib") #:directories? #t)))
+           #t))))
     (build-system cmake-build-system)
     (arguments
      (list
       #:configure-flags
-      #~(list "-DRUN_IN_PLACE=0"
-              "-DENABLE_FREETYPE=1"
-              "-DENABLE_GETTEXT=1"
-              "-DENABLE_SYSTEM_JSONCPP=TRUE"
-              (string-append "-DIRRLICHTMT_INCLUDE_DIR="
-                             (search-input-directory %build-inputs
-                                                     "include/irrlichtmt"))
+      #~(list "-DENABLE_LTO=ON"
+              "-DENABLE_UPDATE_CHECKER=FALSE"
               (string-append "-DCURL_INCLUDE_DIR="
-                             (search-input-directory %build-inputs
-                                                     "include/curl"))
+                             (search-input-directory
+                              %build-inputs "include/curl"))
               (string-append "-DZSTD_INCLUDE_DIR="
-                             (dirname
-                              (search-input-file %build-inputs
-                                                 "include/zstd.h")))
+                             (dirname (search-input-file
+                                       %build-inputs
+                                       "include/zstd.h")))
               (string-append "-DZSTD_LIBRARY="
-                             (search-input-file %build-inputs
-                                                "lib/libzstd.so")))
-       #:phases
-       #~(modify-phases %standard-phases
-           (add-after 'unpack 'patch-sources
-             (lambda* (#:key inputs #:allow-other-keys)
-               (substitute* "src/filesys.cpp"
-                 ;; Use store-path for "rm" instead of non-existing FHS path.
-                 (("\"/bin/rm\"")
-                  (format #f "~s" (search-input-file inputs "bin/rm"))))
-               (substitute* "src/CMakeLists.txt"
-                 ;; Let minetest binary remain in build directory.
-                 (("set\\(EXECUTABLE_OUTPUT_PATH .*\\)") ""))
-               (substitute* "src/unittest/test_servermodmanager.cpp"
-                 ;; do no override MINETEST_SUBGAME_PATH
-                 (("(un)?setenv\\(\"MINETEST_SUBGAME_PATH\".*\\);")
-                  "(void)0;"))
-               (setenv "MINETEST_SUBGAME_PATH" ; for check
-                       (string-append (getcwd) "/games"))))
-           (delete 'check)
-           (add-after 'install 'check
-             (lambda* (#:key tests? #:allow-other-keys)
-               ;; Thanks to our substitutions, the tests should also run
-               ;; when invoked on the target outside of `guix build'.
-               (when tests?
-                 (setenv "HOME" "/tmp")
-                 (invoke "src/minetest" "--run-unittests")))))))
+                             (search-input-file
+                              %build-inputs "lib/libzstd.so")))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-sources
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/filesys.cpp"
+                ;; Use store-path for "rm" instead of non-existing FHS path.
+                (("\"/bin/rm\"")
+                 (format #f "~s"
+                         (search-input-file inputs "bin/rm"))))
+              (substitute* "src/CMakeLists.txt"
+                ;; Let minetest binary remain in build directory.
+                (("set\\(EXECUTABLE_OUTPUT_PATH .*\\)")
+                 ""))
+              (substitute* "src/unittest/test_servermodmanager.cpp"
+                ;; do no override MINETEST_GAME_PATH
+                (("(un)?setenv\\(\"MINETEST_GAME_PATH\".*\\);")
+                 "(void)0;"))
+              (setenv "MINETEST_GAME_PATH" ;for check
+                      (string-append (getcwd) "/games"))))
+          (delete 'check)
+          (add-after 'install 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              ;; Thanks to our substitutions, the tests should also run
+              ;; when invoked on the target outside of `guix build'.
+              (when tests?
+                (setenv "HOME" "/tmp")
+                (invoke "src/minetest" "--run-unittests")))))))
     (native-search-paths
      (list (search-path-specification
-            (variable "MINETEST_SUBGAME_PATH")
+            (variable "MINETEST_GAME_PATH")
             (files '("share/minetest/games")))
            (search-path-specification
             (variable "MINETEST_MOD_PATH")
             (files '("share/minetest/mods")))))
-    (native-inputs
-     (list pkg-config))
-    (inputs
-     (list coreutils
-           curl
-           freetype
-           gettext-minimal
-           gmp
-           irrlicht-for-minetest
-           jsoncpp
-           libjpeg-turbo
-           libpng
-           libogg
-           libvorbis
-           libxxf86vm
-           luajit
-           mesa
-           ncurses
-           openal
-           sqlite
-           `(,zstd "lib")))
-    (propagated-inputs
-     (list minetest-data))
-    (synopsis "Infinite-world block sandbox game")
+    (native-inputs (list pkg-config))
+    (inputs (list coreutils
+                  curl
+                  freetype
+                  gettext-minimal
+                  gmp
+                  jsoncpp
+                  libjpeg-turbo
+                  libpng
+                  libogg
+                  libvorbis
+                  libxxf86vm
+                  libxi
+                  luajit
+                  mesa
+                  ncurses
+                  openal
+                  sqlite
+                  `(,zstd "lib")))
+    (synopsis "Voxel game and game engine")
     (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.")
+     "Minetest is a voxel game engine with easy modding and game creation
+using its Lua modding API. It allows playing a wide range of voxel-based
+games, installing mods and texture packs. This package only provides the base
+platform, users need to install games themselves (either through Guix, the
+built-in interface or other sources).")
     (home-page "https://www.minetest.net/")
     (license license:lgpl2.1+)))
 
@@ -183,35 +184,45 @@ (define-public minetest-server
                "openal")))
     (synopsis "Infinite-world block sandbox game (server)")
     (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.  This package provides @command{minetestserver} to run a
-Minetest server.")))
+     "Server for Minetest game engine and gaming platform. Allows hosting
+Minetest games with multiplayer support. This package provides
+@command{minetestserver} to run a Minetest server.")))
 
-(define minetest-data
-  (package
-    (name "minetest-data")
-    (version (package-version minetest))
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/minetest/minetest_game")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1pq4rm15lzwcqv6npgyz6v89hi3zj8zybw25n9i0d27qj786xc4z"))))
-    (build-system copy-build-system)
-    (arguments
-     (list #:install-plan
-           #~'(("." "/share/minetest/games/minetest_game"))))
-    (synopsis "Main game data for the Minetest game engine")
-    (description
-     "Game data for the Minetest infinite-world block sandbox game.")
-    (home-page "https://www.minetest.net/")
-    (license license:lgpl2.1+)))
+(define-public minetest-minetest-game
+  (let ((branch "master")
+        (commit "88ecab34d98550c8eb77f49ac2866b480a6e707a"))
+    (package
+      (name "minetest-minetest-game")
+      (version (git-version branch "0" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/minetest/minetest_game")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvr3m7kxrriabw20sy6rhx0givh5ic85dk5g88cbbsy83admsp0"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("." "/share/minetest/games/minetest_game"))))
+      (synopsis "Ex-official game for Minetest game engine")
+      (description
+       "A game for the Minetest voxel game platform. It provides a very basic
+Minecraft-like base for some mods. It is currently in maintenance mode
+and gets no new features.")
+      (home-page "https://www.minetest.net/")
+      (license license:lgpl2.1+))))
+
+;; This package is deprecated. MTG is no longer the official game.
+(define-public minetest-data
+  (deprecated-package "minetest-data" minetest-minetest-game))
+
+;; Minetest merged its irrlicht fork into the minetest repo
+;; this package is not used outside of minetest, hence I deprecate it.
+(define-public irrlicht-for-minetest
+  (deprecated-package "irrlicht-for-minetest" minetest))
 
 (define-public (minetest-topic topic-id)
   "Return an URL (as a string) pointing to the forum topic with
diff --git a/guix/build-system/minetest.scm b/guix/build-system/minetest.scm
index 1fae3a47e9..85459f905c 100644
--- a/guix/build-system/minetest.scm
+++ b/guix/build-system/minetest.scm
@@ -37,6 +37,9 @@ (define (default-optipng)
 (define (default-minetest)
   (module-ref (resolve-interface '(gnu packages minetest)) 'minetest))
 
+(define (default-minetest-game)
+  (module-ref (resolve-interface '(gnu packages minetest)) 'minetest-minetest-game))
+
 (define (default-xvfb-run)
   (module-ref (resolve-interface '(gnu packages xorg)) 'xvfb-run))
 
@@ -57,6 +60,7 @@ (define (standard-minetest-packages)
   `(("xvfb-run" ,(default-xvfb-run))
     ("optipng" ,(default-optipng))
     ("minetest" ,(default-minetest))
+    ("minetest-game" ,(default-minetest-game))
     ,@(filter (lambda (input)
                 (member (car input)
                         '("libc" "tar" "gzip" "bzip2" "xz" "locales")))
-- 
2.45.2





  reply	other threads:[~2024-08-11 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-11 23:49 [bug#72584] [PATCH 0/1] Update minetest to 5.9.0 Jan Wielkiewicz
2024-08-11 23:51 ` Jan Wielkiewicz [this message]
2024-08-30 22:36   ` bug#72584: " Jan Wielkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c5fcf37276243cc2d0da41e562e51e5ca10583f.1723419187.git.tona_kosmicznego_smiecia@interia.pl \
    --to=tona_kosmicznego_smiecia@interia.pl \
    --cc=72584@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.