GNU bug report logs - #64787
[PATCH 0/2] gnu: Add openquest.

Previous Next

Package: guix-patches;

Reported by: Adam Faiz <adam.faiz <at> disroot.org>

Date: Sat, 22 Jul 2023 08:23:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Adam Faiz <adam.faiz <at> disroot.org>
To: 64787 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, iyzsong <at> envs.net
Subject: [bug#64787] [PATCH v3 2/2] gnu: Add openquest.
Date: Sun, 27 Aug 2023 13:29:09 +0800
From 0ff1adbf5147677f613697253867862ce342d115 Mon Sep 17 00:00:00 2001
Message-ID: <0ff1adbf5147677f613697253867862ce342d115.1693113837.git.adam.faiz <at> disroot.org>
In-Reply-To: <7ab2531a5434121f3fb7fdc25c626693f4d96cb6.1693113837.git.adam.faiz <at> disroot.org>
References: <7ab2531a5434121f3fb7fdc25c626693f4d96cb6.1693113837.git.adam.faiz <at> disroot.org>
From: AwesomeAdam54321 <adam.faiz <at> disroot.org>
Date: Sat, 22 Jul 2023 15:38:48 +0800
Subject: [PATCH v3 2/2] gnu: Add openquest.

* gnu/packages/games.scm (openquest): New variable.
---
 gnu/packages/games.scm | 85 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e594eb701c..857429b8cf 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5099,6 +5099,91 @@ (define openrct2-objects
     "openrct2-objects is a set of objects for OpenRCT2.")
    (license license:gpl3+)))
 
+(define-public openquest
+  (package
+    (name "openquest")
+    (version "0.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/AlbanBedel/scummc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yyq05kfmvgx5aa68kg1l5a4lpsky7hzxxcdvv2xbgf0jljdcl3k"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (substitute* "configure"
+                     (("\\|alpha" all)
+                      (string-append all "|arm|aarch64|powerpc64le")))
+                   (substitute* "examples/example.mak"
+                     (("scost.*\n$") "scost\n")
+                     (("bmp \\$\\(.*\n$") "bmp\n")
+                     (("/%.scc.*\n$") "/%.scc\n")
+                     (("voc \\$\\(.*\n$") "voc\n"))
+                   (substitute* "Makefile.target"
+                     (("distrib-data:.*\n") "distrib-data:\n")
+                     (("cp.*/bin" all)
+                      (string-append all " || true")))))))
+    (build-system gnu-build-system)
+    (arguments
+     (substitute-keyword-arguments (package-arguments scummc)
+       ((#:make-flags _)
+        #~(list "SCC=scc"
+                "SLD=sld"
+                "COST=cost"
+                "CHAR=char"
+                "SOUN=soun"))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'build
+              (lambda* (#:key make-flags #:allow-other-keys)
+                (with-directory-excursion "examples/openquest"
+                  (apply invoke "make" "tentacle" make-flags))))
+            (add-after 'install 'install-executable
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; Create standalone executable.
+                (let* ((bash (search-input-file inputs "/bin/bash"))
+                       (share (string-append #$output "/examples/openquest"))
+                       (scummvm (search-input-file inputs "/bin/scummvm"))
+                       (bin (string-append #$output "/bin"))
+                       (executable (string-append bin "/openquest")))
+                  (mkdir-p bin)
+                  (with-output-to-file executable
+                    (lambda ()
+                      (format #t "#!~a~%" bash)
+                      (format #t
+                              "exec ~a --path=~a tentacle~%"
+                              scummvm share)))
+                  (chmod executable #o755))))
+            (add-after 'install-executable 'install-desktop-file
+              (lambda _
+                ;; Create desktop file.  There is no official icon,
+                ;; but the main character of the game is a good choice.
+                (let ((apps (string-append #$output "/share/applications")))
+                  (mkdir-p apps)
+                  (make-desktop-entry-file
+                   (string-append apps "/openquest.desktop")
+                   #:name "OpenQuest"
+                   #:generic-name "OpenQuest"
+                   #:exec (string-append #$output "/bin/openquest")
+                   #:icon (string-append #$output "/examples/openquest/graphics/zob/frames/stand_S.bmp")
+                   #:categories '("AdventureGame" "Game" "RolePlaying")
+                   #:keywords '("game" "adventure" "roleplaying" "2D" "sci-fi")
+                   #:comment '((#f "Simple 2D point and click adventure game"))))))))))
+    (native-inputs
+     (modify-inputs (package-native-inputs scummc)
+       (prepend scummc)))
+    (inputs
+     (list bash scummvm))
+    (home-page "https://www.scummvm.org")
+    (synopsis "Simple 2D point and click adventure game")
+    (description "OpenQuest is a two room adventure game
+that follows two aliens who come to Earth in search of a stolen artifact.")
+    (license license:gpl2+)))
+
 (define-public openrct2
   (package
     (name "openrct2")
-- 
2.41.0




This bug report was last modified 1 year and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.