GNU bug report logs - #63391
[PATCH] gnu: Add bbcsdl.

Previous Next

Package: guix-patches;

Reported by: iyzsong <at> envs.net

Date: Tue, 9 May 2023 14:08:02 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: iyzsong <at> envs.net
Subject: bug#63391: closed (Re: bug#63391: [PATCH] gnu: Add bbcsdl.)
Date: Sun, 14 May 2023 03:11:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#63391: [PATCH] gnu: Add bbcsdl.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 63391 <at> debbugs.gnu.org.

-- 
63391: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63391
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: 宋文武 <iyzsong <at> envs.net>
To: 63391-done <at> debbugs.gnu.org
Subject: Re: bug#63391: [PATCH] gnu: Add bbcsdl.
Date: Sun, 14 May 2023 11:10:49 +0800
Pushed now.

[Message part 3 (message/rfc822, inline)]
From: iyzsong <at> envs.net
To: guix-patches <at> gnu.org
Cc: 宋文武 <iyzsong <at> member.fsf.org>
Subject: [PATCH] gnu: Add bbcsdl.
Date: Tue,  9 May 2023 22:06:34 +0800
From: 宋文武 <iyzsong <at> member.fsf.org>

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

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 844ce935ae..ae6a49b1a1 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -59,6 +59,7 @@ (define-module (gnu packages game-development)
   #:use-module (guix build-system python)
   #:use-module (guix build-system scons)
   #:use-module (gnu packages)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
@@ -2884,3 +2885,74 @@ (define-public raylib
   writing your game.")
     (home-page "https://www.raylib.com/")
     (license license:zlib)))
+
+(define-public bbcsdl
+  (package
+    (name "bbcsdl")
+    (version "1.35a")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rtrussell/BBCSDL/")
+                    (commit "b9b2a3eb438cb799edb2766055b3c38e9518e3e3")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1d03xmhrl6ba6w0vwfk46mpyc9d0w3bixxj2d4irx7wl7bh3bfic"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ; XXX: tests not automated
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)           ; no configure script
+          (replace 'build
+            (lambda* (#:key outputs #:allow-other-keys)
+              ;; 'makefile' expects the source directory to be named 'BBCSDL'.
+              (symlink "source" "../BBCSDL")
+              ;; 'bbcsdl' finds 'libstb.so' in its RPATH.
+              (substitute* "bin/linux/makefile"
+                (("-Wl,-R,'\\$\\$ORIGIN'")
+                 (string-append "-Wl,-rpath="
+                                (assoc-ref outputs "out") "/opt/bbcsdl")))
+              ;; Build 'bbcbasic' and 'bbcsdl'.
+              (invoke "make" "-C" "console/linux")
+              (invoke "make" "-C" "bin/linux")))
+          (replace 'install
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))
+                     (opt (string-append out "/opt/bbcsdl"))
+                     (bin (string-append out "/bin")))
+                (for-each
+                 (lambda (f)
+                   (copy-recursively f (string-append opt "/" f)))
+                 ;; Those files need to be installed into the same difertory.
+                 '("lib" "examples" "bbcsdl.bbc"
+                   "libstb.so" "bbcsdl" "bbcbasic"))
+                ;; Replace bundled fonts.
+                (for-each
+                 (lambda (font)
+                   (delete-file (string-append opt "/lib/" font))
+                   (symlink
+                    (search-input-file
+                     inputs (string-append "share/fonts/truetype/" font))
+                    (string-append opt "/lib/" font)))
+                 '("DejaVuSans.ttf" "DejaVuSansMono.ttf"
+                   "FreeSans.ttf" "FreeMono.ttf" "FreeSerif.ttf"))
+                (mkdir bin)
+                (symlink (string-append opt "/bbcsdl")
+                         (string-append bin "/bbcsdl"))
+                (symlink (string-append opt "/bbcbasic")
+                         (string-append bin "/bbcbasic"))))))))
+    (native-inputs (list nasm))
+    (inputs (list sdl2 sdl2-ttf sdl2-net font-dejavu font-gnu-freefont))
+    (synopsis "BBC BASIC for SDL 2.0")
+    (home-page "https://www.bbcbasic.co.uk/bbcsdl/")
+    (description
+     "BBC BASIC is the programming language originally specified and adopted
+by the British Broadcasting Corporation for its groundbreaking Computer
+Literacy Project of the early 1980s.  BBC BASIC for SDL 2.0 combines the
+simplicity of BASIC with the sophistication of a modern structured language,
+allowing you to write utilities and games, use sound and graphics, perform
+calculations and create complete applications.")
+    (license license:zlib)))

base-commit: 649ce7b433171a47e8a2819b849bfa88c736d0e9
-- 
2.39.2




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

Previous Next


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