[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: hyperrogue: Update to 12.1a.
From: |
guix-commits |
Subject: |
branch master updated: gnu: hyperrogue: Update to 12.1a. |
Date: |
Sun, 18 Sep 2022 13:58:49 -0400 |
This is an automated email from the git hooks/post-receive script.
ngz pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 31a56967e2 gnu: hyperrogue: Update to 12.1a.
31a56967e2 is described below
commit 31a56967e2869c916b7a5e8ee570e8e10f0210a5
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun Sep 18 19:56:20 2022 +0200
gnu: hyperrogue: Update to 12.1a.
* gnu/packages/games.scm (hyperrogue): Update to 12.1a.
[source]<origin>: Set upstream to GitHub.
[arguments]: Use G-expressions.
<phases>: Remove INSTALL-DATA phase. Remove trailing #T.
[home-page]: Fix URL.
---
gnu/packages/games.scm | 150 ++++++++++++++++++-------------------------------
1 file changed, 56 insertions(+), 94 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 60ce0167a6..0bf36fa620 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5892,101 +5892,63 @@ throwing people around in pseudo-randomly generated
buildings.")
(define-public hyperrogue
(package
(name "hyperrogue")
- (version "11.3a")
- ;; When updating this package, be sure to update the "hyperrogue-data"
- ;; origin in native-inputs.
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.roguetemple.com/z/hyper/hyperrogue"
- (string-join (string-split version #\.) "")
- "-src.tgz"))
- (sha256
- (base32
- "1yxabbswq02fc5frigvs43f83m5vlxybc7n5mynkwzj2c70lfp2k"))))
+ (version "12.1a")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zenorogue/hyperrogue")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1l09d1r3jdwp54zq071fk09hpggif5phjn0gsapzrjy3i289jran"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; no check target
- #:make-flags '("HYPERROGUE_USE_GLEW=1"
- "HYPERROGUE_USE_PNG=1")
- #:phases
- (modify-phases %standard-phases
- (add-after 'set-paths 'set-sdl-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "CPATH"
- (string-append (or (getenv "CPATH") "") ":"
- (assoc-ref inputs "sdl-union")
- "/include/SDL"))))
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (share-dir (string-append out "/share/hyperrogue"))
- (dejavu-dir (string-append
- (assoc-ref inputs "font-dejavu")
- "/share/fonts/truetype"))
- (dejavu-font "DejaVuSans-Bold.ttf")
- (music-file "hyperrogue-music.txt"))
- ;; Fix font and music paths.
- (substitute* "basegraph.cpp"
- ((dejavu-font)
- (string-append dejavu-dir "/" dejavu-font)))
- (substitute* music-file
- (("\\*/")
- (string-append share-dir "/sounds/")))
- (substitute* "sound.cpp"
- (("musicfile = \"\"")
- (string-append "musicfile = \""
- share-dir "/" music-file "\"")))
- ;; Disable build machine CPU optimizations and warnings treated
- ;; as errors.
- (substitute* "Makefile"
- (("-march=native") "")
- (("-Werror") "")))
- #t))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (share-dir (string-append out "/share/hyperrogue")))
- (mkdir-p bin)
- (install-file "hyperrogue" bin)
- (install-file "hyperrogue-music.txt" share-dir))
- #t))
- (add-after 'install 'install-data
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((data (assoc-ref inputs "hyperrogue-data"))
- (out (assoc-ref outputs "out"))
- (sounds (string-append out "/share/hyperrogue/sounds"))
- (unzip (search-input-file inputs "/bin/unzip")))
- ;; Extract media license information into sounds directory.
- (invoke unzip "-j" data
- (string-append
- "hyperrogue"
- (string-join (string-split ,version #\.) "")
- "/sounds/credits.txt") "-d" sounds)
- ;; Extract sounds and music into sounds directory.
- (invoke "unzip" "-j" data
- (string-append
- "hyperrogue"
- (string-join (string-split ,version #\.) "")
- "/*.ogg") "-d" sounds)))))))
- (native-inputs
- `(("hyperrogue-data"
- ,(origin
- (method url-fetch)
- (uri
- (string-append
- "https://www.roguetemple.com/z/hyper/hyperrogue"
- (string-join (string-split version #\.) "")
- "-win.zip"))
- (sha256
- (base32
- "11yhbia45f1w9z0j67h9nynwjqmvakr9l6rnrmdrdkzin6lvzzj4"))))
- ("unzip" ,unzip)))
+ (list
+ #:tests? #f ; no check target
+ #:make-flags #~(list "HYPERROGUE_USE_GLEW=1"
+ "HYPERROGUE_USE_PNG=1")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'set-paths 'set-sdl-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH"
+ (string-append (or (getenv "CPATH") "") ":"
+ (search-input-directory inputs
+
"/include/SDL")))))
+ (replace 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((share-dir (string-append #$output "/share/hyperrogue/"))
+ (fonts-dir (dirname
+ (search-input-file inputs
+ "DejaVuSans-Bold.ttf"))))
+ ;; Set fonts and music path.
+ (substitute* "sysconfig.h"
+ (("(#define HYPERPATH ).*" _ lead)
+ (string-append lead "\"" share-dir "\"\n"))
+ (("(#define HYPERFONTPATH ).*" _ lead)
+ (string-append lead "\"" fonts-dir "/\"\n")))
+ ;; Disable build machine CPU optimizations and warnings treated
+ ;; as errors.
+ (substitute* "Makefile"
+ (("-march=native") "")
+ (("-Werror") "")))))
+ (replace 'install
+ (lambda _
+ (install-file "hyperrogue" (string-append #$output "/bin"))
+ (let ((share-dir (string-append #$output "/share/hyperrogue/")))
+ (install-file "hyperrogue-music.txt" share-dir)
+ (for-each (lambda (dir)
+ (copy-recursively dir
+ (string-append share-dir dir)))
+ '("music" "sounds"))))))))
(inputs
- (list font-dejavu glew libpng
+ (list font-dejavu
+ glew
+ libpng
(sdl-union (list sdl sdl-gfx sdl-mixer sdl-ttf))))
- (home-page "https://www.roguetemple.com/z/hyper/")
+ (home-page "https://roguetemple.com/z/hyper")
(synopsis "Non-euclidean graphical rogue-like game")
(description
"HyperRogue is a game in which the player collects treasures and fights
@@ -5999,9 +5961,9 @@ are home to particular creatures and may be subject to
their own rules of
While the game can use ASCII characters to display the the classical rogue
symbols, it still needs graphics to render the non-euclidean world.")
- (license (list license:bsd-3 ; glew.c, mtrand.*
- license:cc-by-sa3.0 ; music
- license:cc-by-sa4.0 ; sounds
+ (license (list license:bsd-3 ; glew.c, mtrand.*
+ license:cc-by-sa3.0 ; music
+ license:cc-by-sa4.0 ; sounds
license:cc0
license:public-domain ; direntx.*, some sounds
license:zlib ; savepng.*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: hyperrogue: Update to 12.1a.,
guix-commits <=