From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 38805@debbugs.gnu.org
Subject: [bug#38805] [PATCH] Add lure.
Date: Mon, 30 Dec 2019 03:02:52 +0100 [thread overview]
Message-ID: <87r20mzi2b.fsf@nicolasgoaziou.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 508 bytes --]
Hello,
The following patch adds Lure of the Temptress game, in several
languages.
There is a single game, but the files cannot live in the same directory,
and you probably never want to use more than one language. Therefore,
I abused the outputs mechanism: each output is a language, "out" being
the default English language.
According to #guix, this is not a good way to use outputs, but I don't
know how to do better. So, here is the patch!
Feedback welcome, of course!
Regards,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add lure --]
[-- Type: text/x-diff, Size: 8332 bytes --]
From 58661856821647e04bad8c9fdf82e3eee774a06f Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Mon, 30 Dec 2019 02:43:59 +0100
Subject: [PATCH] gnu: Add lure.
* gnu/packages/games.scm (lure): New variable.
---
gnu/packages/games.scm | 159 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 159 insertions(+)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 80ea82c123..61beb5fa77 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7635,6 +7635,165 @@ 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"))))
+(define-public lure
+ (package
+ (name "lure")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/scummvm/extras/"
+ "Lure%20of%20the%20Temptress/"
+ "lure-" version ".zip"))
+ (sha256
+ (base32 "0201i70qcs1m797kvxjx3ygkhg6kcl5yf49sihba2ga8l52q45zk"))))
+ (outputs '("out" "de" "es" "fr" "it"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((scummvm (assoc-ref %build-inputs "scummvm"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+ (make-executable-and-desktop-file
+ (lambda (name output language)
+ (let* ((bin (string-append output "/bin"))
+ (apps (string-append output "/share/applications"))
+ (executable (string-append bin "/" name))
+ (bash (assoc-ref %build-inputs "bash"))
+ (scummvm (assoc-ref %build-inputs "scummvm")))
+ ;; Build the executable.
+ (mkdir-p bin)
+ (with-output-to-file executable
+ (lambda ()
+ (format #t "#!~a/bin/bash~%" bash)
+ (format #t
+ "exec ~a/bin/scummvm -q ~a -p ~a lure~%"
+ scummvm
+ language
+ (string-append output "/share/lure/"
+ language))))
+ (chmod executable #o755)
+ ;; Create desktop file. There is no dedicated
+ ;; icon for the game, so we borrow SCUMMVM's.
+ (mkdir-p apps)
+ (with-output-to-file (string-append apps "/" name ".desktop")
+ (lambda _
+ (format #t
+ "[Desktop Entry]~@
+ Name=Lure of the Temptress~@
+ GenericName=Lure~@
+ Exec=~a~@
+ 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]=Jeu classique d'aventure pointer-et-cliquer en 2D~@
+ Comment[it]=Gioco classico di avventura punta e clicca 2D~@
+ Type=Application~%"
+ executable scummvm)))))))
+ ;; Main output: English language.
+ (let* ((out (assoc-ref %outputs "out"))
+ (share (string-append out "/share/lure"))
+ (doc (string-append out "/share/doc/lure-" ,version)))
+ (invoke unzip "-j" (assoc-ref %build-inputs "source"))
+ (for-each (lambda (f) (install-file f doc))
+ (find-files "." "\\.(txt|PDF|pdf)$"))
+ (for-each (lambda (f) (install-file f (string-append share "/en")))
+ (find-files "." "\\.vga$"))
+ (make-executable-and-desktop-file "lure" out "en"))
+ ;; Install additional languages.
+ (for-each
+ (lambda (lang)
+ (let* ((source (string-append "lure-" lang))
+ (output (assoc-ref %outputs lang))
+ (doc (string-append output "/share/doc/lure-" ,version))
+ (directory (string-append output "/share/lure/" lang)))
+ (mkdir-p directory)
+ (invoke
+ unzip
+ "-j" (assoc-ref %build-inputs source)
+ "-x" "*/README" "*/*.txt" "*/*.EXE" "*/*.exe" "*/PROTECT.*"
+ "-d" directory)
+ (mkdir-p doc)
+ (rename-file (string-append directory "/Manual.pdf")
+ (string-append doc "/Manual-" lang ".pdf"))
+ (make-executable-and-desktop-file (string-append "lure-" lang)
+ output
+ lang)))
+ '("de" "es" "fr" "it"))
+ #t))))
+ (native-inputs
+ `(("bash" ,bash)
+ ("unzip" ,unzip)))
+ (inputs
+ `(("scummvm" ,scummvm)
+ ("lure-de"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/scummvm/extras/"
+ "Lure%20of%20the%20Temptress/"
+ "lure-de-" version ".zip"))
+ (sha256
+ (base32 "0sqq7h5llml6rv85x0bfv4bgzwhs4c82p4w4zmfcaab6cjlad0sy"))))
+ ("lure-es"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/scummvm/extras/"
+ "Lure%20of%20the%20Temptress/"
+ "lure-es-" version ".zip"))
+ (sha256
+ (base32 "1dvv5znvlsakw6w5r16calv9jkgw27aymgybsf4q22lcmpxbj1lk"))))
+ ("lure-fr"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/scummvm/extras/"
+ "Lure%20of%20the%20Temptress/"
+ "lure-fr-" version ".zip"))
+ (sha256
+ (base32 "1y51jjb7f8023832g44vd1jsb6ni85586pi2n5hjg9qjk6gi90r9"))))
+ ("lure-it"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/scummvm/extras/"
+ "Lure%20of%20the%20Temptress/"
+ "lure-it-" version ".zip"))
+ (sha256
+ (base32 "1ks6n39r1cllisrrh6pcr39swsdv7ng3gx5c47vaw71zzfr70hjj"))))))
+ (home-page "https://www.scummvm.org")
+ (synopsis "2D point and click fantasy adventure game")
+ (description "Lure of the Temptress was Revolution's very first
+adventure game and work began on it in 1989, even before Revolution's
+inception as an actual games development company.
+
+You are Diermot, an unwilling hero who'd prefer a quiet life, and are,
+to all intents and purposes, a good man. After decades of unrest the
+King has united the warring factions in his kingdom and all his lands
+are at peace, except a remote region around a town called Turnvale.
+A revolt has recently taken place in Turnvale, a revolt orchestrated
+by an apprentice sorceress called Selena, the titular temptress. The
+king calls together his finest horsemen and heads off (with you in
+tow) to Turnvale just to witness how hellish mercenary monsters called
+Skorl are invading the town.
+
+The king's men are defeated, the king is killed and you fall of your
+horse and bang your head heavily on the ground. You have been
+*unconscious for a while when you realize that you are in a dingy cell
+guarded by a not so friendly Skorl. Maybe it would be an idea to try
+and escape...
+
+Note that this package only contains game-data. The game engine is
+provided by ScummVM.")
+ (license (license:non-copyleft "file:///README"))))
+
(define-public gnurobots
(package
(name "gnurobots")
--
2.24.1
next reply other threads:[~2019-12-30 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 2:02 Nicolas Goaziou [this message]
2020-02-03 16:31 ` [bug#38805] [PATCH] Add lure Nicolas Goaziou
2020-02-06 19:39 ` Efraim Flashner
2020-02-10 1:45 ` Nicolas Goaziou
2020-02-10 7:27 ` Efraim Flashner
2020-02-10 9:51 ` bug#38805: " Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r20mzi2b.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=38805@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.