* [bug#49090] [PATCH] gnu: Add blastem.
@ 2021-06-18 14:59 Leo Prikler
2021-06-18 18:39 ` Xinglu Chen
0 siblings, 1 reply; 6+ messages in thread
From: Leo Prikler @ 2021-06-18 14:59 UTC (permalink / raw)
To: 49090
* 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#49090] [PATCH] gnu: Add blastem.
2021-06-18 14:59 [bug#49090] [PATCH] gnu: Add blastem Leo Prikler
@ 2021-06-18 18:39 ` Xinglu Chen
2021-06-18 19:15 ` Leo Prikler
0 siblings, 1 reply; 6+ messages in thread
From: Xinglu Chen @ 2021-06-18 18:39 UTC (permalink / raw)
To: Leo Prikler, 49090
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
On Fri, Jun 18 2021, Leo Prikler wrote:
> +(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"))
Nit: (guix hg-download) provides a ‘hg-file-name’ procedure, so you can
just use (hg-file-name name version).
> + (sha256
> + (base32
> + "08ycfisivh9rb9vmijlrpdryaw8spd81ck48960p15cnf8h2535q"))
> + (modules '((guix build utils)))
> + (snippet
> + '(begin
> + ;; TODO: Separately package and unbundle nuklear
> + (delete-file-recursively "zlib")))))
Why is the zlib directory removed? Or perhaps, why do they bundle their
own Zlib?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#49090] [PATCH] gnu: Add blastem.
2021-06-18 18:39 ` Xinglu Chen
@ 2021-06-18 19:15 ` Leo Prikler
2021-06-19 8:30 ` Xinglu Chen
2021-06-26 20:48 ` Ludovic Courtès
0 siblings, 2 replies; 6+ messages in thread
From: Leo Prikler @ 2021-06-18 19:15 UTC (permalink / raw)
To: Xinglu Chen, 49090
Am Freitag, den 18.06.2021, 20:39 +0200 schrieb Xinglu Chen:
> On Fri, Jun 18 2021, Leo Prikler wrote:
>
> > +(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"))
>
> Nit: (guix hg-download) provides a ‘hg-file-name’ procedure, so you
> can just use (hg-file-name name version).
Good to know, I simply used the hg-reference... expansion from
etc/snippets, so that should probably be updated.
>
> > + (sha256
> > + (base32
> > + "08ycfisivh9rb9vmijlrpdryaw8spd81ck48960p15cnf8h25
> > 35q"))
> > + (modules '((guix build utils)))
> > + (snippet
> > + '(begin
> > + ;; TODO: Separately package and unbundle nuklear
> > + (delete-file-recursively "zlib")))))
>
> Why is the zlib directory removed? Or perhaps, why do they bundle
> their own Zlib?
The have their own PNG implementation, which appears different from
libpng. So zlib exists as a dependency of that, but it's also
#included elsewhere.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#49090] [PATCH] gnu: Add blastem.
2021-06-18 19:15 ` Leo Prikler
@ 2021-06-19 8:30 ` Xinglu Chen
2021-06-26 20:48 ` Ludovic Courtès
1 sibling, 0 replies; 6+ messages in thread
From: Xinglu Chen @ 2021-06-19 8:30 UTC (permalink / raw)
To: Leo Prikler, 49090
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On Fri, Jun 18 2021, Leo Prikler wrote:
> Am Freitag, den 18.06.2021, 20:39 +0200 schrieb Xinglu Chen:
>> On Fri, Jun 18 2021, Leo Prikler wrote:
>>
>> > +(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"))
>>
>> Nit: (guix hg-download) provides a ‘hg-file-name’ procedure, so you
>> can just use (hg-file-name name version).
> Good to know, I simply used the hg-reference... expansion from
> etc/snippets, so that should probably be updated.
Ah, I guess it time to update etc/snippets then :)
>> > + (sha256
>> > + (base32
>> > + "08ycfisivh9rb9vmijlrpdryaw8spd81ck48960p15cnf8h25
>> > 35q"))
>> > + (modules '((guix build utils)))
>> > + (snippet
>> > + '(begin
>> > + ;; TODO: Separately package and unbundle nuklear
>> > + (delete-file-recursively "zlib")))))
>>
>> Why is the zlib directory removed? Or perhaps, why do they bundle
>> their own Zlib?
> The have their own PNG implementation, which appears different from
> libpng. So zlib exists as a dependency of that, but it's also
> #included elsewhere.
OK, thanks for the explanation.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#49090] [PATCH] gnu: Add blastem.
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
1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-06-26 20:48 UTC (permalink / raw)
To: Leo Prikler; +Cc: 49090, Xinglu Chen
Hi Leo,
Looks like this patch should be ready now?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-27 9:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 14:59 [bug#49090] [PATCH] gnu: Add blastem Leo Prikler
2021-06-18 18:39 ` 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
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.