From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 49090@debbugs.gnu.org
Subject: [bug#49090] [PATCH] gnu: Add blastem.
Date: Fri, 18 Jun 2021 16:59:27 +0200 [thread overview]
Message-ID: <20210618145926.6952-1-leo.prikler@student.tugraz.at> (raw)
* gnu/packages/emulators.scm (blastem): New variable.
---
gnu/packages/emulators.scm | 67 ++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index ec8d3d21d6..1f1e726d8d 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -39,6 +39,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix svn-download)
+ #:use-module (guix hg-download)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
@@ -141,6 +142,72 @@ C610/C510). An extra emulator is provided for C64 expanded with the CMD
SuperCPU.")
(license license:gpl2+)))
+(define-public blastem
+ (package
+ (name "blastem")
+ (version "0.6.2")
+ (source (origin
+ (method hg-fetch)
+ (uri (hg-reference
+ (url "https://www.retrodev.com/repos/blastem")
+ (changeset (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "08ycfisivh9rb9vmijlrpdryaw8spd81ck48960p15cnf8h2535q"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; TODO: Separately package and unbundle nuklear
+ (delete-file-recursively "zlib")))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
+ "HOST_ZLIB=1"
+ "HAS_PROC=-DHAS_PROC"
+ (string-append "CONFIG_PATH="
+ %output "/share/blastem")
+ (string-append "DATA_PATH="
+ %output "/share/blastem"))
+ #:tests? #f ; No check target and custom tests don't seem to build
+ #:imported-modules
+ ((guix build copy-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules
+ (((guix build copy-build-system)
+ #:prefix copy:)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-source
+ (lambda _
+ (substitute* (find-files "." ".*\\.[ch]")
+ (("\"zlib/zlib.h\"") "<zlib.h>"))))
+ (delete 'configure)
+ (replace 'install
+ (lambda* args
+ (apply (assoc-ref copy:%standard-phases 'install)
+ #:install-plan
+ '(("." "bin" #:include ("blastem" "vgmplay"))
+ ("." "share/blastem"
+ #:include ("default.cfg" "rom.db")
+ #:exclude ("android"))
+ ("shaders" "share/blastem/shaders"))
+ args))))))
+ (inputs
+ `(("glew" ,glew)
+ ("mesa" ,mesa)
+ ("sdl2" ,sdl2)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://www.retrodev.com/blastem/")
+ (synopsis "Genesis/Mega Drive emulator")
+ (description "Blastem is an emulator for the Sega Genesis/Mega Drive
+console.")
+ (license license:gpl3+)))
+
(define-public desmume
(package
(name "desmume")
--
2.32.0
next reply other threads:[~2021-06-18 15:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 14:59 Leo Prikler [this message]
2021-06-18 18:39 ` [bug#49090] [PATCH] gnu: Add blastem Xinglu Chen
2021-06-18 19:15 ` Leo Prikler
2021-06-19 8:30 ` Xinglu Chen
2021-06-26 20:48 ` Ludovic Courtès
2021-06-27 9:28 ` bug#49090: " Leo Prikler
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=20210618145926.6952-1-leo.prikler@student.tugraz.at \
--to=leo.prikler@student.tugraz.at \
--cc=49090@debbugs.gnu.org \
/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.