all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Wong via Guix-patches via <guix-patches@gnu.org>
To: 75353@debbugs.gnu.org
Cc: "Andrew Wong" <wongandj@icloud.com>,
	"Adam Faiz" <adam.faiz@disroot.org>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#75353] [PATCH] gnu: Add libretro-beetle-psx
Date: Sat,  4 Jan 2025 10:54:33 -0500	[thread overview]
Message-ID: <e9a171af603858d3f99ce1abacd2317a38e604e6.1736006073.git.wongandj@icloud.com> (raw)

* gnu/packages/emulators.scm (make-libretro-beetle-psx): New function.
(libretro-beetle-psx, libretro-beetle-psx-hw): New variables.

Change-Id: I7d5bb2783a5952e00014f18eaf8e436e889ef77b
---
 gnu/packages/emulators.scm | 50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index b65c91cdf5..386e3cde4b 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1463,6 +1463,56 @@ (define-public nestopia-ue
 emulation community.  It provides highly accurate emulation.")
     (license license:gpl2+)))
 
+(define (make-libretro-beetle-psx name hw)
+  (let ((commit "80d3eba272cf6efab6b76e4dc44ea2834c6f910d")
+	(revision "0"))
+   (package
+    (name name)
+    ;; Use Mednafen core version as base. Defined in libretro_options.h:10
+    (version (git-version "0.9.44.1" revision commit))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/libretro/beetle-psx-libretro")
+             (commit commit)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "14kkrlqhv9pqmbqlv8vvcp0ps938dmg8pk47d7zzc8piq51hkawk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags #~(list (string-append "HAVE_HW=" #$(if hw "1" "0"))
+                                (string-append "CC=" #$(cc-for-target))
+                                (string-append "GIT_VERSION=" #$commit)
+                                (string-append "prefix=" #$output))
+           #:tests? #f                  ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+			(replace 'install ;there is no install target
+			  (lambda* (#:key outputs #:allow-other-keys)
+			    (let* ((libretro (string-append
+					      (assoc-ref outputs "out")
+					      "/lib/libretro")))
+			      (install-file (string-append "mednafen_psx_"
+                                                           #$(if hw "hw_" "")
+                                                           "libretro.so")
+					    libretro)))))))
+    (inputs (list mesa))
+    (home-page "https://github.com/libretro/beetle-psx-libretro")
+    (synopsis "Standalone port of Mednafen PSX to libretro")
+    (description
+     "Beetle PSX is a port/fork of Mednafen's PSX module to the libretro
+API.  Additional features include PBP/CHD file format support,
+high-resolution software rendering, OpenGL and Vulkan renderers, and
+PGXP perspective correct texturing.")
+    (license license:gpl2))))
+
+(define-public libretro-beetle-psx
+  (make-libretro-beetle-psx "libretro-beetle-psx" #f))
+
+(define-public libretro-beetle-psx-hw
+  (make-libretro-beetle-psx "libretro-beetle-psx-hw" #t))
+
 (define-public libretro-lowresnx
   (package
     (name "libretro-lowresnx")

base-commit: 321edcf0744a8895690579e8a5b09b66c75d102c
-- 
2.47.1





             reply	other threads:[~2025-01-04 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04 15:54 Andrew Wong via Guix-patches via [this message]
2025-01-12  6:20 ` bug#75353: [PATCH] gnu: Add libretro-beetle-psx 宋文武 via Guix-patches via

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=e9a171af603858d3f99ce1abacd2317a38e604e6.1736006073.git.wongandj@icloud.com \
    --to=guix-patches@gnu.org \
    --cc=75353@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    --cc=wongandj@icloud.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.