diff mbox series

[bug#64787,v2,1/2] gnu: Add scummc.

Message ID b3cad140-2e7b-4e4d-ad24-d1156ddc6880@disroot.org
State New
Headers show
Series [bug#64787,v2,1/2] gnu: Add scummc. | expand

Commit Message

Adam Faiz July 22, 2023, 11:48 p.m. UTC
From ae75dfc3f9fa840f014b23809132540b955e189b Mon Sep 17 00:00:00 2001
Message-ID: <ae75dfc3f9fa840f014b23809132540b955e189b.1690069496.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Sat, 22 Jul 2023 15:34:55 +0800
Subject: [PATCH v2 1/2] gnu: Add scummc.

* gnu/packages/game-development.scm (scummc): New variable.
---
 gnu/packages/game-development.scm | 52 +++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)


base-commit: 6bda806416b8e6032ef1047c5feed776b6cc0493
diff mbox series

Patch

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index b0d9a88dc2..ba015aa649 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -66,6 +66,7 @@  (define-module (gnu packages game-development)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages compression)
@@ -745,6 +746,57 @@  (define-public tsukundere
 experimental.")
     (license license:lgpl3+)))
 
+(define-public scummc
+  (package
+    (name "scummc")
+    (version "0.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/AlbanBedel/scummc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yyq05kfmvgx5aa68kg1l5a4lpsky7hzxxcdvv2xbgf0jljdcl3k"))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (substitute* "examples/example.mak"
+                     (("scost.*\n$") "scost\n")
+                     (("bmp \\$\\(.*\n$") "bmp\n")
+                     (("/%.scc.*\n$") "/%.scc\n")
+                     (("voc \\$\\(.*\n$") "voc\n"))
+                   (substitute* "Makefile.target"
+                     (("distrib-data:.*\n") "distrib-data:\n")
+                     (("cp.*/bin" all)
+                      (string-append all " || true")))))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list bison doxygen libxslt pkg-config))
+    (inputs
+     (list freetype gtk+-2 sdl))
+    (arguments
+     (list #:test-target "test"
+           #:tests? #f ; The only tests verify that game checksums match
+           #:make-flags
+           #~(list "SHOW_WARNINGS=no")
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'configure ; ScummC uses a non-standard configure
+                    (lambda* (#:key configure-flags #:allow-other-keys)
+                      (apply invoke  "./configure" configure-flags)))
+               (replace 'install ; install target is referred to as distrib
+                 (lambda _
+                   (invoke "make" "distrib"
+                           (string-append "DISTRIB=" #$output)))))))
+    (synopsis "Scumm Compiler")
+    (description
+     "ScummC is a set of tools allowing to create SCUMM games from scratch.
+It is capable of creating games for SCUMM version 6 and partially version 7.")
+    (home-page "https://github.com/AlbanBedel/scummc")
+    (license license:gpl2+)))
+
 (define-public sfml
   (package
     (name "sfml")