diff options
author | Leo Prikler <leo.prikler@student.tugraz.at> | 2021-06-18 16:58:43 +0200 |
---|---|---|
committer | Leo Prikler <leo.prikler@student.tugraz.at> | 2021-06-27 11:11:26 +0200 |
commit | 88f5665fa3fa202acf67c1ef15ce976ddcab16c5 (patch) | |
tree | 141e48c8a1a7fef4ce90a6c289dfa97d7e0fe6d1 /gnu/packages/emulators.scm | |
parent | 1afffdaa63d34a810943aa5a6b8cc03d42cc3bd2 (diff) | |
download | guix-88f5665fa3fa202acf67c1ef15ce976ddcab16c5.tar.gz |
gnu: Add blastem.
* gnu/packages/emulators.scm (blastem): New variable.
Diffstat (limited to 'gnu/packages/emulators.scm')
-rw-r--r-- | gnu/packages/emulators.scm | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 6150725f44..4df4a74bda 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") |