all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: manolis837@gmail.com
To: 73278@debbugs.gnu.org
Cc: "Manolis Ragkousis" <manolis837@gmail.com>,
	"Adam Faiz" <adam.faiz@disroot.org>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#73278] [PATCH 2/2] gnu: Add ps1 homebrew development kit
Date: Sun, 15 Sep 2024 22:03:31 +0300	[thread overview]
Message-ID: <2cc2ac1f520e35433ac87183afad2ceebdc01f0e.1726426231.git.manolis837@gmail.com> (raw)
In-Reply-To: <7c35f8694833a9371d84c51ce4a07119358e187e.1726426231.git.manolis837@gmail.com>

From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/game-development.scm (miniaudio): New variable.
  (miniaudio-0.10.43): New variable.
  (gulrak-filesystem): New variable.
  (ThreadPool): New variable.
  (mkpsxiso): New variable.
  (psn00bsdk): New variable.

Change-Id: I96cbfa6bb91ed90b183297cc3118bb9411e11705
---
 gnu/packages/game-development.scm | 249 +++++++++++++++++++++++++++++-
 1 file changed, 248 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index efbbabaaf5..af5d2506d9 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016, 2018, 2019, 2024 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
+;;; Copyright © 2017, 2024 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -75,6 +75,7 @@ (define-module (gnu packages game-development)
   #:use-module (gnu packages check)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages embedded)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
@@ -82,6 +83,7 @@ (define-module (gnu packages game-development)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -3382,3 +3384,248 @@ (define-public bbcsdl
 allowing you to write utilities and games, use sound and graphics, perform
 calculations and create complete applications.")
     (license license:zlib)))
+
+(define-public miniaudio
+  (package
+    (name "miniaudio")
+    (version "0.11.21")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mackron/miniaudio")
+                    (commit version)
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0hlqp44ifi3vswvfpqljj89321y6yz3zq6rng51wfq8p4n9k5qhh"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:tests? #f))
+    (synopsis "Audio playback and capture library for C and C++")
+    (description
+     "Miniaudio is a lightweight, single-file audio playback and capture
+library designed for use in C and C++ applications.  It features no external
+dependencies, making it highly portable and easy to integrate.")
+    (home-page "https://miniaud.io/")
+    (license license:expat-0)))
+
+(define-public miniaudio-0.10.43
+  (package (inherit miniaudio)
+    (name "miniaudio")
+    (version "0.10.43")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mackron/miniaudio")
+                    (commit "8686f52e6625e562f4756b946696692c016324ab")
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0lv5gq23rspa3s9yqr3lhrfvbz63zcnkbxngsl2bgvj79x49vw9a"))))))
+
+(define-public gulrak-filesystem
+  (package
+    (name "gulrak-filesystem")
+    (version "v1.5.14")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/gulrak/filesystem")
+                    (commit version)
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0n1w2q0fp31z2l7g16ysc5nwyhmy3rj3hb89ganws0j84g3hi7ax"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:tests? #f))
+    (synopsis "Header-only single-file std::filesystem helper library for C++")
+    (description
+ "This library provides std::filesystem-compatible functionality for C++11,
+C++14, C++17, and C++20.  It is portable, tested on various platforms, and
+resides in the ghc::filesystem namespace to avoid conflicts with
+std::filesystem.")
+    (home-page "https://github.com/gulrak/filesystem")
+    (license license:expat)))
+
+(define-public ThreadPool
+  (package
+    (name "ThreadPool")
+    ;; No actual version in upstream
+    (version "v0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/progschj/ThreadPool")
+                    (commit "9a42ec1329f259a5f4881a291db1dcb8f2ad9040")
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "020j6cgvl9aq2gs6fndl31w7wni7djwl90nw465bnmx0648ss89n"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:tests? #f))
+    (synopsis "Simple C++11 Thread Pool implementation")
+    (description
+     "A simple C++11 Thread Pool implementation.")
+    (home-page "https://github.com/progschj/ThreadPool")
+    (license license:expat)))
+
+(define-public mkpsxiso
+  (package
+    (name "mkpsxiso")
+    (version "v2.04")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Lameguy64/mkpsxiso")
+                    (commit version)
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "19cs5i39qhgwabrcklm6dym9p1zqmsgfgv6hcfc5z207yzdc9qhl"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:tests? #f  ;no test
+           #:configure-flags
+           #~(list "-DCMAKE_CXX_FLAGS=-fpermissive")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'copy-tinyxml2
+                 (lambda _
+                   (copy-recursively
+                    #$(package-source tinyxml2)
+                    "tinyxml2")))
+               (add-after 'copy-tinyxml2 'copy-miniaudio
+                 (lambda _
+                   (copy-recursively
+                    #$(package-source miniaudio-0.10.43)
+                    "miniaudio")))
+               (add-after 'copy-miniaudio 'copy-gulrak-filesystem
+                 (lambda _
+                   (copy-recursively
+                    #$(package-source gulrak-filesystem)
+                    "ghc")))
+               (add-after 'copy-gulrak-filesystem 'copy-threadpool
+                 (lambda _
+                   (copy-recursively
+                    #$(package-source ThreadPool)
+                    "ThreadPool")))
+               (add-after 'copy-threadpool 'copy-flac
+                 (lambda _
+                   (mkdir-p "flac")
+                   (with-directory-excursion "flac"
+                     (invoke "tar" "xvf" #$(package-source flac)
+                             "--strip-components=1")))))))
+    (inputs (list glfw pulseaudio))
+    (native-inputs
+     (list
+      pkg-config
+      tinyxml2
+      miniaudio-0.10.43
+      gulrak-filesystem
+      ThreadPool
+      flac
+      ninja))
+    (synopsis "Builds PlayStation CD images from an XML document")
+    (description
+     "MKPSXISO is capable of generating 2352 byte per sector ISO images with
+CD-DA audio tracks and mixed-mode CD-XA and interleaved data for streaming
+content.  It also uses XML with very simple to use directives for scripting the
+contents of the image project.")
+    (home-page "http://lameguy64.net/")
+    (license license:gpl2)))
+
+(define-public psn00bsdk
+  (package
+    (name "psn00bsdk")
+    (version "v0.24")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Lameguy64/PSn00bSDK")
+                    (commit "702bb601fb5712e2ae962a34b89204c646fe98f5")
+                    (recursive? #f)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1nvy6lff4p54127awc4pl0a73myrgssihksvpaxamadzpk12vvl4"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:tests? #f  ;no test
+           #:configure-flags
+           #~(list "-DCMAKE_BUILD_TYPE=Release"
+                   "-DSKIP_EXAMPLES=true"
+                   (string-append
+                    "-DCMAKE_ASM_FLAGS=-Wa,-I"
+                    #$source
+                    "/libpsn00b/include,-march=r3000"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-cmake
+                 (lambda _
+                   (substitute* "CMakeLists.txt"
+                     ;; Modify ExternalProject_Add for 'libpsn00b-debug'
+                     (("CMAKE_CACHE_ARGS[^\n]+-DCMAKE_BUILD_TYPE:STRING=Debug")
+                      (string-append
+                       "CMAKE_CACHE_ARGS ${_libpsn00b_args} -DCMAKE_BUILD_TYPE:STRING=Debug "
+                       "-DCMAKE_ASM_FLAGS:STRING=-Wa,-I"
+                       #$source "/libpsn00b/include,-march=r3000"))
+                     ;; Modify ExternalProject_Add for 'libpsn00b-release'
+                     (("CMAKE_CACHE_ARGS[^\n]+-DCMAKE_BUILD_TYPE:STRING=Release")
+                      (string-append
+                       "CMAKE_CACHE_ARGS ${_libpsn00b_args} -DCMAKE_BUILD_TYPE:STRING=Release "
+                       "-DCMAKE_ASM_FLAGS:STRING=-Wa,-I"
+                       #$source "/libpsn00b/include,-march=r3000")))))
+               (add-after 'patch-cmake 'copy-mkpsxiso
+                 (lambda _
+                   (copy-recursively
+                    #$(package-source mkpsxiso)
+                    "tools/mkpsxiso")))
+               (add-after 'copy-mkpsxiso 'copy-tinyxml2
+                 (lambda _
+                   (copy-recursively #$(package-source tinyxml2) "tools/tinyxml2")
+                   (with-directory-excursion "tools/mkpsxiso"
+                     (copy-recursively
+                      #$(package-source tinyxml2)
+                      "tinyxml2"))))
+               (add-after 'copy-tinyxml2 'copy-miniaudio
+                 (lambda _
+                   (with-directory-excursion "tools/mkpsxiso"
+                     (copy-recursively
+                      #$(package-source miniaudio-0.10.43)
+                      "miniaudio"))))
+               (add-after 'copy-miniaudio 'copy-gulrak-filesystem
+                 (lambda _
+                   (with-directory-excursion "tools/mkpsxiso"
+                     (copy-recursively
+                      #$(package-source gulrak-filesystem)
+                      "ghc"))))
+               (add-after 'copy-gulrak-filesystem 'copy-threadpool
+                 (lambda _
+                   (with-directory-excursion "tools/mkpsxiso"
+                     (copy-recursively
+                      #$(package-source ThreadPool)
+                      "ThreadPool"))))
+               (add-after 'copy-threadpool 'copy-flac
+                 (lambda _
+                   (mkdir-p "flac")
+                   (with-directory-excursion "tools/mkpsxiso/flac"
+                     (invoke "tar" "xvf" #$(package-source flac)
+                             "--strip-components=1")))))))
+    (propagated-inputs
+     `(("mipsel-none-elf-toolchain" ,(make-mipsel-none-elf-toolchain-ps1))))
+    (native-inputs (list pkg-config))
+    (synopsis "Homebrew software development kit for the original Sony
+PlayStation")
+    (description
+     "Sn00bSDK is a set of libraries that implements most of the core
+functionality of the official Sony SDK (excluding higher-level libraries) plus
+several new extensions to it.")
+    (home-page "http://lameguy64.net/")
+    (license license:mpl2.0)))
-- 
2.46.0





  reply	other threads:[~2024-09-15 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-15 19:03 [bug#73277] [PATCH 1/2] gnu: Add mipsel-none-elf-toolchain variant manolis837
2024-09-15 19:03 ` manolis837 [this message]
2024-09-15 19:09   ` [bug#73278] [PATCH 2/2] gnu: Add ps1 homebrew development kit Liliana Marie Prikler
2024-09-16 12:00 ` [bug#73277] [PATCH 1/2] gnu: Add mipsel-none-elf-toolchain variant Jean-Pierre De Jesus Diaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cc2ac1f520e35433ac87183afad2ceebdc01f0e.1726426231.git.manolis837@gmail.com \
    --to=manolis837@gmail.com \
    --cc=73278@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.