From c8c04d24ffabaeecfe00dce05387448999b486e0 Mon Sep 17 00:00:00 2001
0ad-data: Update to 0.0.25b-alpha.
Unpack .zip files without need for a snippet.
0ad: Update to 0.0.25b-alpha.
Properly unbundle cxxtest.
Disable tests for now since they don't run.
Install Freedesktop mimeinfo.
Install icon to hicolor theme instead of share/pixmaps, which I don't
gnu/packages/games.scm | 87 +++++++++++++++++++++++-------------------
1 file changed, 48 insertions(+), 39 deletions(-)
Toggle diff (209 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 79754d3185..6658a3a315 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2021 Christopher Baines <mail@cbaines.net>
;;; This file is part of GNU Guix.
#:use-module (gnu packages less)
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages libedit)
+ #:use-module (gnu packages libidn)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-compression)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
@@ -6588,7 +6592,7 @@ fight against their plot and save his fellow rabbits from slavery.")
- (version "0.0.23b-alpha")
+ (version "0.0.25b-alpha")
@@ -6597,20 +6601,10 @@ fight against their plot and save his fellow rabbits from slavery.")
(file-name (string-append name "-" version ".tar.xz"))
- "04x7729hk6zw1xj3n4s4lvaviijsnbjf5rhzvjxlr5fygvg4l6z1"))
- (modules '((guix build utils)))
- (for-each (lambda (name)
- (let* ((dir (string-append "binaries/data/mods/" name))
- (file (string-append dir "/" name ".zip"))
- (unzip #$(file-append unzip "/bin/unzip")))
- (invoke unzip "-d" dir file)
+ "1c9zrddmjxvvacismld6fbwbw9vrdbq6g6d3424p8w5p6xg5wlwy"))))
(build-system trivial-build-system)
(native-inputs `(("tar" ,tar)
`(#:modules ((guix build utils))
@@ -6620,10 +6614,17 @@ fight against their plot and save his fellow rabbits from slavery.")
(let ((out (assoc-ref %outputs "out"))
(source (assoc-ref %build-inputs "source"))
(tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip"))
(xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
- (invoke tar "xvf" source "-C" out "--strip=3")))))
+ (invoke tar "xvf" source "-C" out "--strip=3")
+ (for-each (lambda (name)
+ (let* ((dir (string-append out "/mods/" name))
+ (file (string-append dir "/" name ".zip")))
+ (invoke unzip "-o" "-d" dir file)
(synopsis "Data files for 0ad")
(description "0ad-data provides the data files required by the game 0ad.")
(home-page "https://play0ad.com")
@@ -6641,7 +6642,7 @@ fight against their plot and save his fellow rabbits from slavery.")
- (version "0.0.23b-alpha")
+ (version "0.0.25b-alpha")
@@ -6650,22 +6651,24 @@ fight against their plot and save his fellow rabbits from slavery.")
(file-name (string-append name "-" version ".tar.xz"))
- "0draa53xg69i5qhqym85658m45xhwkbiimaldj4sr3703rjgggq1"))))
+ "1p9fa8f7sjb9c5wl3mawzyfqvgr614kdkhrj2k4db9vkyisws3fp"))))
;; A snippet here would cause a build failure because of timestamps
;; reset. See https://bugs.gnu.org/26734.
("libxcursor" ,libxcursor)
@@ -6673,29 +6676,28 @@ fight against their plot and save his fellow rabbits from slavery.")
("pkg-config" ,pkg-config)
(build-system gnu-build-system)
`(#:make-flags '("config=release" "verbose=1" "-C" "build/workspaces/gcc")
+ #:tests? #f ;; Tests fail currently
(modify-phases %standard-phases
(add-after 'unpack 'delete-bundles
+ (lambda* (#:key inputs #:allow-other-keys)
(delete-file-recursively "libraries/source/spidermonkey")
- (add-after 'unpack 'fix-x11-includes
- (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
- (("<Xlib.h>") "<X11/Xlib.h>"))
- (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
- (("<Xatom.h>") "<X11/Xatom.h>"))
- (substitute* "source/lib/sysdep/os/unix/x/x.cpp"
- (("<Xcursor/Xcursor.h>") "<X11/Xcursor/Xcursor.h>"))
+ (delete-file-recursively "libraries/source/cxxtest-4.4")
+ (substitute* "build/premake/premake5.lua"
+ (("rootdir\\.\\.\"\\/libraries\\/source\\/cxxtest-4.4\\/bin\\/cxxtestgen\"")
+ (string-append "\"" (assoc-ref inputs "cxxtest")
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
(let* ((jobs (number->string (parallel-job-count)))
(out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
@@ -6703,11 +6705,13 @@ fight against their plot and save his fellow rabbits from slavery.")
(setenv "JOBS" (string-append "-j" jobs))
(with-directory-excursion "build/workspaces"
- (invoke "./update-workspaces.sh"
- (string-append "--libdir=" lib)
- (string-append "--datadir=" data)
- ;; TODO: "--with-system-nvtt"
- "--with-system-mozjs38")))))
+ `("./update-workspaces.sh"
+ ,(string-append "--libdir=" lib)
+ ,(string-append "--datadir=" data)
+ ;; TODO: "--with-system-nvtt"
+ ,@(if tests? '() '("--without-tests"))))))))
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -6717,7 +6721,9 @@ fight against their plot and save his fellow rabbits from slavery.")
(lib (string-append out "/lib"))
(data (string-append out "/share/0ad"))
(applications (string-append out "/share/applications"))
- (pixmaps (string-append out "/share/pixmaps"))
+ (hicolor (string-append out "/share/icons/hicolor/128x128/apps"))
+ (metainfo (string-append out "/share/metainfo"))
+ (mime (string-append out "/share/mime/application"))
(0ad-data (assoc-ref inputs "0ad-data")))
(copy-recursively "data" data)
@@ -6736,12 +6742,15 @@ fight against their plot and save his fellow rabbits from slavery.")
(with-directory-excursion "../build/resources"
(install-file "0ad.desktop" applications)
- (install-file "0ad.png" pixmaps))
+ (install-file "0ad.png" hicolor)
+ (install-file "0ad.appdata.xml" metainfo)
+ (install-file "pyrogenesis.xml" mime))
(add-after 'install 'check
- (with-directory-excursion "system"
- (invoke "./test")))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (with-directory-excursion "system"
+ (invoke "./test"))))))))
(home-page "https://play0ad.com")
(synopsis "3D real-time strategy game of ancient warfare")
(description "0 A.D. is a real-time strategy (RTS) game of ancient