gnu: hyperrogue: Update to 9.4c.
* gnu/packages/games.scm (hyperrogue): Update to 9.4c. [source]: Remove snippet. [arguments]: Remove #:make-flags; adjust configure and install phases; add install-data phase. [native-inputs]: Add hyperrogue-data and unzip. [license]: Add cc-by-sa4.0 and cc0 licenses for sounds.
This commit is contained in:
parent
7bde7273c3
commit
f8279ba46b
|
@ -3163,23 +3163,21 @@ throwing people around in pseudo-randomly generated buildings.")
|
||||||
(define-public hyperrogue
|
(define-public hyperrogue
|
||||||
(package
|
(package
|
||||||
(name "hyperrogue")
|
(name "hyperrogue")
|
||||||
(version "8.3j")
|
(version "9.4c")
|
||||||
|
;; When updating this package, be sure to update the "hyperrogue-data"
|
||||||
|
;; origin in native-inputs.
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
"http://www.roguetemple.com/z/hyper/"
|
"http://www.roguetemple.com/z/hyper/"
|
||||||
name "-83j.zip"))
|
name (string-join (string-split version #\.) "")
|
||||||
|
"-src.tgz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1ag95d84m4j0rqyn9hj7655znixw2j57bpf93nk14nfy02xz1g6p"))
|
"1ri5fllnhqjm3dlnl1xbb9mlv79iigc940vbvcnk0v5k6p58pavq"))))
|
||||||
(modules '((guix build utils)))
|
|
||||||
;; Remove .exe and .dll files.
|
|
||||||
(snippet
|
|
||||||
'(for-each delete-file (find-files "." "\\.(exe|dll)$")))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:tests? #f ; no check target
|
`(#:tests? #f ; no check target
|
||||||
#:make-flags '("-Csrc")
|
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'set-paths 'set-sdl-paths
|
(add-after 'set-paths 'set-sdl-paths
|
||||||
|
@ -3190,21 +3188,24 @@ throwing people around in pseudo-randomly generated buildings.")
|
||||||
;; Fix font and music paths.
|
;; Fix font and music paths.
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(dejavu-dir (string-append
|
(share-dir (string-append out "/share/hyperrogue"))
|
||||||
(assoc-ref inputs "font-dejavu")
|
(dejavu-dir (string-append
|
||||||
"/share/fonts/truetype"))
|
(assoc-ref inputs "font-dejavu")
|
||||||
(dejavu-font "DejaVuSans-Bold.ttf")
|
"/share/fonts/truetype"))
|
||||||
(music-file "hyperrogue-music.txt"))
|
(dejavu-font "DejaVuSans-Bold.ttf")
|
||||||
(with-directory-excursion "src"
|
(music-file "hyperrogue-music.txt"))
|
||||||
(substitute* "graph.cpp"
|
(substitute* "graph.cpp"
|
||||||
((dejavu-font)
|
((dejavu-font)
|
||||||
(string-append dejavu-dir "/" dejavu-font))
|
(string-append dejavu-dir "/" dejavu-font)))
|
||||||
(((string-append "\\./" music-file))
|
(substitute* "sound.cpp"
|
||||||
(string-append out "/share/hyperrogue/" music-file)))
|
(((string-append "\\./" music-file))
|
||||||
(substitute* music-file
|
(string-append share-dir "/" music-file))
|
||||||
(("\\*/")
|
(("sounds/")
|
||||||
(string-append out "/share/hyperrogue/")))))
|
(string-append share-dir "/sounds/")))
|
||||||
|
(substitute* music-file
|
||||||
|
(("\\*/")
|
||||||
|
(string-append share-dir "/sounds/"))))
|
||||||
#t))
|
#t))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
@ -3212,14 +3213,43 @@ throwing people around in pseudo-randomly generated buildings.")
|
||||||
(bin (string-append out "/bin"))
|
(bin (string-append out "/bin"))
|
||||||
(share-dir (string-append out "/share/hyperrogue")))
|
(share-dir (string-append out "/share/hyperrogue")))
|
||||||
(mkdir-p bin)
|
(mkdir-p bin)
|
||||||
(copy-file "src/hyper" (string-append bin "/hyperrogue"))
|
(copy-file "hyper" (string-append bin "/hyperrogue"))
|
||||||
(mkdir-p share-dir)
|
(install-file "hyperrogue-music.txt" share-dir))
|
||||||
(copy-file "src/hyperrogue-music.txt"
|
#t))
|
||||||
(string-append share-dir "/hyperrogue-music.txt"))
|
(add-after 'install 'install-data
|
||||||
(for-each (lambda (file)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(copy-file file (string-append share-dir "/" file)))
|
(let* ((data (assoc-ref inputs "hyperrogue-data"))
|
||||||
(find-files "." "\\.ogg$")))
|
(out (assoc-ref outputs "out"))
|
||||||
#t)))))
|
(sounds (string-append out "/share/hyperrogue/sounds"))
|
||||||
|
(unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
|
||||||
|
(and
|
||||||
|
;; Extract media license information into sounds directory.
|
||||||
|
(zero?
|
||||||
|
(system* unzip "-j" data
|
||||||
|
(string-append
|
||||||
|
"hyperrogue"
|
||||||
|
(string-join (string-split ,version #\.) "")
|
||||||
|
"-win/sounds/credits.txt") "-d" sounds))
|
||||||
|
;; Extract sounds and music into sounds directory.
|
||||||
|
(zero?
|
||||||
|
(system* "unzip" "-j" data
|
||||||
|
(string-append
|
||||||
|
"hyperrogue"
|
||||||
|
(string-join (string-split ,version #\.) "")
|
||||||
|
"-win/*.ogg") "-d" sounds)))))))))
|
||||||
|
(native-inputs
|
||||||
|
`(("hyperrogue-data"
|
||||||
|
,(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri
|
||||||
|
(string-append
|
||||||
|
"http://www.roguetemple.com/z/hyper/" name
|
||||||
|
(string-join (string-split version #\.) "")
|
||||||
|
"-win.zip"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1cyyrsnrixygg3zyz97hpsm6jzwbhydiwk3kl0lm7qjnw2nzkhhh"))))
|
||||||
|
("unzip" ,unzip)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("font-dejavu" ,font-dejavu)
|
`(("font-dejavu" ,font-dejavu)
|
||||||
("glew" ,glew)
|
("glew" ,glew)
|
||||||
|
@ -3240,10 +3270,12 @@ are home to particular creatures and may be subject to own rules of \"physics\".
|
||||||
|
|
||||||
While it can use ASCII characters to display the world the classical rogue
|
While it can use ASCII characters to display the world the classical rogue
|
||||||
symbols, the game needs graphics to render the non-euclidean world.")
|
symbols, the game needs graphics to render the non-euclidean world.")
|
||||||
(license (list license:bsd-3 ; src/glew.c, src/mtrand.*
|
(license (list license:bsd-3 ; glew.c, mtrand.*
|
||||||
license:cc-by-sa3.0 ; *.ogg
|
license:cc-by-sa3.0 ; music
|
||||||
license:public-domain ; src/direntx.*
|
license:cc-by-sa4.0 ; sounds
|
||||||
license:zlib ; src/savepng.*
|
license:cc0
|
||||||
|
license:public-domain ; direntx.*, some sounds
|
||||||
|
license:zlib ; savepng.*
|
||||||
license:gpl2+)))) ; remaining files
|
license:gpl2+)))) ; remaining files
|
||||||
|
|
||||||
(define-public kobodeluxe
|
(define-public kobodeluxe
|
||||||
|
|
Loading…
Reference in New Issue