summaryrefslogtreecommitdiff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-05-29 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-05-29 02:00:00 +0200
commitf696bbb70719bec21510bcf7cef18f141ce74f29 (patch)
tree4f1ca4cf56921324b88eb735a85a0a0ab57c7e77 /gnu/packages/games.scm
parentb540e5e6bba6e0047864abcc3a6dfec46ff6cd32 (diff)
downloadguix-f696bbb70719bec21510bcf7cef18f141ce74f29.tar.gz
guix-f696bbb70719bec21510bcf7cef18f141ce74f29.tar.xz
gnu: fortune-mod: Fix fortune directory.
It now matches the one given in the fortune(6) man page. * gnu/packages/games.scm (fortune-mode)[arguments]: Install to /share rather than /local/share/games. Shorten the 'fix-install-directory phase.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm27
1 files changed, 15 insertions, 12 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 58ccf080a7..7c0ac575a1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -24,7 +24,7 @@
;;; Copyright © 2016 Steve Webber <webber.sl@gmail.com>
;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
;;; Copyright © 2017, 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2019 nee <nee-git@hidamari.blue>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
@@ -7658,7 +7658,13 @@ original.")
(base32 "1f2zif3s6vddbhph4jr1cymdsn7gagg59grrxs0yap6myqmy8shg"))))
(build-system cmake-build-system)
(arguments
- (list #:test-target "check"
+ (list #:configure-flags
+ #~(let ((fortunes (string-append #$output "/share/fortunes")))
+ (list (string-append "-DLOCALDIR=" fortunes)
+ (string-append "-DLOCALODIR=" fortunes "/off")
+ (string-append "-DCOOKIEDIR=" fortunes)
+ (string-append "-DOCOOKIEDIR=" fortunes "/off")))
+ #:test-target "check"
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'enter-build-directory
@@ -7683,16 +7689,13 @@ original.")
(with-output-to-file "tests/scripts/split-valgrind.pl"
(const #t))))
(add-after 'install 'fix-install-directory
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move binary from "games/" to "bin/" and remove the
- ;; latter. This is easier than patching CMakeLists.txt
- ;; since the tests hard-code the location as well.
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (games (string-append out "/games")))
- (rename-file (string-append games "/fortune")
- (string-append bin "/fortune"))
- (rmdir games)))))))
+ ;; Move fortune from "games/" to "bin/" and remove the
+ ;; former. This is easier than patching CMakeLists.txt
+ ;; since the tests hard-code the location as well.
+ (lambda _
+ (with-directory-excursion #$output
+ (rename-file "games/fortune" "bin/fortune")
+ (rmdir "games")))))))
(inputs (list recode))
(native-inputs
(list perl