From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: [PATCH] gnu: Add hyperrogue. Date: Mon, 03 Oct 2016 19:15:39 -0400 Message-ID: <871szx6n38.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brCSi-0008Cb-Rx for guix-devel@gnu.org; Mon, 03 Oct 2016 19:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brCSc-00016T-Au for guix-devel@gnu.org; Mon, 03 Oct 2016 19:15:55 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:38430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brCSb-000141-Tb for guix-devel@gnu.org; Mon, 03 Oct 2016 19:15:50 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain If anyone would like to check this for fun, that would be great. The geometry makes this game especially interesting. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-gnu-Add-hyperrogue.patch Content-Transfer-Encoding: quoted-printable From=20e0171e159612c12419de1c6f9a230843ff8d826a Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Mon, 3 Oct 2016 19:09:35 -0400 Subject: [PATCH] gnu: Add hyperrogue. * gnu/packages/games.scm (hyperrogue): New variable. =2D-- gnu/packages/games.scm | 88 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 88 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index cd5cf6f..e9b11a7 100644 =2D-- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2896,3 +2896,91 @@ extinguishing action, intense boss battles, a catchy= soundtrack and lots of throwing people around in pseudo-randomly generated buildings.") (license (list license:zlib ; for source code license:cc-by-sa3.0)))) ; for graphics and music assets + +(define-public hyperrogue + (package + (name "hyperrogue") + (version "8.3j") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.roguetemple.com/z/hyper/" + name "-83j.zip")) + (sha256 + (base32 + "1ag95d84m4j0rqyn9hj7655znixw2j57bpf93nk14nfy02xz1g6p")) + (modules '((guix build utils))) + ;; remove .exe and .dll files + (snippet + '(begin + (for-each delete-file (find-files "." "\\.(exe|dll)$")))= ))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no check target + #:make-flags '("-Csrc") + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'set-sdl-paths + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CPATH" + (string-append (assoc-ref inputs "sdl-union") + "/include/SDL")))) + ;; fix font and music paths + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (dejavu-dir (string-append + (assoc-ref inputs "font-dejavu") + "/share/fonts/truetype")) + (dejavu-font "DejaVuSans-Bold.ttf") + (music-file "hyperrogue-music.txt")) + (chdir "src") + (substitute* "graph.cpp" + ((dejavu-font) + (string-append dejavu-dir "/" dejavu-font)) + (((string-append "\\./" music-file)) + (string-append out "/share/hyperrogue" music-file))) + (substitute* music-file + (("\\*/") + (string-append out "/share/music"))) + (chdir "..")) + #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) + (copy-file "src/hyper" (string-append bin "/hyperrogue")) + (mkdir-p share-dir) + (copy-file "src/hyperrogue-music.txt" + (string-append share-dir "/hyperrogue-music.txt"= )) + (for-each (lambda (file) + (copy-file file (string-append share-dir "/" fi= le))) + (find-files "." "\\*.ogg$"))) + #t))))) + (inputs + `(("font-dejavu" ,font-dejavu) + ("glew" ,glew) + ("libpng" ,libpng) + ("sdl-union" ,(sdl-union (list sdl + sdl-gfx + sdl-mixer + sdl-ttf))))) + (home-page "http://www.roguetemple.com/z/hyper/") + (synopsis "Non-euclidean graphical rogue-like game") + (description + "HyperRogue is a game in which the player collects treasures and figh= ts +monsters -- rogue-like but for the fact that it is played on the hyperbolic +plane and not in euclidean space. + +In HyperRogue, the player can move through different parts of the world, w= hich +are home to particular creatures and may be subject to own rules of \"phys= ics\". + +While it can use ASCII characters to display the world the classical rogue +symbols, the game needs graphics to render the non-euclidean world.") + (license (list license:bsd-3 ; src/glew.c, src/mtrand.* + license:cc-by-sa3.0 ; *.ogg + license:public-domain ; src/direntx.* + license:zlib ; src/savepng.* + license:gpl2+)))) ; remaining files =2D-=20 2.10.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX8uabAAoJEOal7jwZRnoNJ/oP/RG/m28WCDAEqkYfEOZk6Bts AQK9WSJVBAF2ajNXXNEgJnRkip2+N8NKMEyn/2PvYsIZuLUfWIvXo3+zmNPuhyW9 DpLUXLeS7pFC0DRHWrMEQJzY8SnsgFSKhzIEV9cP5DKf1VJTJ9jYUtaiauC+4mEF czJGlKwuUBvjgSQ0dp5AF8/bgCDXMCWo8NaWJqwy/LYiPprIP6KQQeOZeMLnOC9o /qChTU5q+Zk9RyheknWNTFeeWWJ2lA8+VqizQpSZIyPL6+DOgUZMHVsZZ4BWCrQB IuecNiYbjY9KK9U8V5jRKTl02KoBRoVB3/VRgglCXiMe2E09FrAdX7enHzpsXi92 iOvi/TDrSLIRMi1zYYBYFjZ6CMp6oyTyL3uZGoMu5svN29HTjmbW+uaqxmqvd+1b IlRl0ArzgdMYYZFEZJWmKANORu9hIRb3m7eSXuSpnXW+kzqRzZyvPwpi8l4mDi9g Q/uS8GMA5e+TfG0O0+DqQteqJA6e27ZQbg7RvlxPLTdYHsB2XrIeQVqITxebhhbu 3xd5zUCBSfYzJkJo0X9Um+JGz/P8rEi73Au3FLpGzKW2YvWVt1Dquw446QI3lw8B k9c51tv6xO+u7p1je+ZAqj0DGL+yqbk9T0q/OsB6B0x3NDnbDy3Jfee/N1YJC/ft qSUSoA753+qYaXZaTgTk =T7NK -----END PGP SIGNATURE----- --==-=-=--