GNU bug report logs - #41825
[PATCH] Add searhorse-adventures

Previous Next

Package: guix-patches;

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

Date: Fri, 12 Jun 2020 09:30:02 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 41825 in the body.
You can then email your comments to 41825 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#41825; Package guix-patches. (Fri, 12 Jun 2020 09:30:02 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. (Fri, 12 Jun 2020 09:30: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 searhorse-adventures
Date: Fri, 12 Jun 2020 11:29:23 +0200
[Message part 1 (text/plain, inline)]
Hello,

Here is, for review, the game Barbie Seahorse Adventures.

Regards,

-- 
Nicolas Goaziou
[0001-gnu-Add-seahorse-adventures.patch (text/x-diff, inline)]
From 4380cd78261bdd52abcd7ecf67dc136cb409cd36 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Fri, 12 Jun 2020 11:22:53 +0200
Subject: [PATCH] gnu: Add seahorse-adventures.

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8a2ac9fcc5..eec64c547c 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1734,6 +1734,118 @@ can be explored and changed freely.")
                    license:gpl3+
                    license:silofl1.1))))
 
+(define-public seahorse-adventures
+  (package
+    (name "seahorse-adventures")
+    (version "1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dulsi/seahorse-adventures.git")
+             (commit (string-append "release-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1rnvk06npaqcpjz5z6xcmssz61i32s422lydp49vrnf3j2g4yimd"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-1)))
+       ;; Remove non-free (non-commercial) font.
+       (snippet
+        `(begin
+           (for-each delete-file (find-files "data/fonts" "."))
+           #t))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f                      ;no test
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'build)                ;pure Python
+         (replace 'install              ;no install script
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (share (string-append out "/share"))
+                    (applications (string-append share "/applications"))
+                    (data (string-append share "/seahorse-adventures")))
+               ;; Install data.
+               (for-each (lambda (f)
+                           (chmod f #o555)
+                           (install-file f data))
+                         '("leveledit.py" "run_game.py" "tileedit.py"))
+               (for-each (lambda (dir)
+                           (let ((target (string-append data "/" dir)))
+                             (mkdir-p target)
+                             (copy-recursively dir target)))
+                         '("data" "lib"))
+               ;; Create executable.
+               (mkdir-p bin)
+               (let ((executable (string-append bin "/seahorse-adventures")))
+                 (call-with-output-file executable
+                   (lambda (p)
+                     (format p
+                             "#!~a~@
+                              export PYTHONPATH=~a:~a~@
+                              exec -a \"~a\" ~a \"$@\"~%"
+                             (which "bash") data (getenv "PYTHONPATH")
+                             (which "python3")
+                             (string-append data "/run_game.py"))))
+                 (chmod executable #o555))
+               ;; Add desktop file.
+               (mkdir-p applications)
+               (make-desktop-entry-file
+                (string-append applications "/seahorse-adventures.desktop")
+                #:name "Seahorse Adventures"
+                #:comment
+                '((#f "Help Barbie the seahorse float on bubbles to the moon"))
+                #:exec ,name
+                #:icon ,name
+                #:categories '("Game" "ActionGame")
+                #:keywords '("game" "retro" "platform"))
+               ;; Add icons.
+               (for-each
+                (lambda (size)
+                  (let ((dir (string-append share "/icons/hicolor/"
+                                            size "x" size "/apps")))
+                    (mkdir-p dir)
+                    (copy-file
+                     (string-append "icon" size ".png")
+                     (string-append dir "/searhorse-adventures.png"))))
+                '("32" "64" "128")))
+             #t))
+         (add-after 'install 'unbundle-fonts
+           ;; Unbundle Bitstream Vera font and replace deleted one.
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (data (string-append out "/share/seahorse-adventures"))
+                    (vera (string-append (assoc-ref inputs "font-bitstream-vera")
+                                         "/share/fonts/truetype/Vera.ttf")))
+               (let ((themes-dir (string-append data "/data/themes/")))
+                 (for-each
+                  (lambda (theme)
+                    (let ((target (string-append themes-dir theme "/Vera.ttf")))
+                      (delete-file target)
+                      (symlink vera target)))
+                  '("default" "gray")))
+               (symlink vera (string-append data "/data/fonts/04B_20__.TTF"))
+               (substitute* (string-append data "/lib/main.py")
+                 (("f_scale = 0.35") "f_scale = 0.47")))
+             #t)))))
+    (inputs
+     `(("font-bitstream-vera" ,font-bitstream-vera)
+       ("python-pygame" ,python-pygame)))
+    (home-page "http://www.imitationpickles.org/barbie/")
+    (synopsis "Help Barbie the seahorse float on bubbles to the moon")
+    (description
+     "Barbie Seahorse Adventures is a retro style platform arcade game.
+You are Barbie the seahorse who travels through the jungle, up to the
+volcano until you float on bubbles to the moon.  On the way to your
+final destination you will encounter various enemies, servants of the
+evil overlord who has stolen the galaxy crystal.  Avoid getting hit
+and defeat them with your bubbles!")
+    ;; GPL2+ is for code, CC0 is for art.
+    (license (list license:gpl2+ license:cc0))))
+
 (define-public superstarfighter
   (package
     (name "superstarfighter")
-- 
2.26.2


Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 21 Jun 2020 21:27:01 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Sun, 21 Jun 2020 21:27:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 41825-done <at> debbugs.gnu.org
Subject: Re: [bug#41825] [PATCH] Add searhorse-adventures
Date: Sun, 21 Jun 2020 23:26:05 +0200
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> Subject: [PATCH] gnu: Add seahorse-adventures.
>
> * gnu/packages/games.scm (seahorse-adventures): New variable.

Applied. Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Jul 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 278 days ago.

Previous Next


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