From f696bbb70719bec21510bcf7cef18f141ce74f29 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 29 May 2022 02:00:00 +0200 Subject: 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. --- gnu/packages/games.scm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'gnu/packages/games.scm') 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 ;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira ;;; Copyright © 2017, 2018, 2020 Arun Isaac -;;; Copyright © 2017–2021 Tobias Geerinckx-Rice +;;; Copyright © 2017–2022 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2019 nee ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017, 2019, 2020 Marius Bakke @@ -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 -- cgit 1.4.1