From patchwork Sun Oct 6 18:18:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 15663 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D441517525; Sun, 6 Oct 2019 19:19:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 720BA174EC for ; Sun, 6 Oct 2019 19:19:12 +0100 (BST) Received: from localhost ([::1]:36234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHB7f-0002xD-RS for patchwork@mira.cbaines.net; Sun, 06 Oct 2019 14:19:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44594) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHB7X-0002wt-Ul for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHB7W-000692-Iq for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHB7W-00068v-Fx for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHB7W-0000wB-9E for guix-patches@gnu.org; Sun, 06 Oct 2019 14:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36978] [PATCH v2 2/3] gnu: Add fifengine. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Oct 2019 18:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36978@debbugs.gnu.org Received: via spool by 36978-submit@debbugs.gnu.org id=B36978.15703859043538 (code B ref 36978); Sun, 06 Oct 2019 18:19:02 +0000 Received: (at 36978) by debbugs.gnu.org; 6 Oct 2019 18:18:24 +0000 Received: from localhost ([127.0.0.1]:46842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHB6t-0000uz-OF for submit@debbugs.gnu.org; Sun, 06 Oct 2019 14:18:24 -0400 Received: from mira.cbaines.net ([212.71.252.8]:45546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHB6p-0000ue-W2 for 36978@debbugs.gnu.org; Sun, 06 Oct 2019 14:18:20 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 16E3B174F3 for <36978@debbugs.gnu.org>; Sun, 6 Oct 2019 19:18:19 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 974d3f4b for <36978@debbugs.gnu.org>; Sun, 6 Oct 2019 18:18:18 +0000 (UTC) From: Christopher Baines Date: Sun, 6 Oct 2019 19:18:17 +0100 Message-Id: <20191006181818.18333-2-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006181818.18333-1-mail@cbaines.net> References: <20191006181818.18333-1-mail@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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")