GNU bug report logs - #35757
[PATCH] Add drascula

Previous Next

Package: guix-patches;

Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Date: Wed, 15 May 2019 20:39:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35757 in the body.
You can then email your comments to 35757 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35757; Package guix-patches. (Wed, 15 May 2019 20:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 15 May 2019 20:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add drascula
Date: Wed, 15 May 2019 22:37:49 +0200
[Message part 1 (text/plain, inline)]
Hello,

The following patch adds Drascula: The Vampire Strikes Back as
a standalone SCUMMVM game.

Feedback welcome.

Regards,

-- 
Nicolas Goaziou
[0001-gnu-Add-drascula.patch (text/x-diff, inline)]
From 36e9befc3b015d870d7d3794809b54ec0b6d2b33 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Wed, 15 May 2019 22:32:50 +0200
Subject: [PATCH] gnu: Add drascula.

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 202221a987..9ab4849506 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -86,6 +86,7 @@
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages emulators)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fonts)
@@ -7161,3 +7162,122 @@ and cones of view for monsters.  Aiming for a replayable streamlined experience,
 the game avoids complex inventory management and character building, relying
 on items and player adaptability for character progression.")
     (license license:isc)))
+
+(define-public drascula
+  (package
+    (name "drascula")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/scummvm/extras/"
+                                  "Drascula_%20The%20Vampire%20Strikes%20Back/"
+                                  "drascula-" version ".zip"))
+              (sha256
+               (base32
+                "1pj29rpb754sn6a56f8brfv6f2m1p5qgaqik7d68pfi2bb5zccdp"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 match))
+         (let* ((out (assoc-ref %outputs "out"))
+                (share (string-append out "/share/drascula"))
+                (scummvm (assoc-ref %build-inputs "scummvm")))
+           ;; Install data.
+           (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+                                       "/bin/unzip"))
+                 (doc (string-append out "/share/doc/" ,name "-" ,version)))
+             (for-each
+              (lambda (input)
+                (invoke unzip
+                        "-j"
+                        (assoc-ref %build-inputs input)
+                        "-x" "__MACOSX")
+                ;; Every input provides "readme.txt", and we want to
+                ;; preserve them all.  Therefore we rename them first.
+                (match input
+                  ("drascula-int"
+                   (rename-file "readme.txt" "readme-international.txt"))
+                  ("drascula-audio"
+                   (rename-file "readme.txt" "readme-audio.txt"))
+                  (_ #f))
+                ;; Install documentation.
+                (for-each (lambda (f) (install-file f doc))
+                          (find-files "." "\\.(txt|doc)$"))
+                ;; Install data.
+                (for-each (lambda (f) (install-file f share))
+                          (find-files "." "\\.(ogg|00[0-9])$")))
+              '("drascula-audio" "drascula-int" "source")))
+           ;; Create standalone executable.
+           (let* ((bin (string-append out "/bin"))
+                  (executable (string-append bin "/drascula"))
+                  (bash (string-append (assoc-ref %build-inputs "bash")
+                                       "/bin/bash")))
+             (mkdir-p bin)
+             (with-output-to-file executable
+               (lambda ()
+                 (format #t "#!~a~%" bash)
+                 (format #t
+                         "exec ~a/bin/scummvm --path=~a drascula~%"
+                         scummvm share)))
+             (chmod executable #o755))
+           ;; Create desktop file.  There is no dedicated icon for the
+           ;; game, so we borrow SCUMMVM's.
+           (let ((apps (string-append out "/share/applications")))
+             (mkdir-p apps)
+             (with-output-to-file (string-append apps "/drascula.desktop")
+               (lambda _
+                 (format #t
+                         "[Desktop Entry]~@
+                     Name=Drascula: The Vampire Strikes Back~@
+                     GenericName=Drascula~@
+                     Exec=~a/bin/drascula~@
+                     Icon=~a/share/icons/hicolor/scalable/apps/scummvm.svg~@
+                     Categories=AdventureGame;Game;RolePlaying;~@
+                     Keywords=game;adventure;roleplaying;2D,fantasy;~@
+                     Comment=Classic 2D point and click adventure game~@
+                     Comment[de]=klassisches 2D-Abenteuerspiel in Zeigen-und-Klicken-Manier~@
+                     Comment[fr]=Jeux classique d'aventure pointer-et-cliquer en 2D~@
+                     Comment[it]=Gioco classico di avventura punta e clicca 2D~@
+                     Type=Application~%"
+                         out scummvm))))
+           #t))))
+    (native-inputs
+     `(("bash" ,bash)
+       ("unzip" ,unzip)))
+    (inputs
+     `(("scummvm" ,scummvm)
+       ("drascula-int"
+        ,(let ((version "1.1"))
+           (origin
+             (method url-fetch)
+             (uri (string-append "mirror://sourceforge/scummvm/extras/"
+                                 "Drascula_%20The%20Vampire%20Strikes%20Back/"
+                                 "drascula-int-" version ".zip"))
+             (sha256
+              (base32
+               "12236i7blamal92p1i8dgp3nhp2yicics4whsl63v682bj999n14")))))
+       ("drascula-audio"
+        ,(let ((version "2.0"))
+           (origin
+             (method url-fetch)
+             (uri (string-append "mirror://sourceforge/scummvm/extras/"
+                                 "Drascula_%20The%20Vampire%20Strikes%20Back/"
+                                 "drascula-audio-" version ".zip"))
+             (sha256
+              (base32
+               "00g4izmsqzxb8ry1vhfx6jrygl58lvlij09nw01ds4zddsiznsky")))))))
+    (home-page "https://www.scummvm.org")
+    (synopsis "Classic 2D point and click adventure game")
+    (description "Drascula: The Vampire Strikes Back is a classic humorous 2D
+point and click adventure game.
+
+In Drascula you play the role of John Hacker, a British estate agent, that
+gets to meet a gorgeous blond girl who is kidnapped by the notorious vampire
+Count Drascula and embark on a fun yet dangerous quest to rescue her.
+Unfortunately, Hacker is not aware of Drascula's real ambitions: DOMINATING
+the World and demonstrating that he is even more evil than his brother Vlad.")
+    ;; Drascula uses a BSD-like license.
+    (license (license:non-copyleft "file://readme.txt"))))
-- 
2.21.0


Information forwarded to guix-patches <at> gnu.org:
bug#35757; Package guix-patches. (Mon, 20 May 2019 08:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 35757 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 35757 <at> debbugs.gnu.org
Subject: Re: [bug#35757] [PATCH] Add drascula
Date: Mon, 20 May 2019 10:13:34 +0200
[Message part 1 (text/plain, inline)]
LGTM except for

>+    (license (license:non-copyleft "file://readme.txt"))))

That is an invalid URL.

Should be:

+    (license (license:non-copyleft "file:///readme.txt"))))

There are cases where you want to refer to files on a specific host
(I've actually used file manager programs which support drag&drop 
across hosts--it's nice).

See also https://tools.ietf.org/html/rfc8089 for possible forms.

What is also valid by now is "file:readme.txt".
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 20 May 2019 21:38:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Mon, 20 May 2019 21:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 35757-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35757-done <at> debbugs.gnu.org
Subject: Re: [bug#35757] [PATCH] Add drascula
Date: Mon, 20 May 2019 23:37:26 +0200
Hello,

Danny Milosavljevic <dannym <at> scratchpost.org> writes:

> LGTM except for
>
>>+    (license (license:non-copyleft "file://readme.txt"))))
>
> That is an invalid URL.
>
> Should be:
>
> +    (license (license:non-copyleft "file:///readme.txt"))))

Oops. Fixed.

Pushed. Thank you.

Regards,

-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 312 days ago.

Previous Next


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