From: Christopher Baines <mail@cbaines.net>
To: 36978@debbugs.gnu.org
Subject: [bug#36978] [PATCH v2 2/3] gnu: Add fifengine.
Date: Sun, 6 Oct 2019 19:18:17 +0100 [thread overview]
Message-ID: <20191006181818.18333-2-mail@cbaines.net> (raw)
In-Reply-To: <20191006181818.18333-1-mail@cbaines.net>
* gnu/packcages/games.scm (fifengine): New variable.
---
gnu/packages/games.scm | 93 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ebd21fb501..0ebf262126 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2054,6 +2054,99 @@ specifically designed for games. It has a built in set of extendable GUI
Widgets, and allows users to create more.")
(license license:lgpl2.1+)))
+(define-public fifengine
+ (package
+ (name "fifengine")
+ (version "0.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://codeload.github.com/fifengine/"
+ "fifengine/tar.gz/" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; TODO The test running fails to run some tests.
+ #:modules ((srfi srfi-1)
+ (guix build cmake-build-system)
+ (guix build utils))
+ #:configure-flags
+ (list
+ (string-append "-DOPENALSOFT_INCLUDE_DIR="
+ (assoc-ref %build-inputs "openal")
+ "/include/AL")
+ (string-append "-DPYTHON_SITE_PACKAGES="
+ (assoc-ref %outputs "out")
+ "/lib/python3.7/site-packages"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-run_tests.py
+ (lambda _
+ ;; Patch the test runner to exit with a status of 1 if any test
+ ;; fails, to allow detecting failures.
+ (substitute* "run_tests.py"
+ (("ERROR\\. One or more tests failed!'\\)")
+ "ERROR. One or more tests failed!')
+\t\texit(1)"))
+ #t))
+ ;; Run tests after installation so that we can make use of the built
+ ;; python modules.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (define python-version
+ (let* ((version (last (string-split
+ (assoc-ref inputs "python")
+ #\-)))
+ (components (string-split version #\.))
+ (major+minor (take components 2)))
+ (string-join major+minor ".")))
+
+ (when tests?
+ ;; Set PYTHONPATH so that python finds the installed modules.
+ (setenv "PYTHONPATH"
+ (string-append (getenv "PYTHONPATH") ":"
+ (assoc-ref outputs "out")
+ "/lib/python"
+ python-version
+ "/site-packages"))
+ ;; The tests require an X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (setenv "XDG_RUNTIME_DIR" "/tmp")
+ ;; Run tests
+ (chdir ,(string-append "../" name "-" version))
+ (invoke "python3" "run_tests.py" "-a"))
+ #t)))))
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("sdl2-ttf" ,sdl2-ttf)
+ ("tinyxml" ,tinyxml)
+ ("openal" ,openal)
+ ("libogg" ,libogg)
+ ("glew" ,glew)
+ ("libvorbis" ,libvorbis)
+ ("boost" ,boost)
+ ("fifechan" ,fifechan)
+ ("swig" ,swig)
+ ("python" ,python)))
+ (native-inputs
+ `(("python" ,python)
+ ("swig" ,swig)
+ ("xvfb" ,xorg-server)))
+ (propagated-inputs
+ `(("python-future" ,python-future)))
+ (home-page "https://www.fifengine.net/")
+ (synopsis "FIFE is a multi-platform isometric game engine written in C++")
+ (description
+ "@acronym{FIFE, Flexible Isometric Free Engine} is a multi-platform
+isometric game engine. Python bindings are included allowing users to create
+games using Python as well as C++.")
+ (license license:lgpl2.1+)))
+
(define-public fizmo
(package
(name "fizmo")
--
2.23.0
next prev parent reply other threads:[~2019-10-06 18:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 20:02 [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies Christopher Baines
2019-08-08 20:23 ` [bug#36978] [PATCH 1/3] gnu: Add fifechan Christopher Baines
2019-08-08 20:23 ` [bug#36978] [PATCH 2/3] gnu: Add fifengine Christopher Baines
2019-08-08 20:23 ` [bug#36978] [PATCH 3/3] gnu: Add unknown-horizons Christopher Baines
2019-08-23 21:09 ` [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies Ludovic Courtès
2019-08-25 6:09 ` Arun Isaac
2019-08-26 11:17 ` Arun Isaac
2019-09-01 13:02 ` Ludovic Courtès
2019-10-06 18:18 ` [bug#36978] [PATCH v2 1/3] gnu: Add fifechan Christopher Baines
2019-10-06 18:18 ` Christopher Baines [this message]
2019-10-06 18:18 ` [bug#36978] [PATCH v2 3/3] gnu: Add unknown-horizons Christopher Baines
2019-10-06 18:20 ` [bug#36978] [PATCH 0/3] Add Unknown Horizons and dependencies Christopher Baines
2019-10-07 21:19 ` Arun Isaac
2019-10-08 18:38 ` bug#36978: " Christopher Baines
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191006181818.18333-2-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=36978@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).