unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27031: [PATCH] gnu: Add crawl-tiles.
@ 2017-05-22 22:29 nee
  2017-05-23  1:11 ` Arun Isaac
  2017-05-23 23:47 ` Arun Isaac
  0 siblings, 2 replies; 3+ messages in thread
From: nee @ 2017-05-22 22:29 UTC (permalink / raw)
  To: 27031

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

Hello here is the graphical package for crawl.

* Executable name
I renamed the executable to crawl-tiles (GAME makeflag), so it won't
collide with the console version. Other distros (NixOS, Ubuntu) use the
same name.

* Test cases
I asked on ##crawl-devel and the test cases are currently only written
to work with the debug build of the console version. So I overwrite the
'TILES=' flag in the crawl base package.

* Optional png optimization
Crawl uses 'which' to check if advpng (from advanceCOMP) or pngcrush is
available to optimize the png compression of it's pngs.
Optimizing png compression is not very important, and both programs are
not packaged, so I did not include any of them for now, but left a TODO
for if they get packaged.

- advanceCOMP has bundled dependencies and no options in the build
script to use external ones.
- pngcrush has a weird zlib-like license and a bundled header-library
that also has some similar custom zlib-like license. I might package
that later.

* Happy hacking
Thanks for merging my previous patches, and don't worry when I don't
reply for a few days.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-crawl-tiles.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-crawl-tiles.patch", Size: 3211 bytes --]

From 68cafa670b92c421853e243d4bb4bf3174e092ce Mon Sep 17 00:00:00 2001
From: nee <nee.git@cock.li>
Date: Mon, 22 May 2017 23:34:22 +0200
Subject: [PATCH] gnu: Add crawl-tiles.

* gnu/packages/games.scm (crawl-tiles): New variable.
---
 gnu/packages/games.scm | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index fc1e3dcf3..1bc82fb6c 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3979,8 +3979,6 @@ fish.  The whole game is accompanied by quiet, comforting music.")
          (list (string-append "SQLITE_INCLUDE_DIR=" sqlite "/include")
                (string-append "prefix=" out)
                "SAVEDIR=~/.crawl"
-               ;; TODO: build graphical client
-               "TILES="
                ;; don't build any bundled dependencies
                "BUILD_LUA="
                "BUILD_SQLITE="
@@ -3999,7 +3997,10 @@ fish.  The whole game is accompanied by quiet, comforting music.")
              (setenv "TERM" "xterm-256color")
              (zero? (apply system* "make" "debug" "test"
                            (format #f "-j~d" (parallel-job-count))
-                           make-flags)))))))
+                           ;; force commandline build for test cases.
+                           (append make-flags
+                                   '("GAME=crawl"
+                                     "TILES=")))))))))
     (synopsis "Roguelike dungeon crawler game")
     (description "Dungeon Crawl Stone Soup is a roguelike adventure through
 dungeons filled with dangerous monsters in a quest to find the mystifyingly
@@ -4013,6 +4014,36 @@ fabulous Orb of Zot.")
                    license:zlib
                    license:asl2.0))))
 
+(define-public crawl-tiles
+  (package
+    (inherit crawl)
+    (name "crawl-tiles")
+    (arguments
+     (substitute-keyword-arguments
+         (package-arguments crawl)
+       ((#:make-flags flags)
+        `(let* ((dejavu (assoc-ref %build-inputs "font-dejavu")))
+           (cons* (string-append "PROPORTIONAL_FONT=" dejavu
+                                 "/share/fonts/truetype/DejaVuSans.ttf")
+                  (string-append "MONOSPACED_FONT=" dejavu
+                                 "/share/fonts/truetype/DejaVuSansMono.ttf")
+                  "TILES=y"
+                  ;; rename the binary to allow parallel installation with crawl.
+                  "GAME=crawl-tiles"
+                  ,flags)))))
+    (inputs `(,@(package-inputs crawl)
+              ("font-dejavu" ,font-dejavu)
+              ("freetype6" ,freetype)
+              ("glu" ,glu)
+              ("libpng" ,libpng)
+              ("sdl2" ,sdl2)
+              ("sdl2-image" ,sdl2-image)
+              ("sdl2-mixer" ,sdl2-mixer)))
+    (native-inputs `(,@(package-native-inputs crawl)
+                     ;; TODO: add advpng or pngcrush for png additional optimization.
+                     ("which" ,which)))
+    (synopsis "Graphical roguelike dungeon crawler game")))
+
 (define-public lugaru
   (package
     (name "lugaru")
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#27031: [PATCH] gnu: Add crawl-tiles.
  2017-05-22 22:29 bug#27031: [PATCH] gnu: Add crawl-tiles nee
@ 2017-05-23  1:11 ` Arun Isaac
  2017-05-23 23:47 ` Arun Isaac
  1 sibling, 0 replies; 3+ messages in thread
From: Arun Isaac @ 2017-05-23  1:11 UTC (permalink / raw)
  To: nee; +Cc: 27031


> Hello here is the graphical package for crawl.
>
> * Happy hacking
> Thanks for merging my previous patches, and don't worry when I don't
> reply for a few days.

Nice to have you back! :-) I'll get back to you on this patch in
(hopefully) 24 hours.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#27031: [PATCH] gnu: Add crawl-tiles.
  2017-05-22 22:29 bug#27031: [PATCH] gnu: Add crawl-tiles nee
  2017-05-23  1:11 ` Arun Isaac
@ 2017-05-23 23:47 ` Arun Isaac
  1 sibling, 0 replies; 3+ messages in thread
From: Arun Isaac @ 2017-05-23 23:47 UTC (permalink / raw)
  To: nee; +Cc: 27031-done


Pushed with a few minor changes!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-23 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-22 22:29 bug#27031: [PATCH] gnu: Add crawl-tiles nee
2017-05-23  1:11 ` Arun Isaac
2017-05-23 23:47 ` Arun Isaac

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).