From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cst6L-0002IL-Ju for guix-patches@gnu.org; Tue, 28 Mar 2017 11:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cst6I-0008PJ-AL for guix-patches@gnu.org; Tue, 28 Mar 2017 11:32:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cst6I-0008P0-4w for guix-patches@gnu.org; Tue, 28 Mar 2017 11:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cst6H-00058F-QY for guix-patches@gnu.org; Tue, 28 Mar 2017 11:32:01 -0400 Subject: bug#26267: [PATCH] gnu: hyperrogue: Update to 9.4c. Resent-Message-ID: From: Kei Kebreau References: <20170326200643.5256-1-kei@openmailbox.org> Date: Tue, 28 Mar 2017 11:31:14 -0400 In-Reply-To: <20170326200643.5256-1-kei@openmailbox.org> (Kei Kebreau's message of "Sun, 26 Mar 2017 16:06:43 -0400") Message-ID: <87bmslpge5.fsf@openmailbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: 26267@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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. =2D-- gnu/packages/games.scm | 104 ++++++++++++++++++++++++++++++++-------------= ---- 1 file changed, 68 insertions(+), 36 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 67fcb7b49..19f9c9d39 100644 =2D-- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3163,23 +3163,21 @@ throwing people around in pseudo-randomly generated= buildings.") (define-public hyperrogue (package (name "hyperrogue") =2D (version "8.3j") + (version "9.4c") + ;; When updating this package, be sure to update the "hyperrogue-data" + ;; origin in native-inputs. (source (origin (method url-fetch) (uri (string-append "http://www.roguetemple.com/z/hyper/" =2D name "-83j.zip")) + name (string-join (string-split version #\.) "") + "-src.tgz")) (sha256 (base32 =2D "1ag95d84m4j0rqyn9hj7655znixw2j57bpf93nk14nfy02xz1g6p")) =2D (modules '((guix build utils))) =2D ;; Remove .exe and .dll files. =2D (snippet =2D '(for-each delete-file (find-files "." "\\.(exe|dll)$")))= )) + "1ri5fllnhqjm3dlnl1xbb9mlv79iigc940vbvcnk0v5k6p58pavq")))) (build-system gnu-build-system) (arguments =2D '(#:tests? #f ; no check target =2D #:make-flags '("-Csrc") + `(#:tests? #f ; no check target #:phases (modify-phases %standard-phases (add-after 'set-paths 'set-sdl-paths @@ -3190,21 +3188,24 @@ throwing people around in pseudo-randomly generated= buildings.") ;; Fix font and music paths. (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) =2D (let ((out (assoc-ref outputs "out")) =2D (dejavu-dir (string-append =2D (assoc-ref inputs "font-dejavu") =2D "/share/fonts/truetype")) =2D (dejavu-font "DejaVuSans-Bold.ttf") =2D (music-file "hyperrogue-music.txt")) =2D (with-directory-excursion "src" =2D (substitute* "graph.cpp" =2D ((dejavu-font) =2D (string-append dejavu-dir "/" dejavu-font)) =2D (((string-append "\\./" music-file)) =2D (string-append out "/share/hyperrogue/" music-file))) =2D (substitute* music-file =2D (("\\*/") =2D (string-append out "/share/hyperrogue/"))))) + (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")) + (substitute* "graph.cpp" + ((dejavu-font) + (string-append dejavu-dir "/" dejavu-font))) + (substitute* "sound.cpp" + (((string-append "\\./" music-file)) + (string-append share-dir "/" music-file)) + (("sounds/") + (string-append share-dir "/sounds/"))) + (substitute* music-file + (("\\*/") + (string-append share-dir "/sounds/")))) #t)) (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) @@ -3212,14 +3213,43 @@ throwing people around in pseudo-randomly generated= buildings.") (bin (string-append out "/bin")) (share-dir (string-append out "/share/hyperrogue"))) (mkdir-p bin) =2D (copy-file "src/hyper" (string-append bin "/hyperrogue")) =2D (mkdir-p share-dir) =2D (copy-file "src/hyperrogue-music.txt" =2D (string-append share-dir "/hyperrogue-music.tx= t")) =2D (for-each (lambda (file) =2D (copy-file file (string-append share-dir "/" = file))) =2D (find-files "." "\\.ogg$"))) =2D #t))))) + (copy-file "hyper" (string-append bin "/hyperrogue")) + (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 (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 `(("font-dejavu" ,font-dejavu) ("glew" ,glew) @@ -3240,10 +3270,12 @@ are home to particular creatures and may be subject= to own rules of \"physics\". =20 While it can use ASCII characters to display the world the classical rogue symbols, the game needs graphics to render the non-euclidean world.") =2D (license (list license:bsd-3 ; src/glew.c, src/mtrand.* =2D license:cc-by-sa3.0 ; *.ogg =2D license:public-domain ; src/direntx.* =2D license:zlib ; src/savepng.* + (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.* license:gpl2+)))) ; remaining files =20 (define-public kobodeluxe =2D-=20 2.12.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY2oHCAAoJEOal7jwZRnoNPSQQAMCyDmg977KrUxBuDoLLxLc/ mbgzQdCk6etFK0UydAPED6EBjWd384/hL7biddQnr0sao8ZjKG9pzZV3oPxqksnO dpv+8brhu9Lr3MF2YX9QVOw3NBg1gJTp1VG6a3IU66RI6DF5trN0CNLwRfeauxh1 uZGmMOdNRKcZXFF0WaljRPu44KT9u74+Jo/oq9/jnk6B0wUcn1tKx2RkPReBt8du +cdE7+lGJ0xwHmfxi4mg1wNw38cuGS4kjAVUVIbNFUejWNLTiDcQHLP8ruCVpZRv 46lQ7jDupzl96CK8Dcrw5EBC9/R3Mu2FTJC3iXb6vbfji0kgkLl0Vlov+rJnts2Z mvzqQSP3c8/hKX6ZKggScKNoBkWLegGuJV8ysBfvdxrt5hq+U9iCpZKHWyyfEsLb GObx8yv53brrwlWSwBZRRox/3Mkj81IPzfTTaRpaiGzxTPB6nNHVUaNpWeGMf2S0 VwK38sCWbsBZr7okz7C3jIkMgwxsbPrjfVkVMzKPSXqH/QpEtmrkp7l4aXnoRa2D rCRdKwKsFLnGdSPh3zUGdQ8urp2kppYkc14czSgDCsozxXODVRMy1oO8PYpJ5Ak3 fcX/OlGDgPebMH2PrN0EFBJSj5SzAb9RNdyzKusJ93qzE0XC57wVyzmOQm7Hylr9 /jC3S9VsufFWZ8VJrqRC =tIAA -----END PGP SIGNATURE----- --=-=-=--