unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Yovan Naumovski via Guix-patches via <guix-patches@gnu.org>
To: 62550@debbugs.gnu.org
Cc: mirai@makinata.eu, Yovan Naumovski <yovan@gorski.stream>
Subject: [bug#62550] [PATCH v2] gnu: Add alienblaster.
Date: Fri, 31 Mar 2023 19:03:46 +0300	[thread overview]
Message-ID: <20230331160346.25800-1-yovan@gorski.stream> (raw)
In-Reply-To: <20230330192629.31655-1-yovan@gorski.stream>

Thank you for your tips and feedback Bruno!

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

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5825b8d936..394f68cd50 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3705,6 +3705,61 @@ (define-public mars
 match, cannon keep, and grave-itation pit.")
       (license license:gpl3+))))
 
+(define-public alienblaster
+  (package
+    (name "alienblaster")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.schwardtnet.de/alienblaster/archives/"
+                           name "-" version ".tgz"))
+       (sha256
+        (base32
+         "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
+    (build-system gnu-build-system)
+    (inputs (list sdl sdl-mixer))
+    (arguments
+     (list
+      #:tests? #f  ; no tests
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-sdl-paths
+            (lambda _
+              (let ((share (string-append #$output "/share")))
+                ;; fix name and append path to SDL_mixer.h
+                (substitute* "src/Makefile"
+                  (("GAME_NAME=alienBlaster")
+                   "GAME_NAME=alienblaster")
+                  (("SDL_FLAGS=\\$\\(shell sdl-config --cflags\\)" line)
+                   (string-append line " -I" #$sdl-mixer "/include/SDL")))
+
+                ;; substitute relative paths in .cfg and source/header files
+                (substitute* (find-files "./cfg")
+                  (("(\\./)?images") (string-append share "/images")))
+                (substitute* (list "src/global.h" "src/global.cc")
+                  (("./images") (string-append share "/images"))
+                  (("./sound") (string-append share "/sound"))
+                  (("./cfg") (string-append share "/cfg"))))))
+
+          (delete 'configure)
+
+          (replace 'install
+            (lambda _
+              (let ((bin (string-append #$output "/bin")))
+                (install-file "alienblaster" bin)
+                (for-each
+                 (lambda (dir)
+                   (copy-recursively dir (string-append #$output "/share/" dir)))
+                 '("images" "sound" "cfg")))
+              #t)))))
+    (home-page "http://www.schwardtnet.de/alienblaster/")
+    (synopsis "Action-loaded 2D arcade shooter game")
+    (description "Alien Blaster is an action-loaded 2D arcade shooter
+game.  Your mission in the game is simple: stop the invasion of the aliens by
+blasting them.  Simultaneous two-player mode is available.")
+    (license license:gpl2)))
+
 (define glkterm
   (package
    (name "glkterm")
-- 
2.39.2





  parent reply	other threads:[~2023-03-31 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 19:26 [bug#62550] [PATCH] gnu: Add alienblaster Yovan Naumovski via Guix-patches via
2023-03-31 10:41 ` Bruno Victal
2023-03-31 16:03 ` Yovan Naumovski via Guix-patches via [this message]
2023-04-21  8:59   ` [bug#62550] [PATCH v2] " 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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331160346.25800-1-yovan@gorski.stream \
    --to=guix-patches@gnu.org \
    --cc=62550@debbugs.gnu.org \
    --cc=mirai@makinata.eu \
    --cc=yovan@gorski.stream \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).