From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czwh0-0006LY-DJ for guix-patches@gnu.org; Sun, 16 Apr 2017 22:47:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czwgw-0003Tz-Of for guix-patches@gnu.org; Sun, 16 Apr 2017 22:47:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czwgw-0003Tv-KX for guix-patches@gnu.org; Sun, 16 Apr 2017 22:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1czwgw-00084i-EV for guix-patches@gnu.org; Sun, 16 Apr 2017 22:47:02 -0400 Subject: bug#26488: [PATCH] gnu: Add crawl. Resent-Message-ID: References: <9758282d-96a4-8fe4-183b-a60a43a9eab9@cock.li> <791d5ba7.AEQAJP3OyzEAAAAAAAAAAAO02gcAAAACwQwAAAAAAAW9WABY8IM9@mailjet.com> From: nee Message-ID: <8ac92fe4-14dd-3933-8901-bea4ff8673ac@cock.li> Date: Mon, 17 Apr 2017 06:46:09 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------3DAA95E91640AB4DA42CB738" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: 26488@debbugs.gnu.org This is a multi-part message in MIME format. --------------3DAA95E91640AB4DA42CB738 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Am 14.04.2017 um 20:04 schrieb Arun Isaac: > Try (setenv "HOME" "/tmp") as Danny mentioned. > Works, thanks to both of you. > Only a matter of aesthetics, but you could split "-C" and "source" into > separate strings. > All the packages in games.scm do it as one string, so I didn't change it for now. It should be changed for all packages at once. > Put 'check on the same line as replace. In emacs, you can use > guix-devel-mode from emacs-guix to help you with indenting correctly. > Thanks, I installed emacs-guix and it indents correctly now. Previously I assumed the .dir-locals.el would be enough. > Looking good so far! Only the check phase remains... > Good news everyone, I managed to package the check phase and all the tests pass! The downside is that in order to run the tests the whole game must be rebuild with a -DDEBUG define that seems to enable asserts and debug outputs, otherwise the tests won't run. So the build times are doubled. That rebuild overwrites the objects, executable, and the .cflags file from the build phase, so install would build it a 3rd time. I worked around this by moving the check phase before the build phase. I also added myself to the copyright header, since you mentioned that in the mcomix thread. --------------3DAA95E91640AB4DA42CB738 Content-Type: text/x-patch; name="0001-gnu-Add-crawl.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-Add-crawl.patch" =46rom 72aa4b81e767edd451c5859be7e1d67f3c4ceedf Mon Sep 17 00:00:00 2001 From: nee Date: Thu, 13 Apr 2017 22:45:18 +0200 Subject: [PATCH] gnu: Add crawl. * gnu/packages/games.scm (crawl): New variable. --- gnu/packages/games.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 710b2746c..502fa74ce 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -27,6 +27,7 @@ ;;; Copyright =C2=A9 2017 Adonay "adfeno" Felipe Nogueira ;;; Copyright =C2=A9 2017 Arun Isaac ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2017 nee ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,6 +116,8 @@ #:use-module (gnu packages messaging) #:use-module (gnu packages upnp) #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex) #:use-module (guix build-system gnu) #:use-module (guix build-system haskell) #:use-module (guix build-system python) @@ -3649,3 +3652,79 @@ small robot living in the nano world, repair its m= aker.") ;; kiki-the-nano-bot/kiki-the-nano-bot_1.0.2+dfsg1-4_copyright> ;; for a statement from the author. (license license:public-domain))) + +(define-public crawl + (package + (name "crawl") + (version "0.19.5") + (source (origin + (method url-fetch) + (uri (list + ;; Older releases get moved into a versioned directo= ry + (string-append "http://crawl.develz.org/release/" + (version-major+minor version) "/stone= _soup-" + version "-nodeps.tar.xz") + ;; Only the latest release is in this directory + (string-append "http://crawl.develz.org/release/ston= e_soup-" + version "-nodeps.tar.xz"))) + (sha256 + (base32 + "00yl2lb2shglxlxzpyk99zvglfx4amjybqwnzdcasvbiggb4cj18"))= )) + (arguments + '(#:make-flags + (let* ((sqlite (assoc-ref %build-inputs "sqlite")) + (out (assoc-ref %outputs "out"))) + (list (string-append "SQLITE_INCLUDE_DIR=3D" sqlite "/include")= + (string-append "prefix=3D" out) + "SAVEDIR=3D~/.crawl" + "TILES=3D" + "BUILD_LUA=3D" + "BUILD_SQLITE=3D" + "BUILD_ZLIB=3D" + "-Csource")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + ;; Test cases require the source to be rebuild with the -DDEBUG= define. + ;; Do 'check before 'build to avoid a 3rd build on make install= =2E + (add-before 'build 'check + (lambda* (#:key inputs outputs make-flags + parallel-build? parallel-tests? #:allow-other-keys)= + (let* ((parallel-flag (format #f "-j~d" (parallel-job-count= ))) + (test-flags-build (if parallel-build? + (cons parallel-flag + make-flags) + make-flags)) + (test-flags-run (if parallel-tests? + (cons parallel-flag + make-flags) + make-flags))) + (setenv "HOME" (getcwd)) + ;; Fake a terminal for the test cases. + (setenv "TERM" "xterm-256color") + (setenv "COLUMNS" "80") + (setenv "LINES" "24") + (apply system* (cons* "make" "debug" test-flags-build)) + (zero? (apply system* (cons* "make" "test" test-flags-run= ))))))))) + (build-system gnu-build-system) + (inputs `(("ncurses" ,ncurses) + ("sqlite" ,sqlite) + ("bison" ,bison) + ("flex" ,flex) + ("zlib" ,zlib) + ("lua51" ,lua-5.1))) + (native-inputs `(("pkg-config" ,pkg-config) + ("perl" ,perl))) + (synopsis "Roguelike dungeon crawler game") + (description "Dungeon Crawl Stone Soup is a roguelike adventure thro= ugh +dungeons filled with dangerous monsters in a quest to find the mystifyin= gly +fabulous Orb of Zot.") + (home-page "https://crawl.develz.org") + (license (list license:gpl2+ + license:bsd-2 + license:bsd-3 + license:cc0 + license:x11 + license:zlib + license:asl2.0)))) --=20 2.12.2 --------------3DAA95E91640AB4DA42CB738--