[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/22: gnu: minetest: move to minetest.scm.
From: |
guix-commits |
Subject: |
22/22: gnu: minetest: move to minetest.scm. |
Date: |
Fri, 20 Aug 2021 07:43:05 -0400 (EDT) |
leoprikler pushed a commit to branch master
in repository guix.
commit b7d1698f7fb1f4119d29951d0059b26770e2a853
Author: Leo Prikler <leo.prikler@student.tugraz.at>
AuthorDate: Fri Aug 20 13:34:59 2021 +0200
gnu: minetest: move to minetest.scm.
* gnu/packages/games.scm (minetest, minetest-data): Move from here...
* gnu/packages/minetest.scm (minetest, minetest-data): ... to here.
* guix/build-system/minetest.scm (default-minetest): Adjust accordingly.
---
gnu/packages/games.scm | 137 +----------------------------------
gnu/packages/minetest.scm | 161 +++++++++++++++++++++++++++++++++++++++++
guix/build-system/minetest.scm | 2 +-
3 files changed, 164 insertions(+), 136 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index fbf43b9..0249662 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 John Darrington <jmd@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014, 2016 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2014, 2015 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier
<bavier@posteo.net>
;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
@@ -52,7 +52,7 @@
;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2020, 2021 Trevor Hass <thass@okstate.edu>
+;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020, 2021 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
@@ -3582,139 +3582,6 @@ enemies in different game modes such as space ball,
death match, team death
match, cannon keep, and grave-itation pit.")
(license license:gpl3+))))
-(define-public minetest
- (package
- (name "minetest")
- (version "5.4.1")
- (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
- "062ilb7s377q3hwfhl8q06vvcw2raydz5ljzlzwy2dmyzmdcndb8"))
- (modules '((guix build utils)))
- (patches
- (search-patches
- "minetest-add-MINETEST_MOD_PATH.patch"))
- (snippet
- '(begin
- ;; Delete bundled libraries.
- (delete-file-recursively "lib")
- #t))))
- (build-system cmake-build-system)
- (arguments
- `(#:configure-flags
- (list "-DRUN_IN_PLACE=0"
- "-DENABLE_FREETYPE=1"
- "-DENABLE_GETTEXT=1"
- "-DENABLE_SYSTEM_JSONCPP=TRUE"
- (string-append "-DIRRLICHT_INCLUDE_DIR="
- (assoc-ref %build-inputs "irrlicht")
- "/include/irrlicht")
- (string-append "-DCURL_INCLUDE_DIR="
- (assoc-ref %build-inputs "curl")
- "/include/curl"))
- #: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\"")
- (string-append "\"" (assoc-ref inputs "coreutils")
"/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"
- (string-append (getcwd) "/games")) ; for check
- #t))
- (replace '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")
- (files '("share/minetest/games")))
- (search-path-specification
- (variable "MINETEST_MOD_PATH")
- (files '("share/minetest/mods")))))
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (inputs
- `(("coreutils" ,coreutils)
- ("curl" ,curl)
- ("freetype" ,freetype)
- ("gettext" ,gettext-minimal)
- ("gmp" ,gmp)
- ("irrlicht" ,irrlicht)
- ("jsoncpp" ,jsoncpp)
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("libogg" ,libogg)
- ("libvorbis" ,libvorbis)
- ("libxxf86vm" ,libxxf86vm)
- ("luajit" ,luajit)
- ("mesa" ,mesa)
- ("ncurses" ,ncurses)
- ("openal" ,openal)
- ("sqlite" ,sqlite)))
- (propagated-inputs
- `(("minetest-data" ,minetest-data)))
- (synopsis "Infinite-world block sandbox game")
- (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.")
- (home-page "https://www.minetest.net/")
- (license license:lgpl2.1+)))
-
-(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
- "0i45lbnikvgj9kxdp0yphpjjwjcgp4ibn49xkj78j5ic1s9n8jd4"))))
- (build-system trivial-build-system)
- (native-inputs
- `(("source" ,source)))
- (arguments
- `(#:modules ((guix build utils))
- #:builder (begin
- (use-modules (guix build utils))
- (let ((install-dir (string-append
- %output
- "/share/minetest/games/minetest_game")))
- (mkdir-p install-dir)
- (copy-recursively
- (assoc-ref %build-inputs "source")
- install-dir)
- #t))))
- (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 glkterm
(package
(name "glkterm")
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 0cb3180..5453f4d 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -1,3 +1,12 @@
+;;; Copyright © 2014, 2015, 2016 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2019 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016, 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
+;;; Copyright © 2020, 2021 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; This file is part of GNU Guix.
;;;
@@ -14,12 +23,164 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages minetest)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages audio)
+ #:use-module (gnu packages base)
+ #: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)
+ #:use-module (gnu packages lua)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages serialization)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages xorg)
#:use-module (guix packages)
#:use-module (guix git-download)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
+ #:use-module (guix build-system trivial)
#:use-module (guix build-system minetest)
#:use-module ((guix licenses) #:prefix license:))
+(define-public minetest
+ (package
+ (name "minetest")
+ (version "5.4.1")
+ (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
+ "062ilb7s377q3hwfhl8q06vvcw2raydz5ljzlzwy2dmyzmdcndb8"))
+ (modules '((guix build utils)))
+ (patches
+ (search-patches
+ "minetest-add-MINETEST_MOD_PATH.patch"))
+ (snippet
+ '(begin
+ ;; Delete bundled libraries.
+ (delete-file-recursively "lib")
+ #t))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ (list "-DRUN_IN_PLACE=0"
+ "-DENABLE_FREETYPE=1"
+ "-DENABLE_GETTEXT=1"
+ "-DENABLE_SYSTEM_JSONCPP=TRUE"
+ (string-append "-DIRRLICHT_INCLUDE_DIR="
+ (assoc-ref %build-inputs "irrlicht")
+ "/include/irrlicht")
+ (string-append "-DCURL_INCLUDE_DIR="
+ (assoc-ref %build-inputs "curl")
+ "/include/curl"))
+ #: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\"")
+ (string-append "\"" (assoc-ref inputs "coreutils")
"/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"
+ (string-append (getcwd) "/games")) ; for check
+ #t))
+ (replace '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")
+ (files '("share/minetest/games")))
+ (search-path-specification
+ (variable "MINETEST_MOD_PATH")
+ (files '("share/minetest/mods")))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("curl" ,curl)
+ ("freetype" ,freetype)
+ ("gettext" ,gettext-minimal)
+ ("gmp" ,gmp)
+ ("irrlicht" ,irrlicht)
+ ("jsoncpp" ,jsoncpp)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libogg" ,libogg)
+ ("libvorbis" ,libvorbis)
+ ("libxxf86vm" ,libxxf86vm)
+ ("luajit" ,luajit)
+ ("mesa" ,mesa)
+ ("ncurses" ,ncurses)
+ ("openal" ,openal)
+ ("sqlite" ,sqlite)))
+ (propagated-inputs
+ `(("minetest-data" ,minetest-data)))
+ (synopsis "Infinite-world block sandbox game")
+ (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.")
+ (home-page "https://www.minetest.net/")
+ (license license:lgpl2.1+)))
+
+(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
+ "0i45lbnikvgj9kxdp0yphpjjwjcgp4ibn49xkj78j5ic1s9n8jd4"))))
+ (build-system trivial-build-system)
+ (native-inputs
+ `(("source" ,source)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+ (let ((install-dir (string-append
+ %output
+ "/share/minetest/games/minetest_game")))
+ (mkdir-p install-dir)
+ (copy-recursively
+ (assoc-ref %build-inputs "source")
+ install-dir)
+ #t))))
+ (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-topic topic-id)
"Return an URL (as a string) pointing to the forum topic with
numeric identifier TOPIC-ID on the official Minetest forums."
diff --git a/guix/build-system/minetest.scm b/guix/build-system/minetest.scm
index f33e975..1fae3a4 100644
--- a/guix/build-system/minetest.scm
+++ b/guix/build-system/minetest.scm
@@ -35,7 +35,7 @@
(module-ref (resolve-interface '(gnu packages image)) 'optipng))
(define (default-minetest)
- (module-ref (resolve-interface '(gnu packages games)) 'minetest))
+ (module-ref (resolve-interface '(gnu packages minetest)) 'minetest))
(define (default-xvfb-run)
(module-ref (resolve-interface '(gnu packages xorg)) 'xvfb-run))
- 09/22: gnu: Add minetest-unifieddyes., (continued)
- 09/22: gnu: Add minetest-unifieddyes., guix-commits, 2021/08/20
- 04/22: build-system: Add 'minetest-mod-build-system'., guix-commits, 2021/08/20
- 19/22: gnu: Add minetest-mobs-animal., guix-commits, 2021/08/20
- 20/22: gnu: Add minetest-homedecor-modpack., guix-commits, 2021/08/20
- 17/22: gnu: Add minetest-worldedit., guix-commits, 2021/08/20
- 21/22: gnu: minetest-mineclone: move to minetest.scm., guix-commits, 2021/08/20
- 11/22: gnu: Add minetest-coloredwood., guix-commits, 2021/08/20
- 12/22: gnu: Add minetest-ethereal., guix-commits, 2021/08/20
- 18/22: gnu: Add minetest-mobs., guix-commits, 2021/08/20
- 14/22: gnu: Add minetest-throwing., guix-commits, 2021/08/20
- 22/22: gnu: minetest: move to minetest.scm.,
guix-commits <=
- 10/22: gnu: Add minetest-pipeworks., guix-commits, 2021/08/20
- 15/22: gnu: Add minetest-throwing-arrows., guix-commits, 2021/08/20
- 13/22: gnu: Add minetest-technic., guix-commits, 2021/08/20
- 16/22: gnu: Add minetest-unified-inventory., guix-commits, 2021/08/20