From 75b01d6dfd7188e0bd5536308bf0c4c35f455ed0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 15 Feb 2021 21:59:08 +0100 Subject: gnu: Add passage. * gnu/packages/games.scm (passage): New variable. --- gnu/packages/games.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) (limited to 'gnu/packages') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index bf6b79370a..1d10c0d101 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2015, 2016 Andreas Enge ;;; Copyright © 2015 David Hashe ;;; Copyright © 2015, 2017, 2018 Christopher Lemmer Webber -;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017 Alex Kost ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016, 2017 Rodger Fox @@ -12170,6 +12170,63 @@ such as GnuGo. @end itemize") (license license:gpl2+))) +(define-public passage + (package + (name "passage") + (version "4") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/hcsoftware/Passage/v" + version "/Passage_v" version "_UnixSource.tar.gz")) + (sha256 + (base32 "02ky4a4xdjvr71r58339jjrjyz76b5skcnbq4f8707mrln9vhby3")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #false ; there are none + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "gamma256/gameSource") + (system "cat Makefile.GnuLinux Makefile.all > Makefile"))) + (replace 'configure + (lambda* (#:key outputs inputs #:allow-other-keys) + (setenv "CPATH" + (string-append + (assoc-ref inputs "sdl") "/include/SDL:" + (or (getenv "CPATH") ""))) + (let* ((out (assoc-ref outputs "out")) + (assets (string-append out "/share/passage"))) + (substitute* "common.cpp" + (("readTGA\\( \"graphics\"") + (format #false "readTGA(\"~a/graphics\"" assets))) + (substitute* "musicPlayer.cpp" + (("readTGA\\( \"music\"") + (format #false "readTGA(\"~a/music\"" assets)))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (assets (string-append out "/share/passage/"))) + (install-file "Passage" bin) + (install-file "../documentation/Readme.txt" assets) + (copy-recursively "graphics" (string-append assets "graphics")) + (copy-recursively "music" (string-append assets "music")) + (copy-recursively "settings" (string-append assets "settings")))))))) + (inputs + `(("sdl" ,(sdl-union (list sdl sdl-mixer))))) + (native-inputs + `(("imagemagick" ,imagemagick))) + (home-page "http://hcsoftware.sourceforge.net/passage/") + (synopsis "Memento mori game") + (description "Passage is meant to be a memento mori game. It presents an +entire life, from young adulthood through old age and death, in the span of +five minutes. Of course, it's a game, not a painting or a film, so the +choices that you make as the player are crucial. There's no \"right\" way to +play Passage, just as there's no right way to interpret it.") + (license license:public-domain))) + (define-public paperview (let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6") (revision "1")) -- cgit 1.4.1