From 51d8303578a49313dc339773fe83f571fb38c239 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 22 Jan 2025 14:10:21 +0200 Subject: [PATCH] gnu: open-adventure: Enable building on more systems. * gnu/packages/games.scm (open-adventure)[arguments]: Adjust or remove some phases when building without ruby-asciidoctor. [native-inputs]: Only add ruby-asciidoctor on supported systems. Change-Id: I573a488721557442769f4e8b9e68ea1e70d4fbf0 --- gnu/packages/games.scm | 54 ++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3d71a7cf8b9..e55a04b4c31 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2016 Albin Söderqvist ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Kei Kebreau ;;; Copyright © 2016 Alex Griffin -;;; Copyright © 2016-2021, 2023, 2024 Efraim Flashner +;;; Copyright © 2016-2021, 2023-2025 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Steve Webber ;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira @@ -7701,29 +7701,37 @@ at their peak of economic growth and military prowess. (lambda _ (substitute* (list "tests/Makefile" "tests/tapview") (("/bin/echo") (which "echo"))))) - (add-after 'build 'build-manpage - (lambda _ - ;; This target is missing a dependency - (substitute* "Makefile" - ((".adoc.6:" line) - (string-append line " advent.adoc"))) - (invoke "make" ".adoc.6"))) - ;; There is no install target. - (replace 'install - (lambda _ - (let ((bin (string-append #$output "/bin")) - (man (string-append #$output "/share/man/man6"))) - (install-file "advent" bin) - (install-file "advent.6" man))))))) + #$@(if (this-package-native-input "ruby-asciidoctor") + #~((add-after 'build 'build-manpage + (lambda _ + ;; This target is missing a dependency + (substitute* "Makefile" + ((".adoc.6:" line) + (string-append line " advent.adoc"))) + (invoke "make" ".adoc.6"))) + ;; There is no install target. + (replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin")) + (man (string-append #$output "/share/man/man6"))) + (install-file "advent" bin) + (install-file "advent.6" man))))) + #~((replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin"))) + (install-file "advent" bin))))))))) (native-inputs - (list asciidoc - cppcheck - libedit - pkg-config - python-pylint - python-pyyaml - python-wrapper - ruby-asciidoctor)) + (append + (list asciidoc + cppcheck + libedit + pkg-config + python-pylint + python-pyyaml + python-wrapper) + (if (supported-package? ruby-asciidoctor) + (list ruby-asciidoctor) + '()))) (home-page "https://gitlab.com/esr/open-adventure") (synopsis "Colossal Cave Adventure") (description