summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-04-22 09:21:22 +0200
committerAndreas Enge <andreas@enge.fr>2023-04-22 09:21:22 +0200
commitd1252b597d8b6c77746da7b7417d958f00d01dc6 (patch)
treee2cdc9b0938e5ed7ac1b095b83c5760bbedecb87 /gnu/packages/games.scm
parent3f7ae420d8a54d4e2ab7f349c40d8930fe9e0771 (diff)
parent040d35f088e0f1c856f3f5a9b6bf889b17bd68b3 (diff)
downloadguix-d1252b597d8b6c77746da7b7417d958f00d01dc6.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 9936975ba6..62ee0050fa 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3706,6 +3706,57 @@ enemies in different game modes such as space ball, death match, team death
 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/"
+                           "alienblaster-" version ".tgz"))
+       (sha256
+        (base32
+         "104rfsfsv446n4y52p5zw9h8mhgjyrbca8fpyhnxkkasq141a264"))))
+    (build-system gnu-build-system)
+    (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"
+                                  #$(this-package-input "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 _
+              (install-file "alienblaster" (string-append #$output "/bin"))
+              (for-each
+               (lambda (dir)
+                 (copy-recursively dir (string-append #$output "/share/" dir)))
+               '("images" "sound" "cfg")))))))
+    (inputs (list sdl sdl-mixer))
+    (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")