From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cz4U2-0004T8-4J for guix-patches@gnu.org; Fri, 14 Apr 2017 12:54:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cz4Tz-00018i-1f for guix-patches@gnu.org; Fri, 14 Apr 2017 12:54:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cz4Ty-00018T-PA for guix-patches@gnu.org; Fri, 14 Apr 2017 12:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cz4Ty-00017Z-FE for guix-patches@gnu.org; Fri, 14 Apr 2017 12:54: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: Date: Fri, 14 Apr 2017 18:10:49 +0200 MIME-Version: 1.0 In-Reply-To: <791d5ba7.AEQAJP3OyzEAAAAAAAAAAAO02gcAAAACwQwAAAAAAAW9WABY8IM9@mailjet.com> Content-Type: multipart/mixed; boundary="------------0AAA76C303A06C75E6556074" 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. --------------0AAA76C303A06C75E6556074 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Hello, thank you for reviewing my patch. Am 14.04.2017 um 10:07 schrieb Arun Isaac: > > Thanks for the patch! > >>> + (uri (list >>> + ;; Older releases get moved into a versioned directory >>> + (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/stone_soup-" >>> + version "-nodeps.tar.xz"))) > > Why do we need two URIs? Shouldn't the latest release alone be enough? > Isn't that the only release we need to build? > My thought is that this way the build won't break in the same moment a new version is released, since the referenced tar 404s when they move it. >>> + (arguments >>> + '(#:tests? #f > > The release tarball does seem to come with tests. Could you package them > as well? > Ah, I missed those because they are in make test and not make check. I tried to package them now, but the tests need to create a directory in home. This fails and I don't know how to handle this with guix. I need some help here. >>> + #:phases >>> + (modify-phases >>> + %standard-phases > > Please put modify-phases and %standard-phases on the same line like: > > (modify-phases %standard-phases > Okay, done. >>> + (add-after >>> + 'unpack 'prepare-before-make >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (chdir "source"))) > > I haven't actually tried building the package, but is this phase > necessary? If you do want to change directory before running make, you > can pass "-C" and "source" as #:make-flags. > Yes, it works great! I didn't know about that before, thank you. >>> + (add-before >>> + 'configure 'patch-makefile >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (substitute* >>> + "Makefile" >>> + (("SQLITE_INCLUDE_DIR := /usr/include") >>> + "SQLITE_INCLUDE_DIR := ${sqlite}/include")) >>> + (substitute* >>> + "Makefile" >>> + (("/usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;") >>> + "${dejavu_fonts}/share/fonts;")))) >>> + (delete 'configure)))) > > You should be able to do this using #:make-flags. See > https://www.gnu.org/software/make/manual/html_node/Overriding.html > 100% right! I also removed the second substitute, since fonts are only required for the graphical version. I started packaging this more than half a year ago and only recently decided to give it another try and remove the graphical version. Seems like I still missed out on removing a lot of the mess. >>> + (description "A roguelike adventure through dungeons filled with dangerous >>> +monsters in a quest to find the mystifyingly fabulous Orb of Zot. >>> +The game is also known under the name 'Dungeon Crawl Stone Soup'.") > > Could you make this "Dungeon Crawl Stone Soup is a roguelike adventure > ... "? Also, remove the last sentence "The game is also known as ...". > >>> + (license license:gpl2+))) > > licence.txt mentions multiple licenses. Could you mention them all as a > list of licenses? > > > I did both now. I hope this is the right way. I'm appending my current WIP version. The test phase is broken and I'll need help, as I said above. When I disable the tests, the game builds and can be played. --------------0AAA76C303A06C75E6556074 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 ddb53e51bbc8592e32b81cfcc4773de1a6ba2b6c 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 | 70 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 70 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 710b2746c..c145ba830 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -115,6 +115,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 +3651,71 @@ 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) + (replace + 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (and + (mkdir-p "~/.crawl/saves") + (zero? (system* + "make" "test" + (string-append "prefix=3D" out) + "TILES=3D" + "BUILD_LUA=3D" + "BUILD_SQLITE=3D" + "BUILD_ZLIB=3D" + "-Csource"))))))))) + (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 --------------0AAA76C303A06C75E6556074--