[PATCH] gnu: Add blastem.

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Prikler
  • Ludovic Courtès
  • Xinglu Chen
Owner
unassigned
Submitted by
Leo Prikler
Severity
normal

Debbugs page

Leo Prikler wrote 4 years ago
(address . guix-patches@gnu.org)
20210618145926.6952-1-leo.prikler@student.tugraz.at
* gnu/packages/emulators.scm (blastem): New variable.
---
gnu/packages/emulators.scm | 67 ++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (87 lines)
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
Xinglu Chen wrote 4 years ago
87sg1f586a.fsf@yoctocell.xyz
On Fri, Jun 18 2021, Leo Prikler wrote:

Toggle quote (11 lines)
> +(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).

Toggle quote (9 lines)
> + (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?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDM6F0VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5nvsP/3G08qnhJwgu6HCc7egNXfayy3iX
7ldu+7z8EpdwrRNMndDfii8EAtfI+uLMrMsKy/DaHEYWCfQ+fD/3El0uRovaZzcH
SPL0b0q3nC3TJiBFuebJl3Iz0LBlnG9YrycNPD9yyQq/qz9RxTOop9nZQo94ijoT
yIDukp7SQGrtkRVSQfrxqbNHu/YNqpKw23NG826n0Da70NEzrckYW8niRkLzQcio
T6jRlPhILorbtzwPhi+UKsz6K2RNLXuGEjma+a+8GUR3uvqmUAdiYRHy8XDJZ3jG
K0pfDNHb0lrUSV+y9jPJdxl8ds/UKmCi5d3JG/i2wxFTeh6B9rD3Y4ndY6S72PyI
vdfDb8cBq9FkzCD6aPD9cTauHYXuYUxqshYAM93W59AHxbzdKFPcXFH5mBmliU2+
28+ct4DtwqMEMNitJWyaa8skNdtsH12rQxecz7zn8HCmnjNt9JOEA1Rzh4dAcx9l
L7Hp+gqYmTvvoxZ6ffDDCOhg3jtTf9+lT4VhM8VapdBGUzmvs4VdF54+a1F1QQkf
eACAp9PEThLQbK/s35T/RZPBVMEOM7FqmVKjjgVdN07cOCh0tiXQrsDLMXkI6A0t
z1i8Vx7Lsn7mWp3LGZGW2qUzuK0rgSZlW67cjWgTKxN8teYRNe/68AOvRlJBcuOh
U+luaF4ydwTvxvPd
=zFdD
-----END PGP SIGNATURE-----

Leo Prikler wrote 4 years ago
05ad84f8282a8046aa5ce81699806d835b7af908.camel@student.tugraz.at
Am Freitag, den 18.06.2021, 20:39 +0200 schrieb Xinglu Chen:
Toggle quote (16 lines)
> 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.
Toggle quote (13 lines)
>
> > + (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.
Xinglu Chen wrote 4 years ago
87fsxe45pw.fsf@yoctocell.xyz
On Fri, Jun 18 2021, Leo Prikler wrote:

Toggle quote (20 lines)
> 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 :)

Toggle quote (16 lines)
>> > + (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.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDNqwsVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5wEUQALKTMkXF4VEQ0Sf41zZXAoyv9pyn
EgihD74ZFj8rn4ksJdrDWKLmlluUfi/zdB/ZmllVHFfWP/tS9MZwy/7jkT/ttON5
W3ayzX7ZdpLQPEdKf+qNRAzkfjvTcdoOvyEjtdacVC4WP1SArmiRGBeI3VoV1Dc1
i6QFhqLDvELT/qw+NV3/RBXBf0Qu0bnZCKMY8HcvATRLkaujIUQWCTHrbDLxfOnK
xGt5WVSPOMR9DtkyumRunDNb9qOZw7KsceAWI9C14s294e+nEJYG5ysEPWs2a/de
5yI+cbSPygO/57WIpKmJGR5L1aMXYMw5PCJGR5bFMZorx/SSYtQ2lLM1jDDx+UWq
G9AK7yDzS2ltCERrs9Ld7P5lPIMNVeKzXaNZWrxwehQfVVdGE3emU6pjOFgeUUfk
bjmFyr/u6hYKjzwwoz6pJZUm+/W5B5efNEjDbc/kvRvAeJ+m3/eDlsdldkYuOHjb
/HJEX/eVV9jhCK4b/fYhts37/HYkSoOdEXq6MJonqt3md8IGqdOIZZnSYKkFFPSa
ZM/GKQdqA5Y46mYD79s8eny2ffNwhXa4p8k/aI4F5injl6H9G0AkknFNFVeXxMop
RU1h1NGW5eIzHTUyG60fS5+uTQR5vlyyXGT9W3PIVlk2doAo2xJB6IluyQivUVgM
MhqeBwBo6awn0q9e
=eeNr
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 4 years ago
Re: bug#49090: [PATCH] gnu: Add blastem.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
8735t42vz2.fsf_-_@gnu.org
Hi Leo,

Looks like this patch should be ready now?

Thanks,
Ludo’.
Leo Prikler wrote 4 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
f40131b9d17dbfa746c3e93b7c31e686febff3fd.camel@student.tugraz.at
Am Samstag, den 26.06.2021, 22:48 +0200 schrieb Ludovic Courtès:
Toggle quote (6 lines)
> Hi Leo,
>
> Looks like this patch should be ready now?
>
> Thanks,
> Ludo’.
I would say so too. I've pushed it now.

Thanks,
Leo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49090@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49090
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help