@@ -54,7 +54,7 @@ (define-module (gnu packages minetest)
(define-public minetest
(package
(name "minetest")
- (version "5.9.0")
+ (version "5.10.0")
(source
(origin
(method git-fetch)
@@ -63,56 +63,34 @@ (define-public minetest
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1h4yn4k0wpjr1h24aiqcnc9xsxgxj4bq757pla2pa9zmh2xf45kk"))
+ (base32 "1nsnsf1axiazb8zz51c0742kh0qx2b298pr5mr91m0l9r6dv1sdj"))
(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.
+ ;; TODO: catch2 should be unbundled (but may need to have its version
+ ;; pinned); tiniergltf is separate but Minetest-specific so could
+ ;; go either way.
(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)))
+ (rename-file "lib" "_lib")
+ (mkdir "lib")
+ (for-each (lambda (lib)
+ (rename-file (format #f "_lib/~a" lib)
+ (format #f "lib/~a" lib)))
+ '(sha256 catch2 tiniergltf))
+ (delete-file-recursively "_lib")
#t))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DENABLE_LTO=ON"
- "-DENABLE_UPDATE_CHECKER=FALSE"
- (string-append "-DCURL_INCLUDE_DIR="
- (search-input-directory
- %build-inputs "include/curl"))
- (string-append "-DZSTD_INCLUDE_DIR="
- (dirname (search-input-file
- %build-inputs
- "include/zstd.h")))
- (string-append "-DZSTD_LIBRARY="
- (search-input-file
- %build-inputs "lib/libzstd.so")))
+ "-DENABLE_UPDATE_CHECKER=FALSE")
#: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)
@@ -120,7 +98,9 @@ (define-public minetest
;; when invoked on the target outside of `guix build'.
(when tests?
(setenv "HOME" "/tmp")
- (invoke "src/minetest" "--run-unittests")))))))
+ (setenv "MINETEST_GAME_PATH"
+ (string-append (getcwd) "/../source/games"))
+ (invoke "../source/bin/luanti" "--run-unittests")))))))
(native-search-paths
(list (search-path-specification
(variable "MINETEST_GAME_PATH")
@@ -129,8 +109,7 @@ (define-public minetest
(variable "MINETEST_MOD_PATH")
(files '("share/minetest/mods")))))
(native-inputs (list pkg-config))
- (inputs (list coreutils
- curl
+ (inputs (list curl
freetype
gettext-minimal
gmp
@@ -139,7 +118,6 @@ (define-public minetest
libpng
libogg
libvorbis
- libxxf86vm
libxi
luajit
mesa
@@ -147,6 +125,7 @@ (define-public minetest
openal
sqlite
`(,zstd "lib")))
+ (outputs '("out" "debug"))
(synopsis "Voxel game engine")
(description
"Minetest is a voxel game engine that supports modding and game creation