From patchwork Tue May 9 14:06:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "vasilii.smirnov--- via Guix-patches\" via" X-Patchwork-Id: 49896 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 731CC27BBEC; Tue, 9 May 2023 15:08:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0189027BBEB for ; Tue, 9 May 2023 15:08:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwO0c-0000Qz-6p; Tue, 09 May 2023 10:08:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwO0a-0000Qb-AO for guix-patches@gnu.org; Tue, 09 May 2023 10:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwO0Z-0001bJ-9R for guix-patches@gnu.org; Tue, 09 May 2023 10:08:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pwO0Y-0002HT-LT for guix-patches@gnu.org; Tue, 09 May 2023 10:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63391] [PATCH] gnu: Add bbcsdl. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 May 2023 14:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63391 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63391@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16836412608732 (code B ref -1); Tue, 09 May 2023 14:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2023 14:07:40 +0000 Received: from localhost ([127.0.0.1]:44097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwO0C-0002Gl-0V for submit@debbugs.gnu.org; Tue, 09 May 2023 10:07:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:39742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwO07-0002Ga-Ja for submit@debbugs.gnu.org; Tue, 09 May 2023 10:07:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwO07-0000JX-CG for guix-patches@gnu.org; Tue, 09 May 2023 10:07:35 -0400 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwO01-0001V5-QK for guix-patches@gnu.org; Tue, 09 May 2023 10:07:33 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 8672338A00C2; Tue, 9 May 2023 14:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1683641238; bh=Vx4pyGsLMCPTq5bD5uErgdUvD470Ons6jXz8p0tWnbk=; h=From:To:Cc:Subject:Date:From; b=arvI0ol62keHZ4vNHqWLAfFCuzFwBLt3x9t6c9xcCkV4oM4Gd4Cb1ibuaqZaYeS16 6F16J9Zz0oh+q669GxRgdpX79R7naJTLLNuhxd+UNdXXbdVeaW7AAM3ybvMG90B+Xk duDkgJuHrq9eE968zQiFlUgqb0PfdHmG1uMFGjE7AmG2CuWUiHNEgDCj9b9Rh9tSdN Bhoo4cUYCzIZWriXLNbYs++R+UieNk1AojzLDH4dL3bNPNGk+4BUarwHI6z4+R19uP nPcniVtJgW8peD5Z5B0CxTHJ5e7qG3DAb4Y4eKvCIMcLlv7RMh8BqbQfDclHmboWWy 7AQNnjGJlOWD+F7S6jKnPAkPsIy5mA6dDZlhhVh55MIEFhubZYb18bt4ndbBTQAq2R tNzpJuREo0v3MRVaKXtgz3A1peAvgczEUJ8TeLFDHETFXM9M4Z4YQaxZSfnSKJ1g5X o1n7xexPXuwTGcMN4eQJKeaYeJoud4a/HHS1prj6PIEknlImur7Zgk25qyyr6BgP8x zC+UxII6DJBoB4eLxbV104Qcu2JsnNxIhEbEltDdNnFrOW6qDsvwAuqmrPWMdCUhHC f6FEmOaph6aTK6DhZzzrnSLOUpZmZQbjKgIyvz9RoZN1IYwHiFPSnBCPIQFgpZ3f9j P9nSTADqlkjlLLapKU+JYZFE= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id iTIbslnRNldp; Tue, 9 May 2023 14:07:15 +0000 (UTC) Received: from localhost (unknown [36.170.44.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 9 May 2023 14:07:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 655cfc36; Tue, 9 May 2023 14:06:46 +0000 (UTC) Date: Tue, 9 May 2023 22:06:34 +0800 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: "vasilii.smirnov--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: 宋文武 * gnu/packages/game-development.scm (bbcsdl): New variable. --- gnu/packages/game-development.scm | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) base-commit: 649ce7b433171a47e8a2819b849bfa88c736d0e9 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)))