GNU bug report logs - #62550
[PATCH] gnu: Add alienblaster.

Previous Next

Package: guix-patches;

Reported by: Yovan Naumovski <yovan <at> gorski.stream>

Date: Thu, 30 Mar 2023 19:28:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Yovan Naumovski <yovan <at> gorski.stream>
To: 62550 <at> debbugs.gnu.org
Cc: mirai <at> makinata.eu, Yovan Naumovski <yovan <at> gorski.stream>
Subject: [PATCH v2] gnu: Add alienblaster.
Date: Fri, 31 Mar 2023 19:03:46 +0300
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





This bug report was last modified 2 years and 30 days ago.

Previous Next


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